Repository: TerryCavanagh/VVVVVV Branch: master Commit: 9bcade977606 Files: 3327 Total size: 28.2 MB Directory structure: gitextract_64v64ki7/ ├── .gitattributes ├── .github/ │ ├── pull_request_template.md │ └── workflows/ │ ├── android.yml │ └── ci.yml ├── .gitmodules ├── LICENSE.md ├── License exceptions.md ├── README.md ├── desktop_version/ │ ├── .dockerignore │ ├── .gitignore │ ├── AppIcon.xcassets/ │ │ ├── AppIcon.appiconset/ │ │ │ └── Contents.json │ │ └── Contents.json │ ├── CMakeLists.txt │ ├── CONTRIBUTORS.txt │ ├── Dockerfile │ ├── Info.plist │ ├── README.md │ ├── TRANSLATORS.txt │ ├── VVVVVV-android/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── app/ │ │ │ ├── build.gradle │ │ │ ├── jni/ │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── CMakeLists.txt │ │ │ ├── proguard-rules.pro │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── java/ │ │ │ │ └── com/ │ │ │ │ └── distractionware/ │ │ │ │ └── vvvvvv/ │ │ │ │ ├── BaseDirProvider.java │ │ │ │ ├── FileSystemProvider.java │ │ │ │ └── VVVVVV.java │ │ │ └── res/ │ │ │ ├── mipmap-anydpi-v26/ │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ └── values/ │ │ │ ├── colors.xml │ │ │ ├── ic_launcher_background.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle/ │ │ │ └── wrapper/ │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── gradle.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── fixupMac.sh │ ├── fonts/ │ │ ├── README.txt │ │ ├── buttons_10x10.fontmeta │ │ ├── buttons_12x12.fontmeta │ │ ├── buttons_8x8.fontmeta │ │ ├── font.fontmeta │ │ ├── font_ar.fontmeta │ │ ├── font_ja.fontmeta │ │ ├── font_ko.fontmeta │ │ ├── font_ko_license.txt │ │ ├── font_sc.fontmeta │ │ ├── font_sc_tc_license.txt │ │ └── font_tc.fontmeta │ ├── icon.rc │ ├── lang/ │ │ ├── README-programmers.txt │ │ ├── README-translators.txt │ │ ├── ar/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── ca/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── cy/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── de/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── en/ │ │ │ ├── cutscenes.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── eo/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── es/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── es_419/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── es_AR/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── fa/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── fr/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── ga/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── it/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── ja/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── ko/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── nl/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── pl/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── pt_BR/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── pt_PT/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── ru/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── szl/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── tr/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── uk/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ ├── zh/ │ │ │ ├── cutscenes.xml │ │ │ ├── graphics/ │ │ │ │ └── spritesmask.xml │ │ │ ├── meta.xml │ │ │ ├── numbers.xml │ │ │ ├── roomnames.xml │ │ │ ├── roomnames_special.xml │ │ │ ├── strings.xml │ │ │ └── strings_plural.xml │ │ └── zh_TW/ │ │ ├── cutscenes.xml │ │ ├── graphics/ │ │ │ └── spritesmask.xml │ │ ├── meta.xml │ │ ├── numbers.xml │ │ ├── roomnames.xml │ │ ├── roomnames_special.xml │ │ ├── strings.xml │ │ └── strings_plural.xml │ ├── src/ │ │ ├── ActionSets.h │ │ ├── Alloc.h │ │ ├── BinaryBlob.cpp │ │ ├── BinaryBlob.h │ │ ├── BlockV.cpp │ │ ├── BlockV.h │ │ ├── ButtonGlyphs.cpp │ │ ├── ButtonGlyphs.h │ │ ├── CWrappers.cpp │ │ ├── CWrappers.h │ │ ├── Constants.h │ │ ├── Credits.h │ │ ├── CustomLevels.cpp │ │ ├── CustomLevels.h │ │ ├── DeferCallbacks.c │ │ ├── DeferCallbacks.h │ │ ├── Editor.cpp │ │ ├── Editor.h │ │ ├── Ent.cpp │ │ ├── Ent.h │ │ ├── Entity.cpp │ │ ├── Entity.h │ │ ├── Enums.h │ │ ├── Exit.h │ │ ├── FileSystemUtils.cpp │ │ ├── FileSystemUtils.h │ │ ├── Finalclass.cpp │ │ ├── Finalclass.h │ │ ├── Font.cpp │ │ ├── Font.h │ │ ├── FontBidi.cpp │ │ ├── FontBidi.h │ │ ├── GOGNetwork.c │ │ ├── Game.cpp │ │ ├── Game.h │ │ ├── GlitchrunnerMode.c │ │ ├── GlitchrunnerMode.h │ │ ├── Graphics.cpp │ │ ├── Graphics.h │ │ ├── GraphicsResources.cpp │ │ ├── GraphicsResources.h │ │ ├── GraphicsUtil.cpp │ │ ├── GraphicsUtil.h │ │ ├── IMERender.cpp │ │ ├── IMERender.h │ │ ├── Input.cpp │ │ ├── Input.h │ │ ├── InterimVersion.h │ │ ├── InterimVersion.in.c │ │ ├── KeyPoll.cpp │ │ ├── KeyPoll.h │ │ ├── Labclass.cpp │ │ ├── Labclass.h │ │ ├── LevelDebugger.cpp │ │ ├── LevelDebugger.h │ │ ├── Localization.cpp │ │ ├── Localization.h │ │ ├── LocalizationMaint.cpp │ │ ├── LocalizationMaint.h │ │ ├── LocalizationStorage.cpp │ │ ├── LocalizationStorage.h │ │ ├── Logic.cpp │ │ ├── Logic.h │ │ ├── MakeAndPlay.h │ │ ├── Map.cpp │ │ ├── Map.h │ │ ├── Maths.h │ │ ├── Music.cpp │ │ ├── Music.h │ │ ├── Network.c │ │ ├── Network.h │ │ ├── Otherlevel.cpp │ │ ├── Otherlevel.h │ │ ├── ReleaseVersion.h │ │ ├── Render.cpp │ │ ├── Render.h │ │ ├── RenderFixed.cpp │ │ ├── RenderFixed.h │ │ ├── RoomnameTranslator.cpp │ │ ├── RoomnameTranslator.h │ │ ├── SDL_uikit_main.c │ │ ├── Screen.cpp │ │ ├── Screen.h │ │ ├── ScreenSettings.h │ │ ├── Script.cpp │ │ ├── Script.h │ │ ├── Scripts.cpp │ │ ├── Spacestation2.cpp │ │ ├── Spacestation2.h │ │ ├── SteamNetwork.c │ │ ├── TerminalScripts.cpp │ │ ├── Textbook.c │ │ ├── Textbook.h │ │ ├── Textbox.cpp │ │ ├── Textbox.h │ │ ├── ThirdPartyDeps.c │ │ ├── Tower.cpp │ │ ├── Tower.h │ │ ├── TowerBG.h │ │ ├── UTF8.c │ │ ├── UTF8.h │ │ ├── Unreachable.h │ │ ├── Unused.h │ │ ├── UtilityClass.cpp │ │ ├── UtilityClass.h │ │ ├── VFormat.c │ │ ├── VFormat.h │ │ ├── Vlogging.c │ │ ├── Vlogging.h │ │ ├── WarpClass.cpp │ │ ├── WarpClass.h │ │ ├── XMLUtils.cpp │ │ ├── XMLUtils.h │ │ ├── Xoshiro.c │ │ ├── Xoshiro.h │ │ ├── lodepng_wrapper.c │ │ ├── main.cpp │ │ ├── preloader.cpp │ │ └── preloader.h │ └── version.cmake ├── mobile_version/ │ ├── application.xml │ ├── data/ │ │ ├── c64.fnt │ │ └── vvvvvv_graphics.xml │ ├── levels/ │ │ ├── eurogamer fork/ │ │ │ └── eurogamerotherlevelclass.as │ │ ├── finalclass.as │ │ ├── labclass.as │ │ ├── newgameclass.as │ │ ├── otherlevelclass.as │ │ ├── spacestation2class.as │ │ ├── towerclass.as │ │ └── warpclass.as │ ├── readme.MD │ └── src/ │ ├── EditorDataclass.as │ ├── EmbeddedAssets.as │ ├── LevelMetaData.as │ ├── Load.as │ ├── Main.as │ ├── bigroom/ │ │ └── input/ │ │ └── KeyPoll.as │ ├── blockclass.as │ ├── com/ │ │ └── adobe/ │ │ └── utils/ │ │ └── AGALMiniAssembler.as │ ├── device.as │ ├── dwgraphicsclass.as │ ├── edentitiesclass.as │ ├── editor.as │ ├── edlevelclass.as │ ├── entclass.as │ ├── entityclass.as │ ├── gameclass.as │ ├── helpclass.as │ ├── includes/ │ │ ├── input.as │ │ ├── logic.as │ │ ├── render.as │ │ ├── scripts.as │ │ └── terminalscripts.as │ ├── mapclass.as │ ├── musicclass.as │ ├── platformclass.as │ ├── saveclass.as │ ├── scoreclass.as │ ├── scriptclass.as │ ├── starling/ │ │ ├── animation/ │ │ │ ├── DelayedCall.as │ │ │ ├── IAnimatable.as │ │ │ ├── Juggler.as │ │ │ ├── Transitions.as │ │ │ └── Tween.as │ │ ├── assets/ │ │ │ ├── AssetFactory.as │ │ │ ├── AssetFactoryHelper.as │ │ │ ├── AssetManager.as │ │ │ ├── AssetReference.as │ │ │ ├── AssetType.as │ │ │ ├── AtfTextureFactory.as │ │ │ ├── BitmapTextureFactory.as │ │ │ ├── ByteArrayFactory.as │ │ │ ├── DataLoader.as │ │ │ ├── JsonFactory.as │ │ │ ├── SoundFactory.as │ │ │ └── XmlFactory.as │ │ ├── core/ │ │ │ ├── Starling.as │ │ │ ├── StatsDisplay.as │ │ │ └── starling_internal.as │ │ ├── display/ │ │ │ ├── BlendMode.as │ │ │ ├── Button.as │ │ │ ├── ButtonState.as │ │ │ ├── Canvas.as │ │ │ ├── DisplayObject.as │ │ │ ├── DisplayObjectContainer.as │ │ │ ├── Image.as │ │ │ ├── Mesh.as │ │ │ ├── MeshBatch.as │ │ │ ├── MovieClip.as │ │ │ ├── Quad.as │ │ │ ├── Sprite.as │ │ │ ├── Sprite3D.as │ │ │ └── Stage.as │ │ ├── errors/ │ │ │ ├── AbstractClassError.as │ │ │ ├── AbstractMethodError.as │ │ │ ├── MissingContextError.as │ │ │ └── NotSupportedError.as │ │ ├── events/ │ │ │ ├── EnterFrameEvent.as │ │ │ ├── Event.as │ │ │ ├── EventDispatcher.as │ │ │ ├── KeyboardEvent.as │ │ │ ├── ResizeEvent.as │ │ │ ├── Touch.as │ │ │ ├── TouchEvent.as │ │ │ ├── TouchMarker.as │ │ │ ├── TouchPhase.as │ │ │ └── TouchProcessor.as │ │ ├── filters/ │ │ │ ├── BlurFilter.as │ │ │ ├── ColorMatrixFilter.as │ │ │ ├── CompositeFilter.as │ │ │ ├── DisplacementMapFilter.as │ │ │ ├── DropShadowFilter.as │ │ │ ├── FilterChain.as │ │ │ ├── FilterHelper.as │ │ │ ├── FragmentFilter.as │ │ │ ├── GlowFilter.as │ │ │ └── IFilterHelper.as │ │ ├── geom/ │ │ │ └── Polygon.as │ │ ├── rendering/ │ │ │ ├── BatchProcessor.as │ │ │ ├── BatchToken.as │ │ │ ├── Effect.as │ │ │ ├── FilterEffect.as │ │ │ ├── IndexData.as │ │ │ ├── MeshEffect.as │ │ │ ├── Painter.as │ │ │ ├── Program.as │ │ │ ├── RenderState.as │ │ │ ├── VertexData.as │ │ │ ├── VertexDataAttribute.as │ │ │ └── VertexDataFormat.as │ │ ├── styles/ │ │ │ ├── DistanceFieldStyle.as │ │ │ └── MeshStyle.as │ │ ├── text/ │ │ │ ├── BitmapChar.as │ │ │ ├── BitmapFont.as │ │ │ ├── ITextCompositor.as │ │ │ ├── MiniBitmapFont.as │ │ │ ├── TextField.as │ │ │ ├── TextFieldAutoSize.as │ │ │ ├── TextFormat.as │ │ │ ├── TextOptions.as │ │ │ └── TrueTypeCompositor.as │ │ ├── textures/ │ │ │ ├── AtfData.as │ │ │ ├── ConcretePotTexture.as │ │ │ ├── ConcreteRectangleTexture.as │ │ │ ├── ConcreteTexture.as │ │ │ ├── ConcreteVideoTexture.as │ │ │ ├── RenderTexture.as │ │ │ ├── SubTexture.as │ │ │ ├── Texture.as │ │ │ ├── TextureAtlas.as │ │ │ ├── TextureOptions.as │ │ │ └── TextureSmoothing.as │ │ └── utils/ │ │ ├── Align.as │ │ ├── AssetManager.as │ │ ├── Color.as │ │ ├── MathUtil.as │ │ ├── MatrixUtil.as │ │ ├── MeshSubset.as │ │ ├── MeshUtil.as │ │ ├── Padding.as │ │ ├── Pool.as │ │ ├── RectangleUtil.as │ │ ├── RenderUtil.as │ │ ├── ScaleMode.as │ │ ├── StringUtil.as │ │ ├── SystemUtil.as │ │ ├── deg2rad.as │ │ ├── execute.as │ │ └── rad2deg.as │ ├── textboxclass.as │ └── tmap.as └── tools/ ├── editors/ │ ├── Final Level Editor/ │ │ ├── imports/ │ │ │ ├── final/ │ │ │ │ ├── x41y51.txt │ │ │ │ ├── x41y52.txt │ │ │ │ ├── x41y56.txt │ │ │ │ ├── x42y51.txt │ │ │ │ ├── x42y52.txt │ │ │ │ ├── x42y56.txt │ │ │ │ ├── x43y51.txt │ │ │ │ ├── x43y52.txt │ │ │ │ ├── x44y51.txt │ │ │ │ ├── x44y52.txt │ │ │ │ ├── x45y51.txt │ │ │ │ ├── x45y52.txt │ │ │ │ ├── x46y51.txt │ │ │ │ ├── x46y54.txt │ │ │ │ ├── x47y51.txt │ │ │ │ ├── x47y52.txt │ │ │ │ ├── x47y54.txt │ │ │ │ ├── x48y51.txt │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y54.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x53y48.txt │ │ │ │ ├── x53y49.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y52.txt │ │ │ │ ├── x53y53.txt │ │ │ │ ├── x54y48.txt │ │ │ │ ├── x54y49.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y52.txt │ │ │ │ └── x54y53.txt │ │ │ └── intermission/ │ │ │ ├── x41y56.txt │ │ │ ├── x42y56.txt │ │ │ ├── x43y56.txt │ │ │ ├── x44y56.txt │ │ │ ├── x45y56.txt │ │ │ ├── x46y56.txt │ │ │ ├── x47y56.txt │ │ │ ├── x48y56.txt │ │ │ ├── x49y56.txt │ │ │ ├── x50y56.txt │ │ │ ├── x51y56.txt │ │ │ ├── x52y56.txt │ │ │ ├── x53y56.txt │ │ │ └── x54y56.txt │ │ ├── main.cpp │ │ ├── maps/ │ │ │ ├── final/ │ │ │ │ ├── x41y51.txt │ │ │ │ ├── x41y52.txt │ │ │ │ ├── x41y56.txt │ │ │ │ ├── x42y51.txt │ │ │ │ ├── x42y52.txt │ │ │ │ ├── x42y56.txt │ │ │ │ ├── x43y51.txt │ │ │ │ ├── x43y52.txt │ │ │ │ ├── x44y51.txt │ │ │ │ ├── x44y52.txt │ │ │ │ ├── x45y51.txt │ │ │ │ ├── x45y52.txt │ │ │ │ ├── x46y51.txt │ │ │ │ ├── x46y54.txt │ │ │ │ ├── x47y51.txt │ │ │ │ ├── x47y52.txt │ │ │ │ ├── x47y54.txt │ │ │ │ ├── x48y51.txt │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y54.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x49y55.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x53y48.txt │ │ │ │ ├── x53y49.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y52.txt │ │ │ │ ├── x53y53.txt │ │ │ │ ├── x54y48.txt │ │ │ │ ├── x54y49.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y52.txt │ │ │ │ └── x54y53.txt │ │ │ └── intermission/ │ │ │ ├── x41y56.txt │ │ │ ├── x42y56.txt │ │ │ ├── x43y56.txt │ │ │ ├── x44y56.txt │ │ │ ├── x45y56.txt │ │ │ ├── x46y56.txt │ │ │ ├── x47y56.txt │ │ │ ├── x48y56.txt │ │ │ ├── x49y56.txt │ │ │ ├── x50y56.txt │ │ │ ├── x51y56.txt │ │ │ ├── x52y56.txt │ │ │ ├── x53y56.txt │ │ │ └── x54y56.txt │ │ ├── tower1/ │ │ │ ├── imports/ │ │ │ │ ├── tower (background).txt │ │ │ │ ├── tower (foreground).txt │ │ │ │ └── tower.txt │ │ │ ├── main.cpp │ │ │ └── maps/ │ │ │ ├── tower (background).txt │ │ │ ├── tower (foreground).txt │ │ │ └── tower.txt │ │ └── tower2/ │ │ ├── imports/ │ │ │ ├── tower (background).txt │ │ │ ├── tower (foreground).txt │ │ │ └── tower.txt │ │ ├── main.cpp │ │ └── maps/ │ │ ├── tower (background).txt │ │ ├── tower (foreground).txt │ │ └── tower.txt │ ├── Lab Map Editor/ │ │ ├── imports/ │ │ │ ├── lab/ │ │ │ │ ├── rx50y50.txt │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y53.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y52.txt │ │ │ │ ├── x49y53.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x49y55.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x50y55.txt │ │ │ │ ├── x50y58.txt │ │ │ │ ├── x51y50.txt │ │ │ │ ├── x51y51.txt │ │ │ │ ├── x51y52.txt │ │ │ │ ├── x51y53.txt │ │ │ │ ├── x51y54.txt │ │ │ │ ├── x51y55.txt │ │ │ │ ├── x51y58.txt │ │ │ │ ├── x52y50.txt │ │ │ │ ├── x52y51.txt │ │ │ │ ├── x52y52.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x52y54.txt │ │ │ │ ├── x52y55.txt │ │ │ │ ├── x52y56.txt │ │ │ │ ├── x52y57.txt │ │ │ │ ├── x52y58.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y54.txt │ │ │ │ ├── x53y55.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y54.txt │ │ │ │ ├── x54y55.txt │ │ │ │ ├── x55y49.txt │ │ │ │ ├── x55y50.txt │ │ │ │ ├── x55y51.txt │ │ │ │ ├── x55y52.txt │ │ │ │ ├── x55y53.txt │ │ │ │ └── x55y54.txt │ │ │ ├── otherlevel/ │ │ │ │ ├── x1y1.txt │ │ │ │ ├── x50y49.txt │ │ │ │ └── x50y50.txt │ │ │ └── spacestation/ │ │ │ ├── x49y48.txt │ │ │ ├── x49y49.txt │ │ │ ├── x49y50.txt │ │ │ ├── x49y51.txt │ │ │ ├── x49y52.txt │ │ │ ├── x50y48.txt │ │ │ ├── x50y50.txt │ │ │ ├── x50y51.txt │ │ │ ├── x50y52.txt │ │ │ ├── x51y47.txt │ │ │ ├── x51y48.txt │ │ │ ├── x51y49.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x51y53.txt │ │ │ ├── x51y54.txt │ │ │ ├── x52y48.txt │ │ │ ├── x52y49.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x53y47.txt │ │ │ ├── x53y48.txt │ │ │ ├── x53y49.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ └── x53y52.txt │ │ ├── main.cpp │ │ └── maps/ │ │ └── lab/ │ │ ├── x48y52.txt │ │ ├── x48y53.txt │ │ ├── x49y51.txt │ │ ├── x49y52.txt │ │ ├── x49y53.txt │ │ ├── x49y54.txt │ │ ├── x49y55.txt │ │ ├── x50y50.txt │ │ ├── x50y51.txt │ │ ├── x50y52.txt │ │ ├── x50y53.txt │ │ ├── x50y54.txt │ │ ├── x50y55.txt │ │ ├── x50y58.txt │ │ ├── x51y50.txt │ │ ├── x51y51.txt │ │ ├── x51y52.txt │ │ ├── x51y53.txt │ │ ├── x51y54.txt │ │ ├── x51y55.txt │ │ ├── x51y58.txt │ │ ├── x52y50.txt │ │ ├── x52y51.txt │ │ ├── x52y52.txt │ │ ├── x52y53.txt │ │ ├── x52y54.txt │ │ ├── x52y55.txt │ │ ├── x52y56.txt │ │ ├── x52y57.txt │ │ ├── x52y58.txt │ │ ├── x53y50.txt │ │ ├── x53y51.txt │ │ ├── x53y54.txt │ │ ├── x53y55.txt │ │ ├── x54y50.txt │ │ ├── x54y51.txt │ │ ├── x54y54.txt │ │ ├── x54y55.txt │ │ ├── x55y49.txt │ │ ├── x55y50.txt │ │ ├── x55y51.txt │ │ ├── x55y52.txt │ │ ├── x55y53.txt │ │ └── x55y54.txt │ ├── Level Mapping Editor/ │ │ ├── import.txt │ │ ├── lab/ │ │ │ ├── import.txt │ │ │ └── output.txt │ │ ├── main.cpp │ │ ├── output.txt │ │ ├── space station/ │ │ │ ├── import.txt │ │ │ └── output.txt │ │ └── warpzone/ │ │ ├── import.txt │ │ └── output.txt │ ├── Original Space Station Map Editor/ │ │ ├── imports/ │ │ │ └── spacestation/ │ │ │ ├── x49y48.txt │ │ │ ├── x49y49.txt │ │ │ ├── x49y50.txt │ │ │ ├── x49y51.txt │ │ │ ├── x49y52.txt │ │ │ ├── x50y48.txt │ │ │ ├── x50y50.txt │ │ │ ├── x50y51.txt │ │ │ ├── x50y52.txt │ │ │ ├── x51y47.txt │ │ │ ├── x51y48.txt │ │ │ ├── x51y49.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x51y53.txt │ │ │ ├── x51y54.txt │ │ │ ├── x52y48.txt │ │ │ ├── x52y49.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x53y47.txt │ │ │ ├── x53y48.txt │ │ │ ├── x53y49.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ └── x53y52.txt │ │ ├── main.cpp │ │ └── maps/ │ │ └── spacestation/ │ │ ├── x49y48.txt │ │ ├── x49y49.txt │ │ ├── x49y50.txt │ │ ├── x49y51.txt │ │ ├── x49y52.txt │ │ ├── x50y48.txt │ │ ├── x50y50.txt │ │ ├── x50y51.txt │ │ ├── x50y52.txt │ │ ├── x51y47.txt │ │ ├── x51y48.txt │ │ ├── x51y49.txt │ │ ├── x51y50.txt │ │ ├── x51y51.txt │ │ ├── x51y52.txt │ │ ├── x51y53.txt │ │ ├── x51y54.txt │ │ ├── x52y48.txt │ │ ├── x52y49.txt │ │ ├── x52y50.txt │ │ ├── x52y51.txt │ │ ├── x52y52.txt │ │ ├── x53y47.txt │ │ ├── x53y48.txt │ │ ├── x53y49.txt │ │ ├── x53y50.txt │ │ ├── x53y51.txt │ │ └── x53y52.txt │ ├── Other Map Editor/ │ │ ├── imports/ │ │ │ └── otherlevel/ │ │ │ ├── x1y1.txt │ │ │ ├── x46y49.txt │ │ │ ├── x47y49.txt │ │ │ ├── x48y49.txt │ │ │ ├── x48y50.txt │ │ │ ├── x48y51.txt │ │ │ ├── x49y49.txt │ │ │ ├── x49y50.txt │ │ │ ├── x50y50.txt │ │ │ └── x51y50.txt │ │ ├── main.cpp │ │ └── maps/ │ │ └── otherlevel/ │ │ ├── x1y1.txt │ │ ├── x46y49.txt │ │ ├── x47y49.txt │ │ ├── x48y49.txt │ │ ├── x48y50.txt │ │ ├── x48y51.txt │ │ ├── x49y49.txt │ │ ├── x49y50.txt │ │ ├── x50y50.txt │ │ └── x51y50.txt │ ├── Screenshot Outputting Map Editor/ │ │ ├── imports/ │ │ │ ├── final/ │ │ │ │ ├── x41y51.txt │ │ │ │ ├── x41y52.txt │ │ │ │ ├── x41y56.txt │ │ │ │ ├── x42y51.txt │ │ │ │ ├── x42y52.txt │ │ │ │ ├── x42y56.txt │ │ │ │ ├── x43y51.txt │ │ │ │ ├── x43y52.txt │ │ │ │ ├── x44y51.txt │ │ │ │ ├── x44y52.txt │ │ │ │ ├── x45y51.txt │ │ │ │ ├── x45y52.txt │ │ │ │ ├── x46y51.txt │ │ │ │ ├── x46y54.txt │ │ │ │ ├── x47y51.txt │ │ │ │ ├── x47y52.txt │ │ │ │ ├── x47y54.txt │ │ │ │ ├── x48y51.txt │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y54.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x53y48.txt │ │ │ │ ├── x53y49.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y52.txt │ │ │ │ ├── x53y53.txt │ │ │ │ ├── x54y48.txt │ │ │ │ ├── x54y49.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y52.txt │ │ │ │ └── x54y53.txt │ │ │ ├── intermission/ │ │ │ │ ├── x41y56.txt │ │ │ │ ├── x42y56.txt │ │ │ │ ├── x43y56.txt │ │ │ │ ├── x44y56.txt │ │ │ │ ├── x45y56.txt │ │ │ │ ├── x46y56.txt │ │ │ │ ├── x47y56.txt │ │ │ │ ├── x48y56.txt │ │ │ │ ├── x49y56.txt │ │ │ │ ├── x50y56.txt │ │ │ │ ├── x51y56.txt │ │ │ │ ├── x52y56.txt │ │ │ │ ├── x53y56.txt │ │ │ │ └── x54y56.txt │ │ │ ├── lab/ │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y53.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y52.txt │ │ │ │ ├── x49y53.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x49y55.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x50y55.txt │ │ │ │ ├── x51y50.txt │ │ │ │ ├── x51y51.txt │ │ │ │ ├── x51y52.txt │ │ │ │ ├── x51y53.txt │ │ │ │ ├── x51y54.txt │ │ │ │ ├── x51y55.txt │ │ │ │ ├── x52y50.txt │ │ │ │ ├── x52y51.txt │ │ │ │ ├── x52y52.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x52y54.txt │ │ │ │ ├── x52y55.txt │ │ │ │ ├── x52y56.txt │ │ │ │ ├── x52y57.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y54.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y54.txt │ │ │ │ ├── x55y50.txt │ │ │ │ ├── x55y51.txt │ │ │ │ ├── x55y52.txt │ │ │ │ ├── x55y53.txt │ │ │ │ └── x55y54.txt │ │ │ ├── otherlevel/ │ │ │ │ ├── x1y1.txt │ │ │ │ ├── x46y49.txt │ │ │ │ ├── x47y49.txt │ │ │ │ ├── x48y49.txt │ │ │ │ ├── x48y50.txt │ │ │ │ ├── x48y51.txt │ │ │ │ ├── x49y49.txt │ │ │ │ ├── x49y50.txt │ │ │ │ ├── x50y50.txt │ │ │ │ └── x51y50.txt │ │ │ ├── spacestation2/ │ │ │ │ ├── x48y41.txt │ │ │ │ ├── x48y42.txt │ │ │ │ ├── x48y43.txt │ │ │ │ ├── x49y41.txt │ │ │ │ ├── x49y42.txt │ │ │ │ ├── x49y43.txt │ │ │ │ ├── x49y47.txt │ │ │ │ ├── x49y48.txt │ │ │ │ ├── x49y49.txt │ │ │ │ ├── x49y50.txt │ │ │ │ ├── x50y39.txt │ │ │ │ ├── x50y40.txt │ │ │ │ ├── x50y41.txt │ │ │ │ ├── x50y42.txt │ │ │ │ ├── x50y43.txt │ │ │ │ ├── x50y47.txt │ │ │ │ ├── x50y48.txt │ │ │ │ ├── x50y49.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x51y39.txt │ │ │ │ ├── x51y40.txt │ │ │ │ ├── x51y41.txt │ │ │ │ ├── x51y42.txt │ │ │ │ ├── x51y43.txt │ │ │ │ ├── x51y44.txt │ │ │ │ ├── x51y45.txt │ │ │ │ ├── x51y46.txt │ │ │ │ ├── x51y47.txt │ │ │ │ ├── x51y48.txt │ │ │ │ ├── x51y49.txt │ │ │ │ ├── x52y39.txt │ │ │ │ ├── x52y40.txt │ │ │ │ ├── x52y41.txt │ │ │ │ ├── x52y42.txt │ │ │ │ ├── x52y43.txt │ │ │ │ ├── x52y44.txt │ │ │ │ ├── x52y45.txt │ │ │ │ ├── x52y46.txt │ │ │ │ ├── x52y47.txt │ │ │ │ ├── x52y48.txt │ │ │ │ ├── x52y49.txt │ │ │ │ ├── x53y39.txt │ │ │ │ ├── x53y40.txt │ │ │ │ ├── x53y41.txt │ │ │ │ ├── x53y42.txt │ │ │ │ ├── x53y43.txt │ │ │ │ ├── x53y44.txt │ │ │ │ ├── x53y45.txt │ │ │ │ ├── x53y46.txt │ │ │ │ ├── x53y47.txt │ │ │ │ ├── x53y48.txt │ │ │ │ ├── x53y49.txt │ │ │ │ ├── x54y42.txt │ │ │ │ ├── x54y43.txt │ │ │ │ ├── x54y44.txt │ │ │ │ ├── x54y45.txt │ │ │ │ ├── x54y46.txt │ │ │ │ ├── x54y47.txt │ │ │ │ ├── x54y48.txt │ │ │ │ ├── x54y49.txt │ │ │ │ ├── x55y43.txt │ │ │ │ ├── x55y44.txt │ │ │ │ ├── x55y45.txt │ │ │ │ ├── x55y46.txt │ │ │ │ ├── x55y47.txt │ │ │ │ ├── x56y43.txt │ │ │ │ ├── x56y44.txt │ │ │ │ ├── x56y45.txt │ │ │ │ ├── x56y46.txt │ │ │ │ ├── x56y47.txt │ │ │ │ ├── x56y48.txt │ │ │ │ ├── x56y49.txt │ │ │ │ └── x56y50.txt │ │ │ └── warp/ │ │ │ ├── old/ │ │ │ │ ├── x50y50.txt │ │ │ │ └── x54y50.txt │ │ │ ├── x49y49.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y49.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x52y49.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x53y49.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y52.txt │ │ │ ├── x54y49.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y52.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ └── x55y52.txt │ │ ├── main.cpp │ │ └── maps/ │ │ └── warp/ │ │ ├── old/ │ │ │ ├── x50y50.txt │ │ │ └── x54y50.txt │ │ ├── x49y49.txt │ │ ├── x50y49.txt │ │ ├── x50y50.txt │ │ ├── x51y49.txt │ │ ├── x51y50.txt │ │ ├── x51y51.txt │ │ ├── x51y52.txt │ │ ├── x52y49.txt │ │ ├── x52y50.txt │ │ ├── x52y51.txt │ │ ├── x52y52.txt │ │ ├── x53y49.txt │ │ ├── x53y50.txt │ │ ├── x53y51.txt │ │ ├── x53y52.txt │ │ ├── x54y49.txt │ │ ├── x54y50.txt │ │ ├── x54y51.txt │ │ ├── x54y52.txt │ │ ├── x55y49.txt │ │ ├── x55y50.txt │ │ ├── x55y51.txt │ │ └── x55y52.txt │ ├── Space Station 2 Editor/ │ │ ├── imports/ │ │ │ └── spacestation2/ │ │ │ ├── x48y41.txt │ │ │ ├── x48y42.txt │ │ │ ├── x48y43.txt │ │ │ ├── x49y41.txt │ │ │ ├── x49y42.txt │ │ │ ├── x49y43.txt │ │ │ ├── x49y47.txt │ │ │ ├── x49y48.txt │ │ │ ├── x49y49.txt │ │ │ ├── x49y50.txt │ │ │ ├── x50y39.txt │ │ │ ├── x50y40.txt │ │ │ ├── x50y41.txt │ │ │ ├── x50y42.txt │ │ │ ├── x50y43.txt │ │ │ ├── x50y47.txt │ │ │ ├── x50y48.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y39.txt │ │ │ ├── x51y40.txt │ │ │ ├── x51y41.txt │ │ │ ├── x51y42.txt │ │ │ ├── x51y43.txt │ │ │ ├── x51y44.txt │ │ │ ├── x51y45.txt │ │ │ ├── x51y46.txt │ │ │ ├── x51y47.txt │ │ │ ├── x51y48.txt │ │ │ ├── x51y49.txt │ │ │ ├── x52y39.txt │ │ │ ├── x52y40.txt │ │ │ ├── x52y41.txt │ │ │ ├── x52y42.txt │ │ │ ├── x52y43.txt │ │ │ ├── x52y44.txt │ │ │ ├── x52y45.txt │ │ │ ├── x52y46.txt │ │ │ ├── x52y47.txt │ │ │ ├── x52y48.txt │ │ │ ├── x52y49.txt │ │ │ ├── x53y39.txt │ │ │ ├── x53y40.txt │ │ │ ├── x53y41.txt │ │ │ ├── x53y42.txt │ │ │ ├── x53y43.txt │ │ │ ├── x53y44.txt │ │ │ ├── x53y45.txt │ │ │ ├── x53y46.txt │ │ │ ├── x53y47.txt │ │ │ ├── x53y48.txt │ │ │ ├── x53y49.txt │ │ │ ├── x54y42.txt │ │ │ ├── x54y43.txt │ │ │ ├── x54y44.txt │ │ │ ├── x54y45.txt │ │ │ ├── x54y46.txt │ │ │ ├── x54y47.txt │ │ │ ├── x54y48.txt │ │ │ ├── x54y49.txt │ │ │ ├── x55y43.txt │ │ │ ├── x55y44.txt │ │ │ ├── x55y45.txt │ │ │ ├── x55y46.txt │ │ │ ├── x55y47.txt │ │ │ ├── x56y43.txt │ │ │ ├── x56y44.txt │ │ │ ├── x56y45.txt │ │ │ ├── x56y46.txt │ │ │ ├── x56y47.txt │ │ │ ├── x56y48.txt │ │ │ ├── x56y49.txt │ │ │ └── x56y50.txt │ │ ├── main.cpp │ │ └── maps/ │ │ └── spacestation2/ │ │ ├── x48y41.txt │ │ ├── x48y42.txt │ │ ├── x48y43.txt │ │ ├── x49y41.txt │ │ ├── x49y42.txt │ │ ├── x49y43.txt │ │ ├── x49y47.txt │ │ ├── x49y48.txt │ │ ├── x49y49.txt │ │ ├── x49y50.txt │ │ ├── x50y39.txt │ │ ├── x50y40.txt │ │ ├── x50y41.txt │ │ ├── x50y42.txt │ │ ├── x50y43.txt │ │ ├── x50y47.txt │ │ ├── x50y48.txt │ │ ├── x50y49.txt │ │ ├── x50y50.txt │ │ ├── x51y39.txt │ │ ├── x51y40.txt │ │ ├── x51y41.txt │ │ ├── x51y42.txt │ │ ├── x51y43.txt │ │ ├── x51y44.txt │ │ ├── x51y45.txt │ │ ├── x51y46.txt │ │ ├── x51y47.txt │ │ ├── x51y48.txt │ │ ├── x51y49.txt │ │ ├── x52y39.txt │ │ ├── x52y40.txt │ │ ├── x52y41.txt │ │ ├── x52y42.txt │ │ ├── x52y43.txt │ │ ├── x52y44.txt │ │ ├── x52y45.txt │ │ ├── x52y46.txt │ │ ├── x52y47.txt │ │ ├── x52y48.txt │ │ ├── x52y49.txt │ │ ├── x53y39.txt │ │ ├── x53y40.txt │ │ ├── x53y41.txt │ │ ├── x53y42.txt │ │ ├── x53y43.txt │ │ ├── x53y44.txt │ │ ├── x53y45.txt │ │ ├── x53y46.txt │ │ ├── x53y47.txt │ │ ├── x53y48.txt │ │ ├── x53y49.txt │ │ ├── x54y42.txt │ │ ├── x54y43.txt │ │ ├── x54y44.txt │ │ ├── x54y45.txt │ │ ├── x54y46.txt │ │ ├── x54y47.txt │ │ ├── x54y48.txt │ │ ├── x54y49.txt │ │ ├── x55y43.txt │ │ ├── x55y44.txt │ │ ├── x55y45.txt │ │ ├── x55y46.txt │ │ ├── x55y47.txt │ │ ├── x56y43.txt │ │ ├── x56y44.txt │ │ ├── x56y45.txt │ │ ├── x56y46.txt │ │ ├── x56y47.txt │ │ ├── x56y48.txt │ │ ├── x56y49.txt │ │ └── x56y50.txt │ ├── Tower Map Editor/ │ │ ├── imports/ │ │ │ ├── tower (background).txt │ │ │ ├── tower (foreground).txt │ │ │ └── tower.txt │ │ ├── main.cpp │ │ └── maps/ │ │ ├── tower (background).txt │ │ ├── tower (foreground).txt │ │ └── tower.txt │ ├── Towerhallways Editor/ │ │ ├── imports/ │ │ │ └── towerhallway/ │ │ │ ├── x50y50.txt │ │ │ ├── x52y50.txt │ │ │ └── x53y50.txt │ │ ├── main.cpp │ │ └── maps/ │ │ └── towerhallway/ │ │ ├── x50y50.txt │ │ ├── x52y50.txt │ │ └── x53y50.txt │ ├── Warp Zone Map Editor/ │ │ ├── imports/ │ │ │ └── warp/ │ │ │ ├── old/ │ │ │ │ ├── x50y50.txt │ │ │ │ └── x54y50.txt │ │ │ ├── x49y49.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x50y51.txt │ │ │ ├── x51y49.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x52y49.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x53y49.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y52.txt │ │ │ ├── x54y49.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y52.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ └── x55y52.txt │ │ ├── main.cpp │ │ └── maps/ │ │ └── warp/ │ │ ├── old/ │ │ │ ├── x50y50.txt │ │ │ └── x54y50.txt │ │ ├── x49y49.txt │ │ ├── x50y49.txt │ │ ├── x50y50.txt │ │ ├── x50y51.txt │ │ ├── x51y49.txt │ │ ├── x51y50.txt │ │ ├── x51y51.txt │ │ ├── x52y49.txt │ │ ├── x52y50.txt │ │ ├── x52y51.txt │ │ ├── x52y52.txt │ │ ├── x53y49.txt │ │ ├── x53y50.txt │ │ ├── x53y51.txt │ │ ├── x53y52.txt │ │ ├── x54y49.txt │ │ ├── x54y50.txt │ │ ├── x54y51.txt │ │ ├── x54y52.txt │ │ ├── x55y49.txt │ │ ├── x55y50.txt │ │ ├── x55y51.txt │ │ └── x55y52.txt │ ├── World Map Fork (for Eurogamer)/ │ │ ├── areamap.txt │ │ ├── areamapin.txt │ │ ├── backup/ │ │ │ └── imports/ │ │ │ ├── lab/ │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y53.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y52.txt │ │ │ │ ├── x49y53.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x49y55.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x50y55.txt │ │ │ │ ├── x50y58.txt │ │ │ │ ├── x51y50.txt │ │ │ │ ├── x51y51.txt │ │ │ │ ├── x51y52.txt │ │ │ │ ├── x51y53.txt │ │ │ │ ├── x51y54.txt │ │ │ │ ├── x51y55.txt │ │ │ │ ├── x51y58.txt │ │ │ │ ├── x52y50.txt │ │ │ │ ├── x52y51.txt │ │ │ │ ├── x52y52.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x52y54.txt │ │ │ │ ├── x52y55.txt │ │ │ │ ├── x52y56.txt │ │ │ │ ├── x52y57.txt │ │ │ │ ├── x52y58.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y54.txt │ │ │ │ ├── x53y55.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y54.txt │ │ │ │ ├── x54y55.txt │ │ │ │ ├── x55y49.txt │ │ │ │ ├── x55y50.txt │ │ │ │ ├── x55y51.txt │ │ │ │ ├── x55y52.txt │ │ │ │ ├── x55y53.txt │ │ │ │ └── x55y54.txt │ │ │ ├── other/ │ │ │ │ ├── x100y100.txt │ │ │ │ ├── x100y101.txt │ │ │ │ ├── x100y102.txt │ │ │ │ ├── x100y103.txt │ │ │ │ ├── x100y104.txt │ │ │ │ ├── x100y105.txt │ │ │ │ ├── x100y106.txt │ │ │ │ ├── x100y107.txt │ │ │ │ ├── x100y108.txt │ │ │ │ ├── x100y109.txt │ │ │ │ ├── x100y110.txt │ │ │ │ ├── x100y112.txt │ │ │ │ ├── x100y113.txt │ │ │ │ ├── x100y114.txt │ │ │ │ ├── x100y115.txt │ │ │ │ ├── x100y116.txt │ │ │ │ ├── x101y102.txt │ │ │ │ ├── x101y103.txt │ │ │ │ ├── x101y104.txt │ │ │ │ ├── x101y105.txt │ │ │ │ ├── x101y106.txt │ │ │ │ ├── x101y108.txt │ │ │ │ ├── x101y109.txt │ │ │ │ ├── x101y110.txt │ │ │ │ ├── x101y112.txt │ │ │ │ ├── x101y113.txt │ │ │ │ ├── x101y114.txt │ │ │ │ ├── x101y115.txt │ │ │ │ ├── x101y116.txt │ │ │ │ ├── x102y102.txt │ │ │ │ ├── x102y103.txt │ │ │ │ ├── x102y105.txt │ │ │ │ ├── x102y106.txt │ │ │ │ ├── x102y108.txt │ │ │ │ ├── x102y109.txt │ │ │ │ ├── x102y110.txt │ │ │ │ ├── x102y111.txt │ │ │ │ ├── x102y112.txt │ │ │ │ ├── x102y113.txt │ │ │ │ ├── x102y114.txt │ │ │ │ ├── x102y115.txt │ │ │ │ ├── x103y102.txt │ │ │ │ ├── x103y103.txt │ │ │ │ ├── x103y105.txt │ │ │ │ ├── x103y106.txt │ │ │ │ ├── x103y107.txt │ │ │ │ ├── x103y108.txt │ │ │ │ ├── x103y109.txt │ │ │ │ ├── x103y110.txt │ │ │ │ ├── x103y111.txt │ │ │ │ ├── x103y112.txt │ │ │ │ ├── x103y113.txt │ │ │ │ ├── x103y115.txt │ │ │ │ ├── x104y105.txt │ │ │ │ ├── x104y107.txt │ │ │ │ ├── x104y109.txt │ │ │ │ ├── x104y110.txt │ │ │ │ ├── x104y111.txt │ │ │ │ ├── x104y112.txt │ │ │ │ ├── x104y113.txt │ │ │ │ ├── x104y114.txt │ │ │ │ ├── x104y115.txt │ │ │ │ ├── x105y102.txt │ │ │ │ ├── x105y103.txt │ │ │ │ ├── x105y104.txt │ │ │ │ ├── x105y105.txt │ │ │ │ ├── x105y106.txt │ │ │ │ ├── x105y107.txt │ │ │ │ ├── x105y108.txt │ │ │ │ ├── x105y109.txt │ │ │ │ ├── x105y110.txt │ │ │ │ ├── x105y111.txt │ │ │ │ ├── x105y112.txt │ │ │ │ ├── x105y113.txt │ │ │ │ ├── x105y114.txt │ │ │ │ ├── x106y102.txt │ │ │ │ ├── x106y104.txt │ │ │ │ ├── x106y105.txt │ │ │ │ ├── x106y106.txt │ │ │ │ ├── x106y107.txt │ │ │ │ ├── x106y108.txt │ │ │ │ ├── x106y109.txt │ │ │ │ ├── x106y110.txt │ │ │ │ ├── x106y111.txt │ │ │ │ ├── x106y112.txt │ │ │ │ ├── x106y113.txt │ │ │ │ ├── x106y114.txt │ │ │ │ ├── x107y102.txt │ │ │ │ ├── x107y103.txt │ │ │ │ ├── x107y104.txt │ │ │ │ ├── x107y105.txt │ │ │ │ ├── x107y106.txt │ │ │ │ ├── x107y107.txt │ │ │ │ ├── x107y108.txt │ │ │ │ ├── x107y109.txt │ │ │ │ ├── x107y111.txt │ │ │ │ ├── x107y114.txt │ │ │ │ ├── x108y100.txt │ │ │ │ ├── x108y101.txt │ │ │ │ ├── x108y102.txt │ │ │ │ ├── x108y103.txt │ │ │ │ ├── x108y104.txt │ │ │ │ ├── x108y105.txt │ │ │ │ ├── x108y111.txt │ │ │ │ ├── x108y112.txt │ │ │ │ ├── x108y113.txt │ │ │ │ ├── x108y114.txt │ │ │ │ ├── x108y115.txt │ │ │ │ ├── x108y116.txt │ │ │ │ ├── x108y117.txt │ │ │ │ ├── x108y118.txt │ │ │ │ ├── x108y119.txt │ │ │ │ ├── x110y100.txt │ │ │ │ ├── x110y101.txt │ │ │ │ ├── x110y102.txt │ │ │ │ ├── x110y103.txt │ │ │ │ ├── x110y117.txt │ │ │ │ ├── x110y118.txt │ │ │ │ ├── x110y119.txt │ │ │ │ ├── x111y100.txt │ │ │ │ ├── x111y101.txt │ │ │ │ ├── x111y102.txt │ │ │ │ ├── x111y103.txt │ │ │ │ ├── x111y117.txt │ │ │ │ ├── x111y118.txt │ │ │ │ ├── x111y119.txt │ │ │ │ ├── x112y100.txt │ │ │ │ ├── x112y101.txt │ │ │ │ ├── x112y102.txt │ │ │ │ ├── x112y117.txt │ │ │ │ ├── x112y118.txt │ │ │ │ ├── x112y119.txt │ │ │ │ ├── x113y101.txt │ │ │ │ ├── x113y102.txt │ │ │ │ ├── x113y117.txt │ │ │ │ ├── x113y118.txt │ │ │ │ ├── x113y119.txt │ │ │ │ ├── x114y117.txt │ │ │ │ ├── x116y104.txt │ │ │ │ ├── x117y104.txt │ │ │ │ ├── x117y105.txt │ │ │ │ ├── x118y104.txt │ │ │ │ ├── x118y105.txt │ │ │ │ ├── x119y104.txt │ │ │ │ ├── x119y105.txt │ │ │ │ ├── x119y109.txt │ │ │ │ ├── x119y110.txt │ │ │ │ ├── x119y112.txt │ │ │ │ └── x119y113.txt │ │ │ ├── spacestation2/ │ │ │ │ ├── x48y41.txt │ │ │ │ ├── x48y42.txt │ │ │ │ ├── x48y43.txt │ │ │ │ ├── x49y41.txt │ │ │ │ ├── x49y42.txt │ │ │ │ ├── x49y43.txt │ │ │ │ ├── x49y47.txt │ │ │ │ ├── x49y48.txt │ │ │ │ ├── x49y49.txt │ │ │ │ ├── x49y50.txt │ │ │ │ ├── x50y39.txt │ │ │ │ ├── x50y40.txt │ │ │ │ ├── x50y41.txt │ │ │ │ ├── x50y42.txt │ │ │ │ ├── x50y43.txt │ │ │ │ ├── x50y47.txt │ │ │ │ ├── x50y48.txt │ │ │ │ ├── x50y49.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x51y39.txt │ │ │ │ ├── x51y40.txt │ │ │ │ ├── x51y41.txt │ │ │ │ ├── x51y42.txt │ │ │ │ ├── x51y43.txt │ │ │ │ ├── x51y44.txt │ │ │ │ ├── x51y45.txt │ │ │ │ ├── x51y46.txt │ │ │ │ ├── x51y47.txt │ │ │ │ ├── x51y48.txt │ │ │ │ ├── x51y49.txt │ │ │ │ ├── x52y39.txt │ │ │ │ ├── x52y40.txt │ │ │ │ ├── x52y41.txt │ │ │ │ ├── x52y42.txt │ │ │ │ ├── x52y43.txt │ │ │ │ ├── x52y44.txt │ │ │ │ ├── x52y45.txt │ │ │ │ ├── x52y46.txt │ │ │ │ ├── x52y47.txt │ │ │ │ ├── x52y48.txt │ │ │ │ ├── x52y49.txt │ │ │ │ ├── x53y39.txt │ │ │ │ ├── x53y40.txt │ │ │ │ ├── x53y41.txt │ │ │ │ ├── x53y42.txt │ │ │ │ ├── x53y43.txt │ │ │ │ ├── x53y44.txt │ │ │ │ ├── x53y45.txt │ │ │ │ ├── x53y46.txt │ │ │ │ ├── x53y47.txt │ │ │ │ ├── x53y48.txt │ │ │ │ ├── x53y49.txt │ │ │ │ ├── x54y42.txt │ │ │ │ ├── x54y43.txt │ │ │ │ ├── x54y44.txt │ │ │ │ ├── x54y45.txt │ │ │ │ ├── x54y46.txt │ │ │ │ ├── x54y47.txt │ │ │ │ ├── x54y48.txt │ │ │ │ ├── x54y49.txt │ │ │ │ ├── x55y43.txt │ │ │ │ ├── x55y44.txt │ │ │ │ ├── x55y45.txt │ │ │ │ ├── x55y46.txt │ │ │ │ ├── x55y47.txt │ │ │ │ ├── x56y43.txt │ │ │ │ ├── x56y44.txt │ │ │ │ ├── x56y45.txt │ │ │ │ ├── x56y46.txt │ │ │ │ ├── x56y47.txt │ │ │ │ ├── x56y48.txt │ │ │ │ ├── x56y49.txt │ │ │ │ └── x56y50.txt │ │ │ └── warp/ │ │ │ ├── old/ │ │ │ │ ├── x50y50.txt │ │ │ │ └── x54y50.txt │ │ │ ├── x49y49.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y49.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x52y49.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x53y49.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y52.txt │ │ │ ├── x54y49.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y52.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ └── x55y52.txt │ │ ├── imports/ │ │ │ ├── lab/ │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y53.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y52.txt │ │ │ │ ├── x49y53.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x49y55.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x50y55.txt │ │ │ │ ├── x50y58.txt │ │ │ │ ├── x51y50.txt │ │ │ │ ├── x51y51.txt │ │ │ │ ├── x51y52.txt │ │ │ │ ├── x51y53.txt │ │ │ │ ├── x51y54.txt │ │ │ │ ├── x51y55.txt │ │ │ │ ├── x51y58.txt │ │ │ │ ├── x52y50.txt │ │ │ │ ├── x52y51.txt │ │ │ │ ├── x52y52.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x52y54.txt │ │ │ │ ├── x52y55.txt │ │ │ │ ├── x52y56.txt │ │ │ │ ├── x52y57.txt │ │ │ │ ├── x52y58.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y54.txt │ │ │ │ ├── x53y55.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y54.txt │ │ │ │ ├── x54y55.txt │ │ │ │ ├── x55y49.txt │ │ │ │ ├── x55y50.txt │ │ │ │ ├── x55y51.txt │ │ │ │ ├── x55y52.txt │ │ │ │ ├── x55y53.txt │ │ │ │ └── x55y54.txt │ │ │ ├── other/ │ │ │ │ ├── x100y100.txt │ │ │ │ ├── x100y101.txt │ │ │ │ ├── x100y102.txt │ │ │ │ ├── x100y103.txt │ │ │ │ ├── x100y104.txt │ │ │ │ ├── x100y105.txt │ │ │ │ ├── x100y106.txt │ │ │ │ ├── x100y107.txt │ │ │ │ ├── x100y108.txt │ │ │ │ ├── x100y109.txt │ │ │ │ ├── x100y110.txt │ │ │ │ ├── x100y111.txt │ │ │ │ ├── x100y112.txt │ │ │ │ ├── x100y113.txt │ │ │ │ ├── x100y114.txt │ │ │ │ ├── x100y115.txt │ │ │ │ ├── x100y116.txt │ │ │ │ ├── x100y117.txt │ │ │ │ ├── x101y102.txt │ │ │ │ ├── x101y103.txt │ │ │ │ ├── x101y104.txt │ │ │ │ ├── x101y105.txt │ │ │ │ ├── x101y106.txt │ │ │ │ ├── x101y108.txt │ │ │ │ ├── x101y109.txt │ │ │ │ ├── x101y110.txt │ │ │ │ ├── x101y111.txt │ │ │ │ ├── x101y112.txt │ │ │ │ ├── x101y113.txt │ │ │ │ ├── x101y114.txt │ │ │ │ ├── x101y115.txt │ │ │ │ ├── x101y116.txt │ │ │ │ ├── x102y102.txt │ │ │ │ ├── x102y103.txt │ │ │ │ ├── x102y105.txt │ │ │ │ ├── x102y106.txt │ │ │ │ ├── x102y108.txt │ │ │ │ ├── x102y109.txt │ │ │ │ ├── x102y110.txt │ │ │ │ ├── x102y111.txt │ │ │ │ ├── x102y112.txt │ │ │ │ ├── x102y113.txt │ │ │ │ ├── x102y114.txt │ │ │ │ ├── x102y115.txt │ │ │ │ ├── x103y102.txt │ │ │ │ ├── x103y103.txt │ │ │ │ ├── x103y105.txt │ │ │ │ ├── x103y106.txt │ │ │ │ ├── x103y107.txt │ │ │ │ ├── x103y108.txt │ │ │ │ ├── x103y109.txt │ │ │ │ ├── x103y110.txt │ │ │ │ ├── x103y111.txt │ │ │ │ ├── x103y112.txt │ │ │ │ ├── x103y113.txt │ │ │ │ ├── x103y115.txt │ │ │ │ ├── x104y105.txt │ │ │ │ ├── x104y106.txt │ │ │ │ ├── x104y107.txt │ │ │ │ ├── x104y109.txt │ │ │ │ ├── x104y110.txt │ │ │ │ ├── x104y111.txt │ │ │ │ ├── x104y112.txt │ │ │ │ ├── x104y113.txt │ │ │ │ ├── x104y114.txt │ │ │ │ ├── x104y115.txt │ │ │ │ ├── x105y102.txt │ │ │ │ ├── x105y103.txt │ │ │ │ ├── x105y104.txt │ │ │ │ ├── x105y105.txt │ │ │ │ ├── x105y106.txt │ │ │ │ ├── x105y107.txt │ │ │ │ ├── x105y108.txt │ │ │ │ ├── x105y109.txt │ │ │ │ ├── x105y110.txt │ │ │ │ ├── x105y111.txt │ │ │ │ ├── x105y112.txt │ │ │ │ ├── x105y113.txt │ │ │ │ ├── x105y114.txt │ │ │ │ ├── x105y115.txt │ │ │ │ ├── x105y118.txt │ │ │ │ ├── x105y119.txt │ │ │ │ ├── x106y102.txt │ │ │ │ ├── x106y104.txt │ │ │ │ ├── x106y105.txt │ │ │ │ ├── x106y106.txt │ │ │ │ ├── x106y107.txt │ │ │ │ ├── x106y108.txt │ │ │ │ ├── x106y109.txt │ │ │ │ ├── x106y110.txt │ │ │ │ ├── x106y111.txt │ │ │ │ ├── x106y112.txt │ │ │ │ ├── x106y113.txt │ │ │ │ ├── x106y114.txt │ │ │ │ ├── x106y115.txt │ │ │ │ ├── x106y118.txt │ │ │ │ ├── x106y119.txt │ │ │ │ ├── x107y101.txt │ │ │ │ ├── x107y102.txt │ │ │ │ ├── x107y103.txt │ │ │ │ ├── x107y104.txt │ │ │ │ ├── x107y105.txt │ │ │ │ ├── x107y106.txt │ │ │ │ ├── x107y107.txt │ │ │ │ ├── x107y108.txt │ │ │ │ ├── x107y109.txt │ │ │ │ ├── x107y110.txt │ │ │ │ ├── x107y111.txt │ │ │ │ ├── x107y112.txt │ │ │ │ ├── x107y114.txt │ │ │ │ ├── x108y100.txt │ │ │ │ ├── x108y101.txt │ │ │ │ ├── x108y102.txt │ │ │ │ ├── x108y103.txt │ │ │ │ ├── x108y104.txt │ │ │ │ ├── x108y105.txt │ │ │ │ ├── x108y106.txt │ │ │ │ ├── x108y107.txt │ │ │ │ ├── x108y108.txt │ │ │ │ ├── x108y110.txt │ │ │ │ ├── x108y111.txt │ │ │ │ ├── x108y112.txt │ │ │ │ ├── x108y113.txt │ │ │ │ ├── x108y114.txt │ │ │ │ ├── x108y115.txt │ │ │ │ ├── x108y116.txt │ │ │ │ ├── x108y117.txt │ │ │ │ ├── x108y118.txt │ │ │ │ ├── x108y119.txt │ │ │ │ ├── x110y100.txt │ │ │ │ ├── x110y101.txt │ │ │ │ ├── x110y102.txt │ │ │ │ ├── x110y103.txt │ │ │ │ ├── x110y108.txt │ │ │ │ ├── x110y109.txt │ │ │ │ ├── x110y110.txt │ │ │ │ ├── x110y111.txt │ │ │ │ ├── x110y112.txt │ │ │ │ ├── x110y113.txt │ │ │ │ ├── x110y114.txt │ │ │ │ ├── x110y115.txt │ │ │ │ ├── x110y116.txt │ │ │ │ ├── x110y117.txt │ │ │ │ ├── x110y118.txt │ │ │ │ ├── x110y119.txt │ │ │ │ ├── x111y100.txt │ │ │ │ ├── x111y101.txt │ │ │ │ ├── x111y102.txt │ │ │ │ ├── x111y103.txt │ │ │ │ ├── x111y108.txt │ │ │ │ ├── x111y109.txt │ │ │ │ ├── x111y110.txt │ │ │ │ ├── x111y116.txt │ │ │ │ ├── x111y117.txt │ │ │ │ ├── x111y118.txt │ │ │ │ ├── x111y119.txt │ │ │ │ ├── x112y100.txt │ │ │ │ ├── x112y101.txt │ │ │ │ ├── x112y102.txt │ │ │ │ ├── x112y108.txt │ │ │ │ ├── x112y109.txt │ │ │ │ ├── x112y110.txt │ │ │ │ ├── x112y116.txt │ │ │ │ ├── x112y117.txt │ │ │ │ ├── x112y118.txt │ │ │ │ ├── x112y119.txt │ │ │ │ ├── x113y101.txt │ │ │ │ ├── x113y102.txt │ │ │ │ ├── x113y114.txt │ │ │ │ ├── x113y115.txt │ │ │ │ ├── x113y116.txt │ │ │ │ ├── x113y117.txt │ │ │ │ ├── x113y118.txt │ │ │ │ ├── x113y119.txt │ │ │ │ ├── x114y114.txt │ │ │ │ ├── x114y116.txt │ │ │ │ ├── x114y117.txt │ │ │ │ ├── x114y118.txt │ │ │ │ ├── x114y119.txt │ │ │ │ ├── x115y114.txt │ │ │ │ ├── x115y116.txt │ │ │ │ ├── x115y117.txt │ │ │ │ ├── x115y118.txt │ │ │ │ ├── x115y119.txt │ │ │ │ ├── x116y104.txt │ │ │ │ ├── x116y114.txt │ │ │ │ ├── x116y117.txt │ │ │ │ ├── x116y119.txt │ │ │ │ ├── x117y104.txt │ │ │ │ ├── x117y105.txt │ │ │ │ ├── x117y112.txt │ │ │ │ ├── x117y113.txt │ │ │ │ ├── x117y114.txt │ │ │ │ ├── x117y115.txt │ │ │ │ ├── x117y116.txt │ │ │ │ ├── x117y117.txt │ │ │ │ ├── x117y118.txt │ │ │ │ ├── x117y119.txt │ │ │ │ ├── x118y104.txt │ │ │ │ ├── x118y105.txt │ │ │ │ ├── x118y115.txt │ │ │ │ ├── x118y117.txt │ │ │ │ ├── x118y119.txt │ │ │ │ ├── x119y104.txt │ │ │ │ ├── x119y105.txt │ │ │ │ ├── x119y109.txt │ │ │ │ ├── x119y110.txt │ │ │ │ ├── x119y111.txt │ │ │ │ ├── x119y112.txt │ │ │ │ ├── x119y113.txt │ │ │ │ ├── x119y114.txt │ │ │ │ ├── x119y115.txt │ │ │ │ ├── x119y116.txt │ │ │ │ ├── x119y117.txt │ │ │ │ ├── x119y118.txt │ │ │ │ └── x119y119.txt │ │ │ ├── spacestation2/ │ │ │ │ ├── x48y41.txt │ │ │ │ ├── x48y42.txt │ │ │ │ ├── x48y43.txt │ │ │ │ ├── x49y41.txt │ │ │ │ ├── x49y42.txt │ │ │ │ ├── x49y43.txt │ │ │ │ ├── x49y47.txt │ │ │ │ ├── x49y48.txt │ │ │ │ ├── x49y49.txt │ │ │ │ ├── x49y50.txt │ │ │ │ ├── x50y39.txt │ │ │ │ ├── x50y40.txt │ │ │ │ ├── x50y41.txt │ │ │ │ ├── x50y42.txt │ │ │ │ ├── x50y43.txt │ │ │ │ ├── x50y47.txt │ │ │ │ ├── x50y48.txt │ │ │ │ ├── x50y49.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x51y39.txt │ │ │ │ ├── x51y40.txt │ │ │ │ ├── x51y41.txt │ │ │ │ ├── x51y42.txt │ │ │ │ ├── x51y43.txt │ │ │ │ ├── x51y44.txt │ │ │ │ ├── x51y45.txt │ │ │ │ ├── x51y46.txt │ │ │ │ ├── x51y47.txt │ │ │ │ ├── x51y48.txt │ │ │ │ ├── x51y49.txt │ │ │ │ ├── x52y39.txt │ │ │ │ ├── x52y40.txt │ │ │ │ ├── x52y41.txt │ │ │ │ ├── x52y42.txt │ │ │ │ ├── x52y43.txt │ │ │ │ ├── x52y44.txt │ │ │ │ ├── x52y45.txt │ │ │ │ ├── x52y46.txt │ │ │ │ ├── x52y47.txt │ │ │ │ ├── x52y48.txt │ │ │ │ ├── x52y49.txt │ │ │ │ ├── x53y39.txt │ │ │ │ ├── x53y40.txt │ │ │ │ ├── x53y41.txt │ │ │ │ ├── x53y42.txt │ │ │ │ ├── x53y43.txt │ │ │ │ ├── x53y44.txt │ │ │ │ ├── x53y45.txt │ │ │ │ ├── x53y46.txt │ │ │ │ ├── x53y47.txt │ │ │ │ ├── x53y48.txt │ │ │ │ ├── x53y49.txt │ │ │ │ ├── x54y42.txt │ │ │ │ ├── x54y43.txt │ │ │ │ ├── x54y44.txt │ │ │ │ ├── x54y45.txt │ │ │ │ ├── x54y46.txt │ │ │ │ ├── x54y47.txt │ │ │ │ ├── x54y48.txt │ │ │ │ ├── x54y49.txt │ │ │ │ ├── x55y43.txt │ │ │ │ ├── x55y44.txt │ │ │ │ ├── x55y45.txt │ │ │ │ ├── x55y46.txt │ │ │ │ ├── x55y47.txt │ │ │ │ ├── x56y43.txt │ │ │ │ ├── x56y44.txt │ │ │ │ ├── x56y45.txt │ │ │ │ ├── x56y46.txt │ │ │ │ ├── x56y47.txt │ │ │ │ ├── x56y48.txt │ │ │ │ ├── x56y49.txt │ │ │ │ └── x56y50.txt │ │ │ └── warp/ │ │ │ ├── old/ │ │ │ │ ├── x50y50.txt │ │ │ │ └── x54y50.txt │ │ │ ├── x49y49.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y49.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x52y49.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x53y49.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y52.txt │ │ │ ├── x54y49.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y52.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ └── x55y52.txt │ │ ├── input.hpp │ │ ├── logic.hpp │ │ ├── main.cpp │ │ ├── map.hpp │ │ ├── maps/ │ │ │ ├── lab/ │ │ │ │ ├── x48y52.txt │ │ │ │ ├── x48y53.txt │ │ │ │ ├── x49y51.txt │ │ │ │ ├── x49y52.txt │ │ │ │ ├── x49y53.txt │ │ │ │ ├── x49y54.txt │ │ │ │ ├── x49y55.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x50y51.txt │ │ │ │ ├── x50y52.txt │ │ │ │ ├── x50y53.txt │ │ │ │ ├── x50y54.txt │ │ │ │ ├── x50y55.txt │ │ │ │ ├── x50y58.txt │ │ │ │ ├── x51y50.txt │ │ │ │ ├── x51y51.txt │ │ │ │ ├── x51y52.txt │ │ │ │ ├── x51y53.txt │ │ │ │ ├── x51y54.txt │ │ │ │ ├── x51y55.txt │ │ │ │ ├── x51y58.txt │ │ │ │ ├── x52y50.txt │ │ │ │ ├── x52y51.txt │ │ │ │ ├── x52y52.txt │ │ │ │ ├── x52y53.txt │ │ │ │ ├── x52y54.txt │ │ │ │ ├── x52y55.txt │ │ │ │ ├── x52y56.txt │ │ │ │ ├── x52y57.txt │ │ │ │ ├── x52y58.txt │ │ │ │ ├── x53y50.txt │ │ │ │ ├── x53y51.txt │ │ │ │ ├── x53y54.txt │ │ │ │ ├── x53y55.txt │ │ │ │ ├── x54y50.txt │ │ │ │ ├── x54y51.txt │ │ │ │ ├── x54y54.txt │ │ │ │ ├── x54y55.txt │ │ │ │ ├── x55y49.txt │ │ │ │ ├── x55y50.txt │ │ │ │ ├── x55y51.txt │ │ │ │ ├── x55y52.txt │ │ │ │ ├── x55y53.txt │ │ │ │ └── x55y54.txt │ │ │ ├── other/ │ │ │ │ ├── x100y100.txt │ │ │ │ ├── x100y101.txt │ │ │ │ ├── x100y102.txt │ │ │ │ ├── x100y103.txt │ │ │ │ ├── x100y104.txt │ │ │ │ ├── x100y105.txt │ │ │ │ ├── x100y106.txt │ │ │ │ ├── x100y107.txt │ │ │ │ ├── x100y108.txt │ │ │ │ ├── x100y109.txt │ │ │ │ ├── x100y110.txt │ │ │ │ ├── x100y111.txt │ │ │ │ ├── x100y112.txt │ │ │ │ ├── x100y113.txt │ │ │ │ ├── x100y114.txt │ │ │ │ ├── x100y115.txt │ │ │ │ ├── x100y116.txt │ │ │ │ ├── x100y117.txt │ │ │ │ ├── x101y102.txt │ │ │ │ ├── x101y103.txt │ │ │ │ ├── x101y104.txt │ │ │ │ ├── x101y105.txt │ │ │ │ ├── x101y106.txt │ │ │ │ ├── x101y108.txt │ │ │ │ ├── x101y109.txt │ │ │ │ ├── x101y110.txt │ │ │ │ ├── x101y111.txt │ │ │ │ ├── x101y112.txt │ │ │ │ ├── x101y113.txt │ │ │ │ ├── x101y114.txt │ │ │ │ ├── x101y115.txt │ │ │ │ ├── x101y116.txt │ │ │ │ ├── x102y102.txt │ │ │ │ ├── x102y103.txt │ │ │ │ ├── x102y105.txt │ │ │ │ ├── x102y106.txt │ │ │ │ ├── x102y108.txt │ │ │ │ ├── x102y109.txt │ │ │ │ ├── x102y110.txt │ │ │ │ ├── x102y111.txt │ │ │ │ ├── x102y112.txt │ │ │ │ ├── x102y113.txt │ │ │ │ ├── x102y114.txt │ │ │ │ ├── x102y115.txt │ │ │ │ ├── x103y102.txt │ │ │ │ ├── x103y103.txt │ │ │ │ ├── x103y105.txt │ │ │ │ ├── x103y106.txt │ │ │ │ ├── x103y107.txt │ │ │ │ ├── x103y108.txt │ │ │ │ ├── x103y109.txt │ │ │ │ ├── x103y110.txt │ │ │ │ ├── x103y111.txt │ │ │ │ ├── x103y112.txt │ │ │ │ ├── x103y113.txt │ │ │ │ ├── x103y115.txt │ │ │ │ ├── x104y105.txt │ │ │ │ ├── x104y106.txt │ │ │ │ ├── x104y107.txt │ │ │ │ ├── x104y109.txt │ │ │ │ ├── x104y110.txt │ │ │ │ ├── x104y111.txt │ │ │ │ ├── x104y112.txt │ │ │ │ ├── x104y113.txt │ │ │ │ ├── x104y114.txt │ │ │ │ ├── x104y115.txt │ │ │ │ ├── x105y102.txt │ │ │ │ ├── x105y103.txt │ │ │ │ ├── x105y104.txt │ │ │ │ ├── x105y105.txt │ │ │ │ ├── x105y106.txt │ │ │ │ ├── x105y107.txt │ │ │ │ ├── x105y108.txt │ │ │ │ ├── x105y109.txt │ │ │ │ ├── x105y110.txt │ │ │ │ ├── x105y111.txt │ │ │ │ ├── x105y112.txt │ │ │ │ ├── x105y113.txt │ │ │ │ ├── x105y114.txt │ │ │ │ ├── x105y115.txt │ │ │ │ ├── x105y118.txt │ │ │ │ ├── x105y119.txt │ │ │ │ ├── x106y102.txt │ │ │ │ ├── x106y104.txt │ │ │ │ ├── x106y105.txt │ │ │ │ ├── x106y106.txt │ │ │ │ ├── x106y107.txt │ │ │ │ ├── x106y108.txt │ │ │ │ ├── x106y109.txt │ │ │ │ ├── x106y110.txt │ │ │ │ ├── x106y111.txt │ │ │ │ ├── x106y112.txt │ │ │ │ ├── x106y113.txt │ │ │ │ ├── x106y114.txt │ │ │ │ ├── x106y115.txt │ │ │ │ ├── x106y118.txt │ │ │ │ ├── x106y119.txt │ │ │ │ ├── x107y101.txt │ │ │ │ ├── x107y102.txt │ │ │ │ ├── x107y103.txt │ │ │ │ ├── x107y104.txt │ │ │ │ ├── x107y105.txt │ │ │ │ ├── x107y106.txt │ │ │ │ ├── x107y107.txt │ │ │ │ ├── x107y108.txt │ │ │ │ ├── x107y109.txt │ │ │ │ ├── x107y110.txt │ │ │ │ ├── x107y111.txt │ │ │ │ ├── x107y112.txt │ │ │ │ ├── x107y114.txt │ │ │ │ ├── x108y100.txt │ │ │ │ ├── x108y101.txt │ │ │ │ ├── x108y102.txt │ │ │ │ ├── x108y103.txt │ │ │ │ ├── x108y104.txt │ │ │ │ ├── x108y105.txt │ │ │ │ ├── x108y106.txt │ │ │ │ ├── x108y107.txt │ │ │ │ ├── x108y108.txt │ │ │ │ ├── x108y110.txt │ │ │ │ ├── x108y111.txt │ │ │ │ ├── x108y112.txt │ │ │ │ ├── x108y113.txt │ │ │ │ ├── x108y114.txt │ │ │ │ ├── x108y115.txt │ │ │ │ ├── x108y116.txt │ │ │ │ ├── x108y117.txt │ │ │ │ ├── x108y118.txt │ │ │ │ ├── x108y119.txt │ │ │ │ ├── x110y100.txt │ │ │ │ ├── x110y103.txt │ │ │ │ ├── x110y108.txt │ │ │ │ ├── x110y109.txt │ │ │ │ ├── x110y110.txt │ │ │ │ ├── x110y111.txt │ │ │ │ ├── x110y112.txt │ │ │ │ ├── x110y113.txt │ │ │ │ ├── x110y114.txt │ │ │ │ ├── x110y115.txt │ │ │ │ ├── x110y116.txt │ │ │ │ ├── x110y117.txt │ │ │ │ ├── x110y118.txt │ │ │ │ ├── x110y119.txt │ │ │ │ ├── x111y101.txt │ │ │ │ ├── x111y102.txt │ │ │ │ ├── x111y103.txt │ │ │ │ ├── x111y108.txt │ │ │ │ ├── x111y109.txt │ │ │ │ ├── x111y110.txt │ │ │ │ ├── x111y116.txt │ │ │ │ ├── x111y117.txt │ │ │ │ ├── x112y100.txt │ │ │ │ ├── x112y101.txt │ │ │ │ ├── x112y102.txt │ │ │ │ ├── x112y108.txt │ │ │ │ ├── x112y109.txt │ │ │ │ ├── x112y110.txt │ │ │ │ ├── x112y116.txt │ │ │ │ ├── x112y117.txt │ │ │ │ ├── x112y119.txt │ │ │ │ ├── x113y101.txt │ │ │ │ ├── x113y102.txt │ │ │ │ ├── x113y114.txt │ │ │ │ ├── x113y115.txt │ │ │ │ ├── x113y116.txt │ │ │ │ ├── x113y117.txt │ │ │ │ ├── x113y118.txt │ │ │ │ ├── x113y119.txt │ │ │ │ ├── x114y114.txt │ │ │ │ ├── x114y116.txt │ │ │ │ ├── x114y117.txt │ │ │ │ ├── x114y118.txt │ │ │ │ ├── x114y119.txt │ │ │ │ ├── x115y114.txt │ │ │ │ ├── x115y116.txt │ │ │ │ ├── x115y117.txt │ │ │ │ ├── x115y118.txt │ │ │ │ ├── x115y119.txt │ │ │ │ ├── x116y104.txt │ │ │ │ ├── x116y114.txt │ │ │ │ ├── x116y117.txt │ │ │ │ ├── x116y119.txt │ │ │ │ ├── x117y104.txt │ │ │ │ ├── x117y105.txt │ │ │ │ ├── x117y112.txt │ │ │ │ ├── x117y113.txt │ │ │ │ ├── x117y114.txt │ │ │ │ ├── x117y115.txt │ │ │ │ ├── x117y116.txt │ │ │ │ ├── x117y117.txt │ │ │ │ ├── x117y118.txt │ │ │ │ ├── x117y119.txt │ │ │ │ ├── x118y104.txt │ │ │ │ ├── x118y105.txt │ │ │ │ ├── x118y115.txt │ │ │ │ ├── x118y117.txt │ │ │ │ ├── x118y119.txt │ │ │ │ ├── x119y104.txt │ │ │ │ ├── x119y105.txt │ │ │ │ ├── x119y109.txt │ │ │ │ ├── x119y110.txt │ │ │ │ ├── x119y111.txt │ │ │ │ ├── x119y112.txt │ │ │ │ ├── x119y113.txt │ │ │ │ ├── x119y114.txt │ │ │ │ ├── x119y115.txt │ │ │ │ ├── x119y116.txt │ │ │ │ ├── x119y117.txt │ │ │ │ ├── x119y118.txt │ │ │ │ └── x119y119.txt │ │ │ ├── spacestation2/ │ │ │ │ ├── x48y41.txt │ │ │ │ ├── x48y42.txt │ │ │ │ ├── x48y43.txt │ │ │ │ ├── x49y41.txt │ │ │ │ ├── x49y42.txt │ │ │ │ ├── x49y43.txt │ │ │ │ ├── x49y47.txt │ │ │ │ ├── x49y48.txt │ │ │ │ ├── x49y49.txt │ │ │ │ ├── x49y50.txt │ │ │ │ ├── x50y39.txt │ │ │ │ ├── x50y40.txt │ │ │ │ ├── x50y41.txt │ │ │ │ ├── x50y42.txt │ │ │ │ ├── x50y43.txt │ │ │ │ ├── x50y47.txt │ │ │ │ ├── x50y48.txt │ │ │ │ ├── x50y49.txt │ │ │ │ ├── x50y50.txt │ │ │ │ ├── x51y39.txt │ │ │ │ ├── x51y40.txt │ │ │ │ ├── x51y41.txt │ │ │ │ ├── x51y42.txt │ │ │ │ ├── x51y43.txt │ │ │ │ ├── x51y44.txt │ │ │ │ ├── x51y45.txt │ │ │ │ ├── x51y46.txt │ │ │ │ ├── x51y47.txt │ │ │ │ ├── x51y48.txt │ │ │ │ ├── x51y49.txt │ │ │ │ ├── x52y39.txt │ │ │ │ ├── x52y40.txt │ │ │ │ ├── x52y41.txt │ │ │ │ ├── x52y42.txt │ │ │ │ ├── x52y43.txt │ │ │ │ ├── x52y44.txt │ │ │ │ ├── x52y45.txt │ │ │ │ ├── x52y46.txt │ │ │ │ ├── x52y47.txt │ │ │ │ ├── x52y48.txt │ │ │ │ ├── x52y49.txt │ │ │ │ ├── x53y39.txt │ │ │ │ ├── x53y40.txt │ │ │ │ ├── x53y41.txt │ │ │ │ ├── x53y42.txt │ │ │ │ ├── x53y43.txt │ │ │ │ ├── x53y44.txt │ │ │ │ ├── x53y45.txt │ │ │ │ ├── x53y46.txt │ │ │ │ ├── x53y47.txt │ │ │ │ ├── x53y48.txt │ │ │ │ ├── x53y49.txt │ │ │ │ ├── x54y42.txt │ │ │ │ ├── x54y43.txt │ │ │ │ ├── x54y44.txt │ │ │ │ ├── x54y45.txt │ │ │ │ ├── x54y46.txt │ │ │ │ ├── x54y47.txt │ │ │ │ ├── x54y48.txt │ │ │ │ ├── x54y49.txt │ │ │ │ ├── x55y43.txt │ │ │ │ ├── x55y44.txt │ │ │ │ ├── x55y45.txt │ │ │ │ ├── x55y46.txt │ │ │ │ ├── x55y47.txt │ │ │ │ ├── x56y43.txt │ │ │ │ ├── x56y44.txt │ │ │ │ ├── x56y45.txt │ │ │ │ ├── x56y46.txt │ │ │ │ ├── x56y47.txt │ │ │ │ ├── x56y48.txt │ │ │ │ ├── x56y49.txt │ │ │ │ └── x56y50.txt │ │ │ └── warp/ │ │ │ ├── old/ │ │ │ │ ├── x50y50.txt │ │ │ │ └── x54y50.txt │ │ │ ├── x49y49.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y49.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x52y49.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x53y49.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y52.txt │ │ │ ├── x54y49.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y52.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ └── x55y52.txt │ │ ├── misc.hpp │ │ ├── overworld.txt │ │ └── render.hpp │ └── World Mapping Editor/ │ ├── areamap.txt │ ├── areamapin.txt │ ├── backup/ │ │ └── imports/ │ │ ├── lab/ │ │ │ ├── x48y52.txt │ │ │ ├── x48y53.txt │ │ │ ├── x49y51.txt │ │ │ ├── x49y52.txt │ │ │ ├── x49y53.txt │ │ │ ├── x49y54.txt │ │ │ ├── x49y55.txt │ │ │ ├── x50y50.txt │ │ │ ├── x50y51.txt │ │ │ ├── x50y52.txt │ │ │ ├── x50y53.txt │ │ │ ├── x50y54.txt │ │ │ ├── x50y55.txt │ │ │ ├── x50y58.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x51y53.txt │ │ │ ├── x51y54.txt │ │ │ ├── x51y55.txt │ │ │ ├── x51y58.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x52y53.txt │ │ │ ├── x52y54.txt │ │ │ ├── x52y55.txt │ │ │ ├── x52y56.txt │ │ │ ├── x52y57.txt │ │ │ ├── x52y58.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y54.txt │ │ │ ├── x53y55.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y54.txt │ │ │ ├── x54y55.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ ├── x55y52.txt │ │ │ ├── x55y53.txt │ │ │ └── x55y54.txt │ │ ├── other/ │ │ │ ├── x100y100.txt │ │ │ ├── x100y101.txt │ │ │ ├── x100y102.txt │ │ │ ├── x100y103.txt │ │ │ ├── x100y104.txt │ │ │ ├── x100y105.txt │ │ │ ├── x100y106.txt │ │ │ ├── x100y107.txt │ │ │ ├── x100y108.txt │ │ │ ├── x100y109.txt │ │ │ ├── x100y110.txt │ │ │ ├── x100y112.txt │ │ │ ├── x100y113.txt │ │ │ ├── x100y114.txt │ │ │ ├── x100y115.txt │ │ │ ├── x100y116.txt │ │ │ ├── x101y102.txt │ │ │ ├── x101y103.txt │ │ │ ├── x101y104.txt │ │ │ ├── x101y105.txt │ │ │ ├── x101y106.txt │ │ │ ├── x101y108.txt │ │ │ ├── x101y109.txt │ │ │ ├── x101y110.txt │ │ │ ├── x101y112.txt │ │ │ ├── x101y113.txt │ │ │ ├── x101y114.txt │ │ │ ├── x101y115.txt │ │ │ ├── x101y116.txt │ │ │ ├── x102y102.txt │ │ │ ├── x102y103.txt │ │ │ ├── x102y105.txt │ │ │ ├── x102y106.txt │ │ │ ├── x102y108.txt │ │ │ ├── x102y109.txt │ │ │ ├── x102y110.txt │ │ │ ├── x102y111.txt │ │ │ ├── x102y112.txt │ │ │ ├── x102y113.txt │ │ │ ├── x102y114.txt │ │ │ ├── x102y115.txt │ │ │ ├── x103y102.txt │ │ │ ├── x103y103.txt │ │ │ ├── x103y105.txt │ │ │ ├── x103y106.txt │ │ │ ├── x103y107.txt │ │ │ ├── x103y108.txt │ │ │ ├── x103y109.txt │ │ │ ├── x103y110.txt │ │ │ ├── x103y111.txt │ │ │ ├── x103y112.txt │ │ │ ├── x103y113.txt │ │ │ ├── x103y115.txt │ │ │ ├── x104y105.txt │ │ │ ├── x104y107.txt │ │ │ ├── x104y109.txt │ │ │ ├── x104y110.txt │ │ │ ├── x104y111.txt │ │ │ ├── x104y112.txt │ │ │ ├── x104y113.txt │ │ │ ├── x104y114.txt │ │ │ ├── x104y115.txt │ │ │ ├── x105y102.txt │ │ │ ├── x105y103.txt │ │ │ ├── x105y104.txt │ │ │ ├── x105y105.txt │ │ │ ├── x105y106.txt │ │ │ ├── x105y107.txt │ │ │ ├── x105y108.txt │ │ │ ├── x105y109.txt │ │ │ ├── x105y110.txt │ │ │ ├── x105y111.txt │ │ │ ├── x105y112.txt │ │ │ ├── x105y113.txt │ │ │ ├── x105y114.txt │ │ │ ├── x106y102.txt │ │ │ ├── x106y104.txt │ │ │ ├── x106y105.txt │ │ │ ├── x106y106.txt │ │ │ ├── x106y107.txt │ │ │ ├── x106y108.txt │ │ │ ├── x106y109.txt │ │ │ ├── x106y110.txt │ │ │ ├── x106y111.txt │ │ │ ├── x106y112.txt │ │ │ ├── x106y113.txt │ │ │ ├── x106y114.txt │ │ │ ├── x107y102.txt │ │ │ ├── x107y103.txt │ │ │ ├── x107y104.txt │ │ │ ├── x107y105.txt │ │ │ ├── x107y106.txt │ │ │ ├── x107y107.txt │ │ │ ├── x107y108.txt │ │ │ ├── x107y109.txt │ │ │ ├── x107y111.txt │ │ │ ├── x107y114.txt │ │ │ ├── x108y100.txt │ │ │ ├── x108y101.txt │ │ │ ├── x108y102.txt │ │ │ ├── x108y103.txt │ │ │ ├── x108y104.txt │ │ │ ├── x108y105.txt │ │ │ ├── x108y111.txt │ │ │ ├── x108y112.txt │ │ │ ├── x108y113.txt │ │ │ ├── x108y114.txt │ │ │ ├── x108y115.txt │ │ │ ├── x108y116.txt │ │ │ ├── x108y117.txt │ │ │ ├── x108y118.txt │ │ │ ├── x108y119.txt │ │ │ ├── x110y100.txt │ │ │ ├── x110y101.txt │ │ │ ├── x110y102.txt │ │ │ ├── x110y103.txt │ │ │ ├── x110y117.txt │ │ │ ├── x110y118.txt │ │ │ ├── x110y119.txt │ │ │ ├── x111y100.txt │ │ │ ├── x111y101.txt │ │ │ ├── x111y102.txt │ │ │ ├── x111y103.txt │ │ │ ├── x111y117.txt │ │ │ ├── x111y118.txt │ │ │ ├── x111y119.txt │ │ │ ├── x112y100.txt │ │ │ ├── x112y101.txt │ │ │ ├── x112y102.txt │ │ │ ├── x112y117.txt │ │ │ ├── x112y118.txt │ │ │ ├── x112y119.txt │ │ │ ├── x113y101.txt │ │ │ ├── x113y102.txt │ │ │ ├── x113y117.txt │ │ │ ├── x113y118.txt │ │ │ ├── x113y119.txt │ │ │ ├── x114y117.txt │ │ │ ├── x116y104.txt │ │ │ ├── x117y104.txt │ │ │ ├── x117y105.txt │ │ │ ├── x118y104.txt │ │ │ ├── x118y105.txt │ │ │ ├── x119y104.txt │ │ │ ├── x119y105.txt │ │ │ ├── x119y109.txt │ │ │ ├── x119y110.txt │ │ │ ├── x119y112.txt │ │ │ └── x119y113.txt │ │ ├── spacestation2/ │ │ │ ├── x48y41.txt │ │ │ ├── x48y42.txt │ │ │ ├── x48y43.txt │ │ │ ├── x49y41.txt │ │ │ ├── x49y42.txt │ │ │ ├── x49y43.txt │ │ │ ├── x49y47.txt │ │ │ ├── x49y48.txt │ │ │ ├── x49y49.txt │ │ │ ├── x49y50.txt │ │ │ ├── x50y39.txt │ │ │ ├── x50y40.txt │ │ │ ├── x50y41.txt │ │ │ ├── x50y42.txt │ │ │ ├── x50y43.txt │ │ │ ├── x50y47.txt │ │ │ ├── x50y48.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y39.txt │ │ │ ├── x51y40.txt │ │ │ ├── x51y41.txt │ │ │ ├── x51y42.txt │ │ │ ├── x51y43.txt │ │ │ ├── x51y44.txt │ │ │ ├── x51y45.txt │ │ │ ├── x51y46.txt │ │ │ ├── x51y47.txt │ │ │ ├── x51y48.txt │ │ │ ├── x51y49.txt │ │ │ ├── x52y39.txt │ │ │ ├── x52y40.txt │ │ │ ├── x52y41.txt │ │ │ ├── x52y42.txt │ │ │ ├── x52y43.txt │ │ │ ├── x52y44.txt │ │ │ ├── x52y45.txt │ │ │ ├── x52y46.txt │ │ │ ├── x52y47.txt │ │ │ ├── x52y48.txt │ │ │ ├── x52y49.txt │ │ │ ├── x53y39.txt │ │ │ ├── x53y40.txt │ │ │ ├── x53y41.txt │ │ │ ├── x53y42.txt │ │ │ ├── x53y43.txt │ │ │ ├── x53y44.txt │ │ │ ├── x53y45.txt │ │ │ ├── x53y46.txt │ │ │ ├── x53y47.txt │ │ │ ├── x53y48.txt │ │ │ ├── x53y49.txt │ │ │ ├── x54y42.txt │ │ │ ├── x54y43.txt │ │ │ ├── x54y44.txt │ │ │ ├── x54y45.txt │ │ │ ├── x54y46.txt │ │ │ ├── x54y47.txt │ │ │ ├── x54y48.txt │ │ │ ├── x54y49.txt │ │ │ ├── x55y43.txt │ │ │ ├── x55y44.txt │ │ │ ├── x55y45.txt │ │ │ ├── x55y46.txt │ │ │ ├── x55y47.txt │ │ │ ├── x56y43.txt │ │ │ ├── x56y44.txt │ │ │ ├── x56y45.txt │ │ │ ├── x56y46.txt │ │ │ ├── x56y47.txt │ │ │ ├── x56y48.txt │ │ │ ├── x56y49.txt │ │ │ └── x56y50.txt │ │ └── warp/ │ │ ├── old/ │ │ │ ├── x50y50.txt │ │ │ └── x54y50.txt │ │ ├── x49y49.txt │ │ ├── x50y49.txt │ │ ├── x50y50.txt │ │ ├── x51y49.txt │ │ ├── x51y50.txt │ │ ├── x51y51.txt │ │ ├── x51y52.txt │ │ ├── x52y49.txt │ │ ├── x52y50.txt │ │ ├── x52y51.txt │ │ ├── x52y52.txt │ │ ├── x53y49.txt │ │ ├── x53y50.txt │ │ ├── x53y51.txt │ │ ├── x53y52.txt │ │ ├── x54y49.txt │ │ ├── x54y50.txt │ │ ├── x54y51.txt │ │ ├── x54y52.txt │ │ ├── x55y49.txt │ │ ├── x55y50.txt │ │ ├── x55y51.txt │ │ └── x55y52.txt │ ├── imports/ │ │ ├── lab/ │ │ │ ├── x48y52.txt │ │ │ ├── x48y53.txt │ │ │ ├── x49y51.txt │ │ │ ├── x49y52.txt │ │ │ ├── x49y53.txt │ │ │ ├── x49y54.txt │ │ │ ├── x49y55.txt │ │ │ ├── x50y50.txt │ │ │ ├── x50y51.txt │ │ │ ├── x50y52.txt │ │ │ ├── x50y53.txt │ │ │ ├── x50y54.txt │ │ │ ├── x50y55.txt │ │ │ ├── x50y58.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x51y53.txt │ │ │ ├── x51y54.txt │ │ │ ├── x51y55.txt │ │ │ ├── x51y58.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x52y53.txt │ │ │ ├── x52y54.txt │ │ │ ├── x52y55.txt │ │ │ ├── x52y56.txt │ │ │ ├── x52y57.txt │ │ │ ├── x52y58.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y54.txt │ │ │ ├── x53y55.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y54.txt │ │ │ ├── x54y55.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ ├── x55y52.txt │ │ │ ├── x55y53.txt │ │ │ └── x55y54.txt │ │ ├── other/ │ │ │ ├── Copy of x102y110.txt │ │ │ ├── x100y100.txt │ │ │ ├── x100y101.txt │ │ │ ├── x100y102.txt │ │ │ ├── x100y103.txt │ │ │ ├── x100y104.txt │ │ │ ├── x100y105.txt │ │ │ ├── x100y106.txt │ │ │ ├── x100y107.txt │ │ │ ├── x100y108.txt │ │ │ ├── x100y109.txt │ │ │ ├── x100y110.txt │ │ │ ├── x100y111.txt │ │ │ ├── x100y112.txt │ │ │ ├── x100y113.txt │ │ │ ├── x100y114.txt │ │ │ ├── x100y115.txt │ │ │ ├── x100y116.txt │ │ │ ├── x100y117.txt │ │ │ ├── x101y102.txt │ │ │ ├── x101y103.txt │ │ │ ├── x101y104.txt │ │ │ ├── x101y105.txt │ │ │ ├── x101y106.txt │ │ │ ├── x101y108.txt │ │ │ ├── x101y109.txt │ │ │ ├── x101y110.txt │ │ │ ├── x101y111.txt │ │ │ ├── x101y112.txt │ │ │ ├── x101y113.txt │ │ │ ├── x101y114.txt │ │ │ ├── x101y115.txt │ │ │ ├── x101y116.txt │ │ │ ├── x102y102.txt │ │ │ ├── x102y103.txt │ │ │ ├── x102y105.txt │ │ │ ├── x102y106.txt │ │ │ ├── x102y108.txt │ │ │ ├── x102y109.txt │ │ │ ├── x102y110.txt │ │ │ ├── x102y111.txt │ │ │ ├── x102y112.txt │ │ │ ├── x102y113.txt │ │ │ ├── x102y114.txt │ │ │ ├── x102y115.txt │ │ │ ├── x103y102.txt │ │ │ ├── x103y103.txt │ │ │ ├── x103y105.txt │ │ │ ├── x103y106.txt │ │ │ ├── x103y107.txt │ │ │ ├── x103y108.txt │ │ │ ├── x103y109.txt │ │ │ ├── x103y110.txt │ │ │ ├── x103y111.txt │ │ │ ├── x103y112.txt │ │ │ ├── x103y113.txt │ │ │ ├── x103y114.txt │ │ │ ├── x103y115.txt │ │ │ ├── x104y105.txt │ │ │ ├── x104y107.txt │ │ │ ├── x104y109.txt │ │ │ ├── x104y110.txt │ │ │ ├── x104y111.txt │ │ │ ├── x104y112.txt │ │ │ ├── x104y113.txt │ │ │ ├── x104y114.txt │ │ │ ├── x104y115.txt │ │ │ ├── x105y102.txt │ │ │ ├── x105y103.txt │ │ │ ├── x105y104.txt │ │ │ ├── x105y105.txt │ │ │ ├── x105y106.txt │ │ │ ├── x105y107.txt │ │ │ ├── x105y108.txt │ │ │ ├── x105y109.txt │ │ │ ├── x105y110.txt │ │ │ ├── x105y111.txt │ │ │ ├── x105y112.txt │ │ │ ├── x105y113.txt │ │ │ ├── x105y114.txt │ │ │ ├── x105y115.txt │ │ │ ├── x105y118.txt │ │ │ ├── x105y119.txt │ │ │ ├── x106y102.txt │ │ │ ├── x106y104.txt │ │ │ ├── x106y105.txt │ │ │ ├── x106y106.txt │ │ │ ├── x106y107.txt │ │ │ ├── x106y108.txt │ │ │ ├── x106y109.txt │ │ │ ├── x106y110.txt │ │ │ ├── x106y111.txt │ │ │ ├── x106y112.txt │ │ │ ├── x106y113.txt │ │ │ ├── x106y114.txt │ │ │ ├── x106y115.txt │ │ │ ├── x106y118.txt │ │ │ ├── x106y119.txt │ │ │ ├── x107y101.txt │ │ │ ├── x107y102.txt │ │ │ ├── x107y103.txt │ │ │ ├── x107y104.txt │ │ │ ├── x107y105.txt │ │ │ ├── x107y106.txt │ │ │ ├── x107y107.txt │ │ │ ├── x107y108.txt │ │ │ ├── x107y109.txt │ │ │ ├── x107y110.txt │ │ │ ├── x107y111.txt │ │ │ ├── x107y114.txt │ │ │ ├── x108y100.txt │ │ │ ├── x108y101.txt │ │ │ ├── x108y102.txt │ │ │ ├── x108y103.txt │ │ │ ├── x108y104.txt │ │ │ ├── x108y105.txt │ │ │ ├── x108y106.txt │ │ │ ├── x108y107.txt │ │ │ ├── x108y108.txt │ │ │ ├── x108y110.txt │ │ │ ├── x108y111.txt │ │ │ ├── x108y112.txt │ │ │ ├── x108y113.txt │ │ │ ├── x108y114.txt │ │ │ ├── x108y115.txt │ │ │ ├── x108y116.txt │ │ │ ├── x108y117.txt │ │ │ ├── x108y118.txt │ │ │ ├── x108y119.txt │ │ │ ├── x110y100.txt │ │ │ ├── x110y101.txt │ │ │ ├── x110y102.txt │ │ │ ├── x110y103.txt │ │ │ ├── x110y108.txt │ │ │ ├── x110y109.txt │ │ │ ├── x110y110.txt │ │ │ ├── x110y111.txt │ │ │ ├── x110y112.txt │ │ │ ├── x110y113.txt │ │ │ ├── x110y114.txt │ │ │ ├── x110y115.txt │ │ │ ├── x110y116.txt │ │ │ ├── x110y117.txt │ │ │ ├── x110y118.txt │ │ │ ├── x110y119.txt │ │ │ ├── x111y100.txt │ │ │ ├── x111y101.txt │ │ │ ├── x111y102.txt │ │ │ ├── x111y103.txt │ │ │ ├── x111y108.txt │ │ │ ├── x111y109.txt │ │ │ ├── x111y110.txt │ │ │ ├── x111y116.txt │ │ │ ├── x111y117.txt │ │ │ ├── x111y118.txt │ │ │ ├── x111y119.txt │ │ │ ├── x112y100.txt │ │ │ ├── x112y101.txt │ │ │ ├── x112y102.txt │ │ │ ├── x112y108.txt │ │ │ ├── x112y109.txt │ │ │ ├── x112y110.txt │ │ │ ├── x112y116.txt │ │ │ ├── x112y117.txt │ │ │ ├── x112y118.txt │ │ │ ├── x112y119.txt │ │ │ ├── x113y101.txt │ │ │ ├── x113y102.txt │ │ │ ├── x113y114.txt │ │ │ ├── x113y115.txt │ │ │ ├── x113y116.txt │ │ │ ├── x113y117.txt │ │ │ ├── x113y118.txt │ │ │ ├── x113y119.txt │ │ │ ├── x114y114.txt │ │ │ ├── x114y116.txt │ │ │ ├── x114y117.txt │ │ │ ├── x114y118.txt │ │ │ ├── x114y119.txt │ │ │ ├── x115y114.txt │ │ │ ├── x115y116.txt │ │ │ ├── x115y117.txt │ │ │ ├── x115y118.txt │ │ │ ├── x115y119.txt │ │ │ ├── x116y104.txt │ │ │ ├── x116y105.txt │ │ │ ├── x116y114.txt │ │ │ ├── x116y117.txt │ │ │ ├── x116y119.txt │ │ │ ├── x117y104.txt │ │ │ ├── x117y105.txt │ │ │ ├── x117y106.txt │ │ │ ├── x117y112.txt │ │ │ ├── x117y113.txt │ │ │ ├── x117y114.txt │ │ │ ├── x117y115.txt │ │ │ ├── x117y116.txt │ │ │ ├── x117y117.txt │ │ │ ├── x117y118.txt │ │ │ ├── x117y119.txt │ │ │ ├── x118y104.txt │ │ │ ├── x118y105.txt │ │ │ ├── x118y106.txt │ │ │ ├── x118y115.txt │ │ │ ├── x118y117.txt │ │ │ ├── x118y119.txt │ │ │ ├── x119y104.txt │ │ │ ├── x119y105.txt │ │ │ ├── x119y106.txt │ │ │ ├── x119y107.txt │ │ │ ├── x119y109.txt │ │ │ ├── x119y110.txt │ │ │ ├── x119y111.txt │ │ │ ├── x119y112.txt │ │ │ ├── x119y113.txt │ │ │ ├── x119y114.txt │ │ │ ├── x119y115.txt │ │ │ ├── x119y116.txt │ │ │ ├── x119y117.txt │ │ │ ├── x119y118.txt │ │ │ └── x119y119.txt │ │ ├── spacestation2/ │ │ │ ├── x48y41.txt │ │ │ ├── x48y42.txt │ │ │ ├── x48y43.txt │ │ │ ├── x49y41.txt │ │ │ ├── x49y42.txt │ │ │ ├── x49y43.txt │ │ │ ├── x49y47.txt │ │ │ ├── x49y48.txt │ │ │ ├── x49y49.txt │ │ │ ├── x49y50.txt │ │ │ ├── x50y39.txt │ │ │ ├── x50y40.txt │ │ │ ├── x50y41.txt │ │ │ ├── x50y42.txt │ │ │ ├── x50y43.txt │ │ │ ├── x50y47.txt │ │ │ ├── x50y48.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y39.txt │ │ │ ├── x51y40.txt │ │ │ ├── x51y41.txt │ │ │ ├── x51y42.txt │ │ │ ├── x51y43.txt │ │ │ ├── x51y44.txt │ │ │ ├── x51y45.txt │ │ │ ├── x51y46.txt │ │ │ ├── x51y47.txt │ │ │ ├── x51y48.txt │ │ │ ├── x51y49.txt │ │ │ ├── x52y39.txt │ │ │ ├── x52y40.txt │ │ │ ├── x52y41.txt │ │ │ ├── x52y42.txt │ │ │ ├── x52y43.txt │ │ │ ├── x52y44.txt │ │ │ ├── x52y45.txt │ │ │ ├── x52y46.txt │ │ │ ├── x52y47.txt │ │ │ ├── x52y48.txt │ │ │ ├── x52y49.txt │ │ │ ├── x53y39.txt │ │ │ ├── x53y40.txt │ │ │ ├── x53y41.txt │ │ │ ├── x53y42.txt │ │ │ ├── x53y43.txt │ │ │ ├── x53y44.txt │ │ │ ├── x53y45.txt │ │ │ ├── x53y46.txt │ │ │ ├── x53y47.txt │ │ │ ├── x53y48.txt │ │ │ ├── x53y49.txt │ │ │ ├── x54y42.txt │ │ │ ├── x54y43.txt │ │ │ ├── x54y44.txt │ │ │ ├── x54y45.txt │ │ │ ├── x54y46.txt │ │ │ ├── x54y47.txt │ │ │ ├── x54y48.txt │ │ │ ├── x54y49.txt │ │ │ ├── x55y43.txt │ │ │ ├── x55y44.txt │ │ │ ├── x55y45.txt │ │ │ ├── x55y46.txt │ │ │ ├── x55y47.txt │ │ │ ├── x56y43.txt │ │ │ ├── x56y44.txt │ │ │ ├── x56y45.txt │ │ │ ├── x56y46.txt │ │ │ ├── x56y47.txt │ │ │ ├── x56y48.txt │ │ │ ├── x56y49.txt │ │ │ └── x56y50.txt │ │ └── warp/ │ │ ├── old/ │ │ │ ├── x50y50.txt │ │ │ └── x54y50.txt │ │ ├── x49y49.txt │ │ ├── x50y49.txt │ │ ├── x50y50.txt │ │ ├── x51y49.txt │ │ ├── x51y50.txt │ │ ├── x51y51.txt │ │ ├── x51y52.txt │ │ ├── x52y49.txt │ │ ├── x52y50.txt │ │ ├── x52y51.txt │ │ ├── x52y52.txt │ │ ├── x53y49.txt │ │ ├── x53y50.txt │ │ ├── x53y51.txt │ │ ├── x53y52.txt │ │ ├── x54y49.txt │ │ ├── x54y50.txt │ │ ├── x54y51.txt │ │ ├── x54y52.txt │ │ ├── x55y49.txt │ │ ├── x55y50.txt │ │ ├── x55y51.txt │ │ └── x55y52.txt │ ├── input.hpp │ ├── logic.hpp │ ├── main.cpp │ ├── map.hpp │ ├── maps/ │ │ ├── lab/ │ │ │ ├── x48y52.txt │ │ │ ├── x48y53.txt │ │ │ ├── x49y51.txt │ │ │ ├── x49y52.txt │ │ │ ├── x49y53.txt │ │ │ ├── x49y54.txt │ │ │ ├── x49y55.txt │ │ │ ├── x50y50.txt │ │ │ ├── x50y51.txt │ │ │ ├── x50y52.txt │ │ │ ├── x50y53.txt │ │ │ ├── x50y54.txt │ │ │ ├── x50y55.txt │ │ │ ├── x50y58.txt │ │ │ ├── x51y50.txt │ │ │ ├── x51y51.txt │ │ │ ├── x51y52.txt │ │ │ ├── x51y53.txt │ │ │ ├── x51y54.txt │ │ │ ├── x51y55.txt │ │ │ ├── x51y58.txt │ │ │ ├── x52y50.txt │ │ │ ├── x52y51.txt │ │ │ ├── x52y52.txt │ │ │ ├── x52y53.txt │ │ │ ├── x52y54.txt │ │ │ ├── x52y55.txt │ │ │ ├── x52y56.txt │ │ │ ├── x52y57.txt │ │ │ ├── x52y58.txt │ │ │ ├── x53y50.txt │ │ │ ├── x53y51.txt │ │ │ ├── x53y54.txt │ │ │ ├── x53y55.txt │ │ │ ├── x54y50.txt │ │ │ ├── x54y51.txt │ │ │ ├── x54y54.txt │ │ │ ├── x54y55.txt │ │ │ ├── x55y49.txt │ │ │ ├── x55y50.txt │ │ │ ├── x55y51.txt │ │ │ ├── x55y52.txt │ │ │ ├── x55y53.txt │ │ │ └── x55y54.txt │ │ ├── other/ │ │ │ ├── Copy of x102y110.txt │ │ │ ├── x100y100.txt │ │ │ ├── x100y101.txt │ │ │ ├── x100y102.txt │ │ │ ├── x100y103.txt │ │ │ ├── x100y104.txt │ │ │ ├── x100y105.txt │ │ │ ├── x100y106.txt │ │ │ ├── x100y107.txt │ │ │ ├── x100y108.txt │ │ │ ├── x100y109.txt │ │ │ ├── x100y110.txt │ │ │ ├── x100y111.txt │ │ │ ├── x100y112.txt │ │ │ ├── x100y113.txt │ │ │ ├── x100y114.txt │ │ │ ├── x100y115.txt │ │ │ ├── x100y116.txt │ │ │ ├── x100y117.txt │ │ │ ├── x101y102.txt │ │ │ ├── x101y103.txt │ │ │ ├── x101y104.txt │ │ │ ├── x101y105.txt │ │ │ ├── x101y106.txt │ │ │ ├── x101y108.txt │ │ │ ├── x101y109.txt │ │ │ ├── x101y110.txt │ │ │ ├── x101y111.txt │ │ │ ├── x101y112.txt │ │ │ ├── x101y113.txt │ │ │ ├── x101y114.txt │ │ │ ├── x101y115.txt │ │ │ ├── x101y116.txt │ │ │ ├── x102y102.txt │ │ │ ├── x102y103.txt │ │ │ ├── x102y105.txt │ │ │ ├── x102y106.txt │ │ │ ├── x102y108.txt │ │ │ ├── x102y109.txt │ │ │ ├── x102y110.txt │ │ │ ├── x102y111.txt │ │ │ ├── x102y112.txt │ │ │ ├── x102y113.txt │ │ │ ├── x102y114.txt │ │ │ ├── x102y115.txt │ │ │ ├── x103y102.txt │ │ │ ├── x103y103.txt │ │ │ ├── x103y105.txt │ │ │ ├── x103y106.txt │ │ │ ├── x103y107.txt │ │ │ ├── x103y108.txt │ │ │ ├── x103y109.txt │ │ │ ├── x103y110.txt │ │ │ ├── x103y111.txt │ │ │ ├── x103y112.txt │ │ │ ├── x103y113.txt │ │ │ ├── x103y114.txt │ │ │ ├── x103y115.txt │ │ │ ├── x104y105.txt │ │ │ ├── x104y107.txt │ │ │ ├── x104y109.txt │ │ │ ├── x104y110.txt │ │ │ ├── x104y111.txt │ │ │ ├── x104y112.txt │ │ │ ├── x104y113.txt │ │ │ ├── x104y114.txt │ │ │ ├── x104y115.txt │ │ │ ├── x105y102.txt │ │ │ ├── x105y103.txt │ │ │ ├── x105y104.txt │ │ │ ├── x105y105.txt │ │ │ ├── x105y106.txt │ │ │ ├── x105y107.txt │ │ │ ├── x105y108.txt │ │ │ ├── x105y109.txt │ │ │ ├── x105y110.txt │ │ │ ├── x105y111.txt │ │ │ ├── x105y112.txt │ │ │ ├── x105y113.txt │ │ │ ├── x105y114.txt │ │ │ ├── x105y115.txt │ │ │ ├── x105y118.txt │ │ │ ├── x105y119.txt │ │ │ ├── x106y102.txt │ │ │ ├── x106y104.txt │ │ │ ├── x106y105.txt │ │ │ ├── x106y106.txt │ │ │ ├── x106y107.txt │ │ │ ├── x106y108.txt │ │ │ ├── x106y109.txt │ │ │ ├── x106y110.txt │ │ │ ├── x106y111.txt │ │ │ ├── x106y112.txt │ │ │ ├── x106y113.txt │ │ │ ├── x106y114.txt │ │ │ ├── x106y115.txt │ │ │ ├── x106y118.txt │ │ │ ├── x106y119.txt │ │ │ ├── x107y101.txt │ │ │ ├── x107y102.txt │ │ │ ├── x107y103.txt │ │ │ ├── x107y104.txt │ │ │ ├── x107y105.txt │ │ │ ├── x107y106.txt │ │ │ ├── x107y107.txt │ │ │ ├── x107y108.txt │ │ │ ├── x107y109.txt │ │ │ ├── x107y110.txt │ │ │ ├── x107y111.txt │ │ │ ├── x107y114.txt │ │ │ ├── x108y100.txt │ │ │ ├── x108y101.txt │ │ │ ├── x108y102.txt │ │ │ ├── x108y103.txt │ │ │ ├── x108y104.txt │ │ │ ├── x108y105.txt │ │ │ ├── x108y106.txt │ │ │ ├── x108y107.txt │ │ │ ├── x108y108.txt │ │ │ ├── x108y110.txt │ │ │ ├── x108y111.txt │ │ │ ├── x108y112.txt │ │ │ ├── x108y113.txt │ │ │ ├── x108y114.txt │ │ │ ├── x108y115.txt │ │ │ ├── x108y116.txt │ │ │ ├── x108y117.txt │ │ │ ├── x108y118.txt │ │ │ ├── x108y119.txt │ │ │ ├── x110y100.txt │ │ │ ├── x110y103.txt │ │ │ ├── x110y108.txt │ │ │ ├── x110y109.txt │ │ │ ├── x110y110.txt │ │ │ ├── x110y111.txt │ │ │ ├── x110y112.txt │ │ │ ├── x110y113.txt │ │ │ ├── x110y114.txt │ │ │ ├── x110y115.txt │ │ │ ├── x110y116.txt │ │ │ ├── x110y117.txt │ │ │ ├── x110y118.txt │ │ │ ├── x110y119.txt │ │ │ ├── x111y101.txt │ │ │ ├── x111y102.txt │ │ │ ├── x111y103.txt │ │ │ ├── x111y108.txt │ │ │ ├── x111y109.txt │ │ │ ├── x111y110.txt │ │ │ ├── x111y116.txt │ │ │ ├── x111y117.txt │ │ │ ├── x112y100.txt │ │ │ ├── x112y101.txt │ │ │ ├── x112y102.txt │ │ │ ├── x112y108.txt │ │ │ ├── x112y109.txt │ │ │ ├── x112y110.txt │ │ │ ├── x112y116.txt │ │ │ ├── x112y117.txt │ │ │ ├── x112y119.txt │ │ │ ├── x113y101.txt │ │ │ ├── x113y102.txt │ │ │ ├── x113y114.txt │ │ │ ├── x113y115.txt │ │ │ ├── x113y116.txt │ │ │ ├── x113y117.txt │ │ │ ├── x113y118.txt │ │ │ ├── x113y119.txt │ │ │ ├── x114y114.txt │ │ │ ├── x114y116.txt │ │ │ ├── x114y117.txt │ │ │ ├── x114y118.txt │ │ │ ├── x114y119.txt │ │ │ ├── x115y114.txt │ │ │ ├── x115y116.txt │ │ │ ├── x115y117.txt │ │ │ ├── x115y118.txt │ │ │ ├── x115y119.txt │ │ │ ├── x116y104.txt │ │ │ ├── x116y105.txt │ │ │ ├── x116y114.txt │ │ │ ├── x116y117.txt │ │ │ ├── x116y119.txt │ │ │ ├── x117y104.txt │ │ │ ├── x117y105.txt │ │ │ ├── x117y106.txt │ │ │ ├── x117y112.txt │ │ │ ├── x117y113.txt │ │ │ ├── x117y114.txt │ │ │ ├── x117y115.txt │ │ │ ├── x117y116.txt │ │ │ ├── x117y117.txt │ │ │ ├── x117y118.txt │ │ │ ├── x117y119.txt │ │ │ ├── x118y104.txt │ │ │ ├── x118y105.txt │ │ │ ├── x118y106.txt │ │ │ ├── x118y115.txt │ │ │ ├── x118y117.txt │ │ │ ├── x118y119.txt │ │ │ ├── x119y104.txt │ │ │ ├── x119y105.txt │ │ │ ├── x119y106.txt │ │ │ ├── x119y107.txt │ │ │ ├── x119y109.txt │ │ │ ├── x119y110.txt │ │ │ ├── x119y111.txt │ │ │ ├── x119y112.txt │ │ │ ├── x119y113.txt │ │ │ ├── x119y114.txt │ │ │ ├── x119y115.txt │ │ │ ├── x119y116.txt │ │ │ ├── x119y117.txt │ │ │ ├── x119y118.txt │ │ │ └── x119y119.txt │ │ ├── spacestation2/ │ │ │ ├── x48y41.txt │ │ │ ├── x48y42.txt │ │ │ ├── x48y43.txt │ │ │ ├── x49y41.txt │ │ │ ├── x49y42.txt │ │ │ ├── x49y43.txt │ │ │ ├── x49y47.txt │ │ │ ├── x49y48.txt │ │ │ ├── x49y49.txt │ │ │ ├── x49y50.txt │ │ │ ├── x50y39.txt │ │ │ ├── x50y40.txt │ │ │ ├── x50y41.txt │ │ │ ├── x50y42.txt │ │ │ ├── x50y43.txt │ │ │ ├── x50y47.txt │ │ │ ├── x50y48.txt │ │ │ ├── x50y49.txt │ │ │ ├── x50y50.txt │ │ │ ├── x51y39.txt │ │ │ ├── x51y40.txt │ │ │ ├── x51y41.txt │ │ │ ├── x51y42.txt │ │ │ ├── x51y43.txt │ │ │ ├── x51y44.txt │ │ │ ├── x51y45.txt │ │ │ ├── x51y46.txt │ │ │ ├── x51y47.txt │ │ │ ├── x51y48.txt │ │ │ ├── x51y49.txt │ │ │ ├── x52y39.txt │ │ │ ├── x52y40.txt │ │ │ ├── x52y41.txt │ │ │ ├── x52y42.txt │ │ │ ├── x52y43.txt │ │ │ ├── x52y44.txt │ │ │ ├── x52y45.txt │ │ │ ├── x52y46.txt │ │ │ ├── x52y47.txt │ │ │ ├── x52y48.txt │ │ │ ├── x52y49.txt │ │ │ ├── x53y39.txt │ │ │ ├── x53y40.txt │ │ │ ├── x53y41.txt │ │ │ ├── x53y42.txt │ │ │ ├── x53y43.txt │ │ │ ├── x53y44.txt │ │ │ ├── x53y45.txt │ │ │ ├── x53y46.txt │ │ │ ├── x53y47.txt │ │ │ ├── x53y48.txt │ │ │ ├── x53y49.txt │ │ │ ├── x54y42.txt │ │ │ ├── x54y43.txt │ │ │ ├── x54y44.txt │ │ │ ├── x54y45.txt │ │ │ ├── x54y46.txt │ │ │ ├── x54y47.txt │ │ │ ├── x54y48.txt │ │ │ ├── x54y49.txt │ │ │ ├── x55y43.txt │ │ │ ├── x55y44.txt │ │ │ ├── x55y45.txt │ │ │ ├── x55y46.txt │ │ │ ├── x55y47.txt │ │ │ ├── x56y43.txt │ │ │ ├── x56y44.txt │ │ │ ├── x56y45.txt │ │ │ ├── x56y46.txt │ │ │ ├── x56y47.txt │ │ │ ├── x56y48.txt │ │ │ ├── x56y49.txt │ │ │ └── x56y50.txt │ │ └── warp/ │ │ ├── old/ │ │ │ ├── x50y50.txt │ │ │ └── x54y50.txt │ │ ├── x49y49.txt │ │ ├── x50y49.txt │ │ ├── x50y50.txt │ │ ├── x51y49.txt │ │ ├── x51y50.txt │ │ ├── x51y51.txt │ │ ├── x51y52.txt │ │ ├── x52y49.txt │ │ ├── x52y50.txt │ │ ├── x52y51.txt │ │ ├── x52y52.txt │ │ ├── x53y49.txt │ │ ├── x53y50.txt │ │ ├── x53y51.txt │ │ ├── x53y52.txt │ │ ├── x54y49.txt │ │ ├── x54y50.txt │ │ ├── x54y51.txt │ │ ├── x54y52.txt │ │ ├── x55y49.txt │ │ ├── x55y50.txt │ │ ├── x55y51.txt │ │ └── x55y52.txt │ ├── misc.hpp │ ├── overworld.txt │ └── render.hpp └── readme.MD ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ *.as linguist-language=ActionScript ================================================ FILE: .github/pull_request_template.md ================================================ ## 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?) - Translations and localizations of the game are not a community effort. If you want to translate the game, you should contact Terry. - 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. ## Changes: Describe your patch here! ## Legal Stuff: By submitting this pull request, I confirm that... - [ ] My changes may be used in a future commercial release of VVVVVV - [ ] I will be credited in a `CONTRIBUTORS` file and the "GitHub Friends" section of the credits for all of said releases, but will NOT be compensated for these changes unless there is a prior written agreement ================================================ FILE: .github/workflows/android.yml ================================================ name: CI (Android) # Only trigger workflow when Android-specific code could have changed. # This includes C/C++ files that have __ANDROID__ ifdefs. # If adding new ifdefs, make sure to update these lists. on: push: paths: - "desktop_version/CMakeLists.txt" - "desktop_version/src/ButtonGlyphs.cpp" - "desktop_version/src/FileSystemUtils.cpp" - "desktop_version/src/Screen.cpp" - "desktop_version/src/Vlogging.c" - "desktop_version/VVVVVV-android/gradlew" - "desktop_version/VVVVVV-android/gradlew.bat" - "desktop_version/VVVVVV-android/**/CMakeLists.txt" - "desktop_version/VVVVVV-android/**.java" - "desktop_version/VVVVVV-android/**.xml" - "desktop_version/VVVVVV-android/**.pro" - "desktop_version/VVVVVV-android/**.mk" - "desktop_version/VVVVVV-android/**.gradle" - "desktop_version/VVVVVV-android/**.jar" - "desktop_version/VVVVVV-android/**.properties" - ".github/workflows/android.yml" pull_request: paths: - "desktop_version/CMakeLists.txt" - "desktop_version/src/ButtonGlyphs.cpp" - "desktop_version/src/FileSystemUtils.cpp" - "desktop_version/src/Screen.cpp" - "desktop_version/src/Vlogging.c" - "desktop_version/VVVVVV-android/gradlew" - "desktop_version/VVVVVV-android/gradlew.bat" - "desktop_version/VVVVVV-android/**/CMakeLists.txt" - "desktop_version/VVVVVV-android/**.java" - "desktop_version/VVVVVV-android/**.xml" - "desktop_version/VVVVVV-android/**.pro" - "desktop_version/VVVVVV-android/**.mk" - "desktop_version/VVVVVV-android/**.gradle" - "desktop_version/VVVVVV-android/**.jar" - "desktop_version/VVVVVV-android/**.properties" - ".github/workflows/android.yml" env: SRC_DIR_PATH: VVVVVV/desktop_version/VVVVVV-android jobs: build: name: Build (Android) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true path: 'VVVVVV' - uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: '17' cache: 'gradle' - uses: actions/checkout@v4 with: repository: libsdl-org/SDL ref: release-2.30.8 path: 'SDL' - name: Build SDL run: | sudo apt-get -y install ninja-build cd SDL ./build-scripts/android-prefab.sh mvn install:install-file -Dfile=build-android-prefab/prefab-2.30.8/SDL2-2.30.8.aar -DpomFile=build-android-prefab/prefab-2.30.8/SDL2-2.30.8.pom - name: Build run: | cd ${SRC_DIR_PATH} ./gradlew build ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI # Only trigger workflow when code changes, or this file is changed. # Android has a different workflow and different rules. on: push: paths: - "desktop_version/CMakeLists.txt" - "desktop_version/src/**.cpp" - "desktop_version/src/**.c" - "desktop_version/src/**.h" - "third_party/**" - ".github/workflows/ci.yml" pull_request: paths: - "desktop_version/CMakeLists.txt" - "desktop_version/src/**.cpp" - "desktop_version/src/**.c" - "desktop_version/src/**.h" - "third_party/**" - ".github/workflows/ci.yml" permissions: contents: read statuses: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: SRC_DIR_PATH: desktop_version jobs: build-mac: name: Build (macos-latest) runs-on: macos-latest env: CXXFLAGS: -I/usr/local/include/SDL2 LDFLAGS: -L/usr/local/lib HOMEBREW_NO_ENV_HINTS: 1 # Suppress brew update hints steps: - uses: actions/checkout@v4 with: submodules: true - name: Cache Homebrew packages id: cache-brew uses: actions/cache@v3 with: path: | /usr/local/Cellar/ninja /usr/local/Cellar/sdl2 /usr/local/opt/sdl2 # Symlink often used key: ${{ runner.os }}-brew-${{ hashFiles('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ninja.rb', '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/sdl2.rb') }} # Using hash of formula files if available, or a fixed key for simplicity if not easily determined - name: Install dependencies if: steps.cache-brew.outputs.cache-hit != 'true' run: brew install ninja sdl2 - name: CMake configure (default version) run: | mkdir -p ${SRC_DIR_PATH}/build && cd ${SRC_DIR_PATH}/build cmake -G Ninja .. - name: Build (default version) run: ninja -C ${SRC_DIR_PATH}/build - name: CMake configure (official) run: | cd ${SRC_DIR_PATH}/build cmake -DOFFICIAL_BUILD=ON .. - name: Build (official) run: | ninja -C ${SRC_DIR_PATH}/build - name: CMake configure (M&P) run: | cd ${SRC_DIR_PATH}/build cmake -DOFFICIAL_BUILD=OFF -DMAKEANDPLAY=ON .. - name: Build (M&P) run: ninja -C ${SRC_DIR_PATH}/build build-lin: name: Build (Steam Linux Runtime Sniper) runs-on: ubuntu-latest container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest steps: - uses: actions/checkout@v4 with: submodules: true - name: CMake configure (default version) run: | mkdir -p ${SRC_DIR_PATH}/build && cd ${SRC_DIR_PATH}/build cmake -G Ninja .. - name: Build (default version) run: ninja -C ${SRC_DIR_PATH}/build - name: CMake configure (official) run: | cd ${SRC_DIR_PATH}/build cmake -G Ninja -DOFFICIAL_BUILD=ON .. - name: Build (official) run: ninja -C ${SRC_DIR_PATH}/build - name: CMake configure (M&P) run: | cd ${SRC_DIR_PATH}/build cmake -G Ninja -DOFFICIAL_BUILD=OFF -DMAKEANDPLAY=ON .. - name: Build (M&P) run: ninja -C ${SRC_DIR_PATH}/build build-win: name: Build (windows-latest) runs-on: windows-latest env: SDL_VERSION: 2.26.0 steps: - uses: actions/checkout@v4 with: submodules: true - name: Cache SDL id: cache-windows-sdl uses: actions/cache@v3 env: cache-name: cache-sdl with: path: C:\SDL2-* key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.SDL_VERSION }} - if: ${{ steps.cache-windows-sdl.outputs.cache-hit != 'true' }} name: Download SDL if not cached run: | Invoke-WebRequest "https://github.com/libsdl-org/SDL/releases/download/release-$env:SDL_VERSION/SDL2-devel-$env:SDL_VERSION-VC.zip" -OutFile C:\SDL.zip Expand-Archive C:\SDL.zip -DestinationPath C:\ - name: CMake initial configure/generate run: | mkdir $env:SRC_DIR_PATH/build cd $env:SRC_DIR_PATH/build $env:LDFLAGS = "/LIBPATH:C:\SDL2-$env:SDL_VERSION\lib\x86 " cmake -G "Visual Studio 17 2022" -A Win32 ` -DSDL2_INCLUDE_DIRS="C:\SDL2-$env:SDL_VERSION\include" ` -DSDL2_LIBRARIES="SDL2;SDL2main" .. - name: CMake configure (default version) run: | cd $env:SRC_DIR_PATH/build cmake .. - name: Build (default version) run: | cd $env:SRC_DIR_PATH/build cmake --build . - name: CMake configure (official) run: | cd $env:SRC_DIR_PATH/build cmake -DOFFICIAL_BUILD=ON .. - name: Build (official) run: | cd $env:SRC_DIR_PATH/build cmake --build . - name: CMake configure (M&P) run: | cd $env:SRC_DIR_PATH/build cmake -DOFFICIAL_BUILD=OFF -DMAKEANDPLAY=ON .. - name: Build (M&P) run: | cd $env:SRC_DIR_PATH/build cmake --build . ================================================ FILE: .gitmodules ================================================ [submodule "third_party/lodepng"] path = third_party/lodepng url = https://github.com/lvandeve/lodepng [submodule "third_party/physfs"] path = third_party/physfs url = https://github.com/icculus/physfs/ [submodule "third_party/tinyxml2"] path = third_party/tinyxml2 url = https://github.com/leethomason/tinyxml2/ [submodule "third_party/FAudio"] path = third_party/FAudio url = https://github.com/FNA-XNA/FAudio [submodule "third_party/c-hashmap"] path = third_party/c-hashmap url = https://github.com/Mashpoe/c-hashmap [submodule "third_party/SheenBidi"] path = third_party/SheenBidi url = https://github.com/Tehreer/SheenBidi ================================================ FILE: LICENSE.md ================================================ VVVVVV's source code is made available under a custom license. Basically, you can compile yourself a copy, for free, for personal use. But if you want to distribute a compiled version of the game, you might need permission first. See the [License exceptions](License%20exceptions.md) page for more information. 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](https://thelettervsixtim.es/makeandplay/). 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, with the exception of the contents of the "third_party" directory, 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. ================================================ FILE: License exceptions.md ================================================ VVVVVV's source code is made available under a [custom license](LICENSE.md), which states that you must not distribute any materials from the game (i.e. the game's assets) which are not included in this repo unless approved by us in writing. In general, if you're interested in creating something that falls outside the license terms, get in touch with [Terry](http://distractionware.com/email/)! There is an important general exception: if you're compiling a [Make and Play](https://thelettervsixtim.es/makeandplay/) version of the game, then you can you freely distribute the game's assets. The following is a list of projects which have been given permission by Terry to distribute the assets with distributions of the game, and under what conditions. Exceptions granted to the VVVVVV source code license ------- Last updated on January 23rd, 2024. | Project | Creator | Description | Conditions | Link | |---|---|---|---|---| | Any distribution of the VVVVVV: Make and Play edition | | All distributions and packages of the Make and Play edition can freely distribute the data assets, so long as they compile with the makeandplay define and do not distribute the original levels.| Must compile with the makeandplay define set, cannot distribute the original levels. | | | VVVVVV: Make and Play Edition |[Terry Cavanagh](http://distractionware.com/)|The free and official version of VVVVVV that includes player levels, and the tools to create your own levels, but does not include the original levels from the game.| Must compile with the makeandplay define set, cannot distribute the original levels. | [download](https://thelettervsixtim.es/makeandplay/) | | Ved | [Dav999 and InfoTeddy](https://github.com/Daaaav/Ved/graphs/contributors) | An external editor for VVVVVV levels. | No conditions. | [download](https://tolp.nl/ved/), [github repo](https://github.com/Daaaav/Ved) | | VVVVVV: Community Edition | https://github.com/v6cord/VVVVVV-CE/graphs/contributors | Community fork of VVVVVV focused on expanding the capabilities of player levels. | Must compile with the makeandplay define set, cannot distribute the original levels. | [github repo](https://github.com/v6cord/VVVVVV-CE) | | VVVVVVwasm|kotborealis|Web Assembly port of VVVVVV| Must compile with the makeandplay define set, cannot distribute the original levels. | [github repo](https://github.com/kotborealis/VVVVVVwasm) | | cursed_vvvvvv.exe | [MustardBucket](https://twitter.com/mustard_bucket/) | Modified version of VVVVVV where instead of flipping gravity you jump normally, can jump multiple times, and wall jump. | Make it impossible to revert to ordinary flipping behaviour. | [download](https://mustardbucket.itch.io/cursed-vvvvvv?secret=O0KvS02wD473pXBF9avreZsww), [twitter gif](https://twitter.com/mustard_bucket/status/1216272971779670016) | | Haiku Port | [Julius C. Enriquez](https://github.com/win8linux) | Port for the Haiku operating system. | Display the following text in the Haiku package to make it clear that this is an exception: "VVVVVV is a commercial game! The author has given special permission to make this Haiku version available for free. If you enjoy the game, please consider purchasing a copy at [thelettervsixtim.es](http://thelettervsixtim.es)." | [haiku recipe](https://github.com/haikuports/haikuports/tree/master/games-arcade/vvvvvv), [haiku data.zip recipe](https://github.com/haikuports/haikuports/tree/master/games-arcade/vvvvvv_data) | | Dreamcast Port | [Gustavo Aranda](https://github.com/gusarba/) | Port for the Sega Dreamcast. | Permission is given to distribute a ready-to-use CD image file for the Sega Dreamcast containing the data.zip assets for non commercial use only. | [github repo](https://github.com/gusarba/VVVVVVDC)| | XBox One/UWP Port | [tunip3](https://github.com/tunip3) | Port for XBOX ONE (DURANGO) via UWP. | Permission is given to distribute a pre-compiled package (containing the data.zip assets) for people to run on development mode xboxes, for non commercial use only. | [github repo](https://github.com/tunip3/DURANGO-V6)| | armhf Port | [johnnyonFlame](https://github.com/johnnyonFlame/) | Armhf port for Raspberry PI and other SBC devices| Permission is for non commercial use only. Display the following text in the readme to make it clear that this is an exception: "VVVVVV is a commercial game! The author has given special permission to make this port available for free. If you enjoy the game, please consider purchasing a copy at [thelettervsixtim.es](http://thelettervsixtim.es)."| [github release](https://github.com/JohnnyonFlame/VVVVVV/releases/tag/v2.4-r1) | | PortMaster distributions of the game for Linux Handheld devices | [portmaster](https://portmaster.games/) | A port manager GUI for Linux handheld devices | Permission is for non commercial use only. Display the following text in the readme to make it clear that this is an exception: "VVVVVV is a commercial game! The author has given special permission to make this port available for free. If you enjoy the game, please consider purchasing a copy at [thelettervsixtim.es](http://thelettervsixtim.es)."| [website](https://portmaster.games/detail.html?name=vvvvvv) | | Wii Port | [Alberto Mardegan](https://github.com/mardy/) | Port for the Nintendo Wii. | Permission is given to distribute a ready-to-use build for the Nintendo Wii containing the data.zip assets for non commercial use only. | [github repo](https://github.com/mardy/VVVVVV/tree/wii) | | Recalbox Port | [digitalLumberjack](https://gitlab.com/recalbox/recalbox) | Port for Recalbox project. | Display the following text in the readme to make it clear that this is an exception: "VVVVVV is a commercial game! The author has given special permission to make this port available for free. If you enjoy the game, please consider purchasing a copy at [thelettervsixtim.es](http://thelettervsixtim.es)." | [website](https://recalbox.com/) | ================================================ FILE: README.md ================================================ ![logo](logo.gif "VVVVVV") This is the source code to VVVVVV, the 2010 indie game by [Terry Cavanagh](http://distractionware.com/), with music by [Magnus Pålsson](http://souleye.madtracker.net/). You can read the [announcement](http://distractionware.com/blog/2020/01/vvvvvv-is-now-open-source/) of the source code release on Terry's blog! The source code for the desktop version is in [this folder](desktop_version). VVVVVV is still commercially available at [thelettervsixtim.es](https://thelettervsixtim.es/) if you'd like to support it, but you are completely free to compile the game for your own personal use. If you're interested in distributing a compiled version of the game, see [LICENSE.md](LICENSE.md) for more information. Discussion about VVVVVV updates mainly happens on the "unofficial" [VVVVVV discord](https://discord.gg/Zf7Nzea), in the `vvvvvv-code` channel. Credits ------- - Created by [Terry Cavanagh](http://distractionware.com/) - Room Names by [Bennett Foddy](http://www.foddy.net) - Music by [Magnus Pålsson](https://magnuspalsson.com/) - Metal Soundtrack by [FamilyJules](https://link.space/@familyjules) - 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/) - Additional coding by [Misa Kai](https://infoteddy.info/) - Beta Testing by Sam Kaplan and Pauli Kohberger - Ending Picture by Pauli Kohberger - Localisations by [our localisation teams](desktop_version/TRANSLATORS.txt) - With additional contributions by [many others here on github](desktop_version/CONTRIBUTORS.txt) <3 ================================================ FILE: desktop_version/.dockerignore ================================================ ** !Dockerfile ================================================ FILE: desktop_version/.gitignore ================================================ # Build objects build/ flibitBuild/ CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile VVVVVV.exe VVVVVV *.a *.gch src/Version.h.out src/InterimVersion.out.c # Game data data.zip # macOS files .DS_Store ================================================ FILE: desktop_version/AppIcon.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "filename" : "AppIcon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" } ], "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: desktop_version/AppIcon.xcassets/Contents.json ================================================ { "info" : { "author" : "xcode", "version" : 1 } } ================================================ FILE: desktop_version/CMakeLists.txt ================================================ # CMake File for VVVVVV # Written by Ethan "flibitijibibo" Lee cmake_minimum_required(VERSION 2.8.12...3.5) # CMake Options option(ENABLE_WARNINGS "Enable compilation warnings" ON) option(ENABLE_WERROR "Treat compilation warnings as errors" OFF) option(BUNDLE_DEPENDENCIES "Use bundled TinyXML-2, PhysicsFS, and FAudio (if disabled, TinyXML-2, PhysicsFS, and FAudio will be dynamically linked; LodePNG, C-HashMap and SheenBidi will still be statically linked)" ON) option(STEAM "Use the Steam API" OFF) option(GOG "Use the GOG API" OFF) option(OFFICIAL_BUILD "Compile an official build of the game" OFF) option(MAKEANDPLAY "Compile a version of the game without the main campaign (provided for convenience; consider modifying MakeAndPlay.h instead" OFF) if(OFFICIAL_BUILD AND NOT MAKEANDPLAY) set(STEAM ON) set(GOG ON) endif() option(REMOVE_ABSOLUTE_PATHS "If supported by the compiler, replace all absolute paths to source directories compiled into the binary (if any) with relative paths" ON) # Architecture Flags if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") # Wow, Apple is a huge jerk these days huh? set(OSX_10_9_SDK_PATH /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk) if(NOT CMAKE_OSX_SYSROOT) if(IS_DIRECTORY ${OSX_10_9_SDK_PATH}) set(CMAKE_OSX_SYSROOT ${OSX_10_9_SDK_PATH}) else() message(WARNING "CMAKE_OSX_SYSROOT not set and macOS 10.9 SDK not found! Using default one.") endif() endif() set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) link_directories(/usr/local/lib) add_compile_options(-Werror=partial-availability) elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0) # SDL goes back to iOS 8.0, but modern Xcode doesn't endif() project(VVVVVV) if(APPLE) message(STATUS "Using macOS SDK at ${CMAKE_OSX_SYSROOT}") endif() # RPATH if(NOT WIN32) if(CMAKE_SYSTEM_NAME STREQUAL "iOS") set(BIN_LIBROOT "Frameworks") set(BIN_RPATH "@executable_path/Frameworks") elseif(APPLE) set(BIN_LIBROOT "osx") set(BIN_RPATH "@executable_path/osx") elseif(CMAKE_SIZEOF_VOID_P MATCHES "8") set(BIN_LIBROOT "lib64") set(BIN_RPATH "\$ORIGIN/lib64") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--disable-new-dtags") else() set(BIN_LIBROOT "lib") set(BIN_RPATH "\$ORIGIN/lib") endif() set(CMAKE_SKIP_BUILD_RPATH TRUE) set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) set(CMAKE_INSTALL_RPATH ${BIN_RPATH}) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) endif() # Source Lists set(VVV_CXX_SRC src/BinaryBlob.cpp src/BlockV.cpp src/ButtonGlyphs.cpp src/CustomLevels.cpp src/CWrappers.cpp src/Editor.cpp src/Ent.cpp src/Entity.cpp src/FileSystemUtils.cpp src/Finalclass.cpp src/Font.cpp src/FontBidi.cpp src/Game.cpp src/Graphics.cpp src/GraphicsResources.cpp src/GraphicsUtil.cpp src/IMERender.cpp src/Input.cpp src/KeyPoll.cpp src/Labclass.cpp src/LevelDebugger.cpp src/Localization.cpp src/LocalizationMaint.cpp src/LocalizationStorage.cpp src/Logic.cpp src/Map.cpp src/Music.cpp src/Otherlevel.cpp src/preloader.cpp src/Render.cpp src/RenderFixed.cpp src/RoomnameTranslator.cpp src/Screen.cpp src/Script.cpp src/Scripts.cpp src/Spacestation2.cpp src/TerminalScripts.cpp src/Textbox.cpp src/Tower.cpp src/UtilityClass.cpp src/WarpClass.cpp src/XMLUtils.cpp src/main.cpp ) set(VVV_C_SRC src/DeferCallbacks.c src/GlitchrunnerMode.c src/Network.c src/Textbook.c src/ThirdPartyDeps.c src/UTF8.c src/VFormat.c src/Vlogging.c src/Xoshiro.c ../third_party/physfs/extras/physfsrwops.c ) if(STEAM) list(APPEND VVV_C_SRC src/SteamNetwork.c) endif() if(GOG) list(APPEND VVV_C_SRC src/GOGNetwork.c) endif() if(CMAKE_SYSTEM_NAME STREQUAL "iOS") list(APPEND VVV_C_SRC src/SDL_uikit_main.c) endif() set(VVV_SRC ${VVV_CXX_SRC} ${VVV_C_SRC}) # Executable information if(WIN32) add_executable(VVVVVV WIN32 ${VVV_SRC} icon.rc) elseif(ANDROID) add_library(VVVVVV SHARED ${VVV_SRC}) elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") file(GLOB_RECURSE REPO_RESOURCES "fonts/*" "lang/*") add_executable(VVVVVV MACOSX_BUNDLE ${VVV_SRC} ${DATA_ZIP} AppIcon.xcassets ${REPO_RESOURCES}) set_target_properties(VVVVVV PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.distractionware.vvvvvvmobile" XCODE_ATTRIBUTE_PRODUCT_NAME "VVVVVV" XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2" # iPhone, iPad XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION "2.5" XCODE_ATTRIBUTE_MARKETING_VERSION "2.5" XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon XCODE_ATTRIBUTE_GENERATE_INFOPLIST_FILE YES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist" XCODE_ATTRIBUTE_INFOPLIST_KEY_LSSupportsOpeningDocumentsInPlace YES XCODE_ATTRIBUTE_INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents YES RESOURCE "${DATA_ZIP};AppIcon.xcassets" ) foreach(REPO_FILE ${REPO_RESOURCES}) file(RELATIVE_PATH REPO_FILE_REL "${CMAKE_CURRENT_SOURCE_DIR}" ${REPO_FILE}) get_filename_component(REPO_FILE_DIR ${REPO_FILE_REL} DIRECTORY) set_property(SOURCE ${REPO_FILE} PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${REPO_FILE_DIR}") source_group("Resources/${REPO_FILE_DIR}" FILES "${REPO_FILE}") endforeach() else() add_executable(VVVVVV ${VVV_SRC}) endif() # Include Directories if(BUNDLE_DEPENDENCIES) target_include_directories( VVVVVV PRIVATE src ../third_party ../third_party/tinyxml2 ../third_party/physfs/src ../third_party/physfs/extras ../third_party/lodepng ../third_party/c-hashmap ../third_party/FAudio/include ../third_party/FAudio/src ../third_party/SheenBidi/Headers ) else() target_include_directories( VVVVVV PRIVATE src ../third_party ../third_party/lodepng ../third_party/physfs/extras ../third_party/c-hashmap ../third_party/FAudio/src ../third_party/SheenBidi/Headers ) endif() if(MAKEANDPLAY) target_compile_definitions(VVVVVV PRIVATE -DMAKEANDPLAY) endif() if(STEAM) target_compile_definitions(VVVVVV PRIVATE -DSTEAM_NETWORK) endif() if(GOG) target_compile_definitions(VVVVVV PRIVATE -DGOG_NETWORK) endif() set(XML2_SRC ../third_party/tinyxml2/tinyxml2.cpp ) set(FAUDIO_SRC ../third_party/FAudio/src/FAudio.c ../third_party/FAudio/src/FAudio_internal.c ../third_party/FAudio/src/FAudio_internal_simd.c ../third_party/FAudio/src/FAudio_operationset.c ../third_party/FAudio/src/FAudio_platform_sdl2.c ) set(PFS_SRC ../third_party/physfs/src/physfs.c ../third_party/physfs/src/physfs_archiver_dir.c ../third_party/physfs/src/physfs_archiver_unpacked.c ../third_party/physfs/src/physfs_archiver_zip.c ../third_party/physfs/src/physfs_byteorder.c ../third_party/physfs/src/physfs_unicode.c ../third_party/physfs/src/physfs_platform_posix.c ../third_party/physfs/src/physfs_platform_unix.c ../third_party/physfs/src/physfs_platform_windows.c ../third_party/physfs/src/physfs_platform_haiku.cpp ../third_party/physfs/src/physfs_platform_android.c ) if(APPLE) # Are you noticing a pattern with this Apple crap yet? set(PFS_SRC ${PFS_SRC} ../third_party/physfs/src/physfs_platform_apple.m) endif() set(PNG_SRC src/lodepng_wrapper.c) set(PNG_DEF -DLODEPNG_NO_COMPILE_ALLOCATORS -DLODEPNG_NO_COMPILE_DISK) set(CHM_SRC ../third_party/c-hashmap/map.c) set(SBIDI_SRC ../third_party/SheenBidi/Source/SheenBidi.c) if(NOT OFFICIAL_BUILD) # Add interim commit hash and its date to the build # These filenames have to be qualified, because when we run # the CMake script, its work dir gets set to the build folder set(VERSION_INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/InterimVersion.in.c) set(VERSION_OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/InterimVersion.out.c) add_custom_command( # This OUTPUT line is required for this to be ran every time OUTPUT ${VERSION_OUTPUT_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/src/_dummy.c COMMAND ${CMAKE_COMMAND} # These args have to be passed through, otherwise the script can't see them # Also, these args have to come BEFORE `-P`! (Otherwise it fails with an unclear error) -DINPUT_FILE=${VERSION_INPUT_FILE} -DOUTPUT_FILE=${VERSION_OUTPUT_FILE} -P ${CMAKE_CURRENT_SOURCE_DIR}/version.cmake ) target_compile_definitions(VVVVVV PRIVATE -DINTERIM_VERSION_EXISTS) add_library(InterimVersion STATIC src/InterimVersion.out.c) list(APPEND STATIC_LIBRARIES InterimVersion) endif() # Build options if(ENABLE_WARNINGS) # The weird syntax is due to CMake generator expressions. # Saves quite a few lines and boilerplate at the price of readability. target_compile_options(VVVVVV PRIVATE $<$,$,$>: -Wall -Wpedantic $<$:-Werror>> $<$: /W4 $<$:/WX>>) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(SUPPORTS_IMPLICIT_FALLTHROUGH TRUE) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) set(SUPPORTS_IMPLICIT_FALLTHROUGH TRUE) else() set(SUPPORTS_IMPLICIT_FALLTHROUGH FALSE) endif() else() set(SUPPORTS_IMPLICIT_FALLTHROUGH FALSE) endif() if(SUPPORTS_IMPLICIT_FALLTHROUGH) target_compile_options(VVVVVV PRIVATE -Werror=implicit-fallthrough) endif() if(MSVC) # Disable MSVC warnings about implicit conversion target_compile_options(VVVVVV PRIVATE /wd4244) endif() # Disable warnings about `long long` in C++03 (from including PhysFS) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") target_compile_options(VVVVVV PRIVATE -Wno-long-long) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_compile_options(VVVVVV PRIVATE -Wno-c++11-long-long) endif() # Disable warnings about flexible array members in C++ (from including FAudio) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_compile_options(VVVVVV PRIVATE -Wno-c99-extensions) endif() # Set standards version, disable exceptions and RTTI if(MSVC) # MSVC doesn't have /std:c99 or /std:c++98 switches! # MSVC does not officially support disabling exceptions, # so this is as far as we are willing to go to disable them. string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set_source_files_properties(${VVV_CXX_SRC} PROPERTIES COMPILE_FLAGS "/EHsc /GR-") if(MSVC_VERSION GREATER 1900) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") endif() else() string(REGEX REPLACE "-std=[a-z0-9]+" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set_source_files_properties(${VVV_C_SRC} PROPERTIES COMPILE_FLAGS -std=c99) string(REGEX REPLACE "-std=[a-z0-9+]+" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "-fexceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set_source_files_properties(${VVV_CXX_SRC} PROPERTIES COMPILE_FLAGS "-std=c++98 -fno-exceptions -fno-rtti") # Dependencies (as needed) set_source_files_properties(${FAUDIO_SRC} PROPERTIES COMPILE_FLAGS -std=c99) set_source_files_properties(${CHM_SRC} PROPERTIES COMPILE_FLAGS -std=c99) endif() add_library(c-hashmap-static STATIC ${CHM_SRC}) add_library(sheenbidi-static STATIC ${SBIDI_SRC}) target_compile_definitions(sheenbidi-static PRIVATE -DSB_CONFIG_UNITY ) target_include_directories(sheenbidi-static PRIVATE ../third_party/SheenBidi/Headers ) if(BUNDLE_DEPENDENCIES) list(APPEND STATIC_LIBRARIES lodepng-static physfs-static tinyxml2-static c-hashmap-static faudio-static sheenbidi-static) else() list(APPEND STATIC_LIBRARIES c-hashmap-static sheenbidi-static) endif() if(BUNDLE_DEPENDENCIES) add_library(lodepng-static STATIC ${PNG_SRC}) target_compile_definitions(lodepng-static PRIVATE ${PNG_DEF}) add_library(tinyxml2-static STATIC ${XML2_SRC}) add_library(physfs-static STATIC ${PFS_SRC}) target_compile_definitions(physfs-static PRIVATE -DPHYSFS_SUPPORTS_DEFAULT=0 -DPHYSFS_SUPPORTS_ZIP=1 ) add_library(faudio-static STATIC ${FAUDIO_SRC}) target_include_directories( faudio-static PRIVATE ../third_party/FAudio/include ) # Disable FAudio debug stuff in release mode. This needs a generator expression for CMake reasons(TM) target_compile_definitions(faudio-static PRIVATE $<$:FAUDIO_DISABLE_DEBUGCONFIGURATION>) target_link_libraries(VVVVVV ${STATIC_LIBRARIES}) else() target_compile_definitions(VVVVVV PRIVATE ${PNG_DEF} -DSYSTEM_LODEPNG ) target_link_libraries(VVVVVV ${STATIC_LIBRARIES} physfs tinyxml2 FAudio lodepng) endif() if(MSVC) # Statically link Microsoft's runtime library so end users don't have to install it (/MT) # Also, build with multiple processors (/MP) list(APPEND GLOBAL_COMPILE_FLAGS /MT /MP) endif() if(REMOVE_ABSOLUTE_PATHS) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.8) set(SUPPORTS_DEBUG_PREFIX_MAP TRUE) else() set(SUPPORTS_DEBUG_PREFIX_MAP FALSE) endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 10.0) set(SUPPORTS_FILE_PREFIX_MAP TRUE) else() set(SUPPORTS_FILE_PREFIX_MAP FALSE) endif() elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(SUPPORTS_DEBUG_PREFIX_MAP TRUE) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0) set(SUPPORTS_FILE_PREFIX_MAP TRUE) else() set(SUPPORTS_FILE_PREFIX_MAP FALSE) endif() else() set(SUPPORTS_DEBUG_PREFIX_MAP FALSE) set(SUPPORTS_FILE_PREFIX_MAP FALSE) endif() get_filename_component(REPO_DIR ../ ABSOLUTE) # Remove absolute source paths from compiled binary if(SUPPORTS_FILE_PREFIX_MAP) list(APPEND GLOBAL_COMPILE_FLAGS -ffile-prefix-map=${REPO_DIR}=.) elseif(SUPPORTS_DEBUG_PREFIX_MAP) list(APPEND GLOBAL_COMPILE_FLAGS -fdebug-prefix-map=${REPO_DIR}=.) endif() endif() target_compile_options(VVVVVV PRIVATE ${GLOBAL_COMPILE_FLAGS}) foreach(static_library IN LISTS STATIC_LIBRARIES) target_compile_options(${static_library} PRIVATE ${GLOBAL_COMPILE_FLAGS}) endforeach(static_library) # 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 SYSTEM PRIVATE "$") target_link_libraries(VVVVVV ${SDL2_LIBRARIES}) if(BUNDLE_DEPENDENCIES) target_include_directories(faudio-static SYSTEM PRIVATE "$") target_link_libraries(faudio-static ${SDL2_LIBRARIES}) endif() elseif (EMSCRIPTEN) message(STATUS "Using Emscripten SDL2") target_compile_options(VVVVVV PUBLIC -sUSE_SDL=2) target_link_libraries(VVVVVV -sUSE_SDL=2) if(BUNDLE_DEPENDENCIES) target_compile_options(faudio-static PUBLIC -sUSE_SDL=2) target_link_libraries(faudio-static -sUSE_SDL=2) endif() elseif(DEFINED SDL2_FRAMEWORK) message(STATUS "Using pre-defined SDL2 variable SDL2_FRAMEWORK") target_include_directories(VVVVVV SYSTEM PRIVATE "$") target_link_libraries(VVVVVV ${SDL2_FRAMEWORK}) if(BUNDLE_DEPENDENCIES) target_include_directories(faudio-static SYSTEM PRIVATE "$") target_link_libraries(faudio-static ${SDL2_FRAMEWORK}) endif() set_target_properties(VVVVVV PROPERTIES XCODE_EMBED_FRAMEWORKS ${SDL2_FRAMEWORK}) 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) if(BUNDLE_DEPENDENCIES) target_link_libraries(faudio-static SDL2::SDL2) endif() elseif(TARGET SDL2) message(STATUS "Using TARGET SDL2") target_link_libraries(VVVVVV SDL2) if(BUNDLE_DEPENDENCIES) target_link_libraries(faudio-static SDL2) endif() else() message(STATUS "No TARGET SDL2::SDL2, or SDL2, using variables") target_include_directories(VVVVVV SYSTEM PRIVATE "$") target_link_libraries(VVVVVV ${SDL2_LIBRARIES}) if(BUNDLE_DEPENDENCIES) target_include_directories(faudio-static SYSTEM PRIVATE "$") target_link_libraries(faudio-static ${SDL2_LIBRARIES}) endif() 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() # But hey, also some Haiku crap if(HAIKU) find_library(BE_LIBRARY be) find_library(ROOT_LIBRARY root) target_link_libraries(VVVVVV ${BE_LIBRARY} ${ROOT_LIBRARY}) endif() if(EMSCRIPTEN) # 256MB is enough for everybody target_link_libraries(VVVVVV -sFORCE_FILESYSTEM=1 -sTOTAL_MEMORY=256MB) endif() ================================================ FILE: desktop_version/CONTRIBUTORS.txt ================================================ Contributors ------------ (Ordered alphabetically by first name.) * Alexandra Fox * AlexApps99 (@AlexApps99) * Allison Fleischer (AllisonFleischer) * Brian Callahan (@ibara) * Charlie Bruce (@charliebruce) * Christoph Böhmwalder (@chrboe) * Daniel Lee (@ddm999) * Dav999 (@Daaaav) * Elijah Stone (@moon-chilled) * Elliott Saltar (@eboyblue3) * Emmanuel Vadot (@evadot) * fraZ0R (@f-raZ0R) * Fredrik Ljungdahl (@FredrIQ) * iliana etaoin (@iliana) * Jules de Sartiges (@strikersh) * Keith Stellyes (@keithstellyes) * KyoZM (@lsaa) * leo vriska (@leo60228) * MAO3J1m0Op (@MAO3J1m0Op) * Malte Grimm (@trelbutate) * Marvin Scholz (@ePirat) * Matt Penny (@mwpenny) * Misa Elizabeth Kai (@InfoTeddy) * mothbeanie (@mothbeanie) * Nichole Mattera (@NicholeMattera) * Pierre-Alain TORET (@daftaupe) * Reese Rivers (@ReeseTheRivers) * Rémi Verschelde (@akien-mga) * SnDream (@SnDream) * Space-G (@Space-G) * Thomas Sänger (@HorayNarea) * Tynan Richards (@tzann) * Wouter (@Xesxen) * viri (viri.moe) * Vittorio Romeo (@SuperV1234) * Yussur Mustafa Oraji (@N00byKing) ================================================ FILE: desktop_version/Dockerfile ================================================ FROM centos:7 # run first to improve caching (other things update more often than SDL2) WORKDIR /tmp RUN curl -LJO https://github.com/libsdl-org/SDL/releases/download/release-2.24.0/SDL2-2.24.0.tar.gz RUN tar -xf SDL2-2.24.0.tar.gz RUN mkdir SDL2-2.24.0/build # add EPEL (for SDL2) RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # install dependencies RUN yum -y install \ # used below yum-utils \ # VVVVVV dependencies gcc-c++ cmake make RUN yum-builddep -y SDL2 RUN yum clean all WORKDIR /tmp/SDL2-2.24.0/build RUN ../configure RUN make -j $(nproc) RUN make install WORKDIR /tmp RUN rm -rf SDL2-2.24.0.tar.gz SDL2-2.24.0/ WORKDIR / ================================================ FILE: desktop_version/Info.plist ================================================ UIFileSharingEnabled ================================================ FILE: desktop_version/README.md ================================================ 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](https://libsdl.org/) 2.24.0+. All other dependencies are statically linked into the engine. The development libraries for Windows can be downloaded from SDL's website, Linux developers can find the dev libraries from their respective repositories, and macOS developers should compile and install from source. (If you're on Ubuntu and your Ubuntu is too old to have this SDL version, then [see here](https://github.com/TerryCavanagh/VVVVVV/issues/618#issuecomment-968338212) for workarounds.) Since VVVVVV 2.4, git submodules are used for the [third party libraries](https://github.com/TerryCavanagh/VVVVVV/tree/master/third_party). After cloning, run `git submodule update --init` to set all of these up. You can also use this command whenever the submodules need to be updated. 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 build the Make and Play edition of the game, uncomment `#define MAKEANDPLAY` in `MakeAndPlay.h`. To generate the projects on Windows: ``` # Put your SDL2 folders somewhere nice! mkdir build cd build cmake -A Win32 -G "Visual Studio 10 2010" .. -DSDL2_INCLUDE_DIRS="C:\SDL2-2.24.0\include" -DSDL2_LIBRARIES="C:\SDL2-2.24.0\lib\x86\SDL2;C:\SDL2-2.24.0\lib\x86\SDL2main" ``` Then to compile the game, open the solution and click Build. For more detailed information and troubleshooting, see the [Compiling VVVVVV Guide](https://vsix.dev/wiki/Guide:Compiling_VVVVVV_on_Windows_with_Visual_Studio) on the Viki. To generate everywhere else: ``` mkdir build cd build cmake .. ``` Then to compile the game, type `make`. Including data.zip ------------ You'll need the data.zip file from VVVVVV to actually run the game! You can grab it from your copy of the game, or you can just download it for free from the [Make and Play](https://thelettervsixtim.es/makeandplay/) page. Put this file next to your executable and the game should run. This is intended for personal use only - our license doesn't allow you to actually distribute this data.zip file with your own forks without getting permission from us first. See [LICENSE.md](../LICENSE.md) for more details. ================================================ FILE: desktop_version/TRANSLATORS.txt ================================================ Translators ------------ Arabic (Eternal Dream Arabization): - Montassar Ghanmi - Mohammed Seif Eddine Chaib Catalan: - Eduard Ereza Martínez Welsh: - Morgan Roberts German: - Thomas Faust Esperanto: - Reese Rivers Spanish (ES): - Felipe Mercader - Sara Marín Spanish (LATAM): - LocQuest - Guido Di Carlo Spanish (ARG.): - LocQuest - Guido Di Carlo French: - Words of Magic Irish: - Úna-Minh Kavanagh - Seaghán Ó Modhráin - Davis Sandefur Italian (gloc.team): - Alain Dellepiane - Matteo Scarabelli - Lorenzo Bertolucci - Fabio Bortolotti Japanese: - Nicalis, Inc. - KabanFriends Korean: - Bada Im - Hyungseok Cho Dutch: - Dav999 Polish: - Kuba Kallus Brazilian Portuguese: Translators: - Lucas Araujo - Thiago Araujo Editing and LQA: - Ivan Lopes - Lucas Nunes European Portuguese: - Locsmiths Russian: - TheMysticSword Silesian: - Kuba Kallus Turkish: - Engin İlkiz Ukrainian: - Olya Sushytska Chinese (Simplified): - Sound of Mystery Chinese (Traditional): - Sound of Mystery / craft ================================================ FILE: desktop_version/VVVVVV-android/.gitignore ================================================ # Gradle files .gradle/ build/ # Local configuration file (sdk path, etc) local.properties # Log/OS Files *.log # Android Studio generated files and folders captures/ .externalNativeBuild/ .cxx/ *.apk output.json output-metadata.json # IntelliJ *.iml .idea/ misc.xml deploymentTargetDropDown.xml render.experimental.xml # Keystore files *.jks *.keystore # Google Services (e.g. APIs or Firebase) google-services.json # Android Profiling *.hprof ================================================ FILE: desktop_version/VVVVVV-android/README.md ================================================ Android port for C++ version ============================ This is _not_ the other existing mobile version (which is a fork of the original Flash version). This is a port of the C++ desktop version, because the C++ version has gotten many improvements since the source release (along with Flash being deprecated in general). How to Build ------------ The recommended way is to install Android Studio and Maven. These instructions are for SDL 2.30.8; adapt your SDL version accordingly. 1. Place a copy of `data.zip` in `desktop_version/VVVVVV-android/app/src/main/assets/`. (If the `assets/` folder doesn't exist, then create it.) 2. Obtain the SDL 2.30.8 Maven package. As of writing, SDL currently does not publish Maven packages, so here is one way to obtain them (other methods are possible): 1. Download the SDL 2.30.8 source code. 2. Run the `build-scripts/android-prefab.sh` script in the SDL repository. 3. After building, run `mvn install:install-file -Dfile=build-android-prefab/prefab-2.30.8/SDL2-2.30.8.aar -DpomFile=build-android-prefab/prefab-2.30.8/SDL2-2.30.8.pom` to install it to Maven Local. 3. Open the `desktop_version/VVVVVV-android/` folder in Android Studio. 4. Click 'Build'. How to Install and Play ----------------------- After building, go to `desktop_version/VVVVVV-android/app/build/outputs/apk/`, copy the APK of the appropriate architecture to your device, and install it. Touchscreen support is currently not implemented, so you will need to connect a keyboard or controller to your device in order to play the game. ================================================ FILE: desktop_version/VVVVVV-android/app/build.gradle ================================================ def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY'); def buildAsApplication = !buildAsLibrary if (buildAsApplication) { apply plugin: 'com.android.application' } else { apply plugin: 'com.android.library' } android { if (buildAsApplication) { namespace "com.distractionware.vvvvvv" } compileSdkVersion 34 defaultConfig { minSdkVersion 29 targetSdkVersion 34 versionCode 20005000 versionName "2.5" applicationId "air.com.distractionware.vvvvvvmobile" externalNativeBuild { cmake { arguments "-DANDROID_STL=c++_shared" } } } buildFeatures { prefab true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } applicationVariants.all { variant -> tasks["merge${variant.name.capitalize()}Assets"] .dependsOn("externalNativeBuild${variant.name.capitalize()}") } if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) { sourceSets.main { jniLibs.srcDir 'libs' } externalNativeBuild { cmake { path 'jni/CMakeLists.txt' } } } lint { abortOnError false } aaptOptions { noCompress 'zip' } if (buildAsLibrary) { libraryVariants.all { variant -> variant.outputs.each { output -> def outputFile = output.outputFile if (outputFile != null && outputFile.name.endsWith(".aar")) { def fileName = "org.libsdl.app.aar"; output.outputFile = new File(outputFile.parent, fileName); } } } } splits { abi { enable true } } sourceSets { main { assets { srcDir layout.buildDirectory.dir("generated/main/assets") } } } } def zipRepoAssetsTask = tasks.register("zipRepoAssets", Zip) { from('../../fonts') { spec -> spec.into('graphics') } from('../../lang') { spec -> spec.into('lang') } archiveFileName.set('repo.zip') destinationDirectory.value(layout.buildDirectory.dir("generated/main/assets")) } project.android.applicationVariants.configureEach { variant -> def compressAssetsTask = project.tasks.named("merge${variant.name.capitalize()}Assets") compressAssetsTask.configure { task -> task.dependsOn zipRepoAssetsTask } } afterEvaluate { [lintReportDebug, lintAnalyzeDebug, lintReportRelease, lintAnalyzeRelease, lintVitalReportRelease, lintVitalAnalyzeRelease].each { task -> task.dependsOn zipRepoAssetsTask } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'org.jetbrains:annotations:15.0' implementation 'androidx.core:core:1.10.1' implementation 'androidx.exifinterface:exifinterface:1.3.6' implementation 'org.libsdl.android:SDL2:2.30.8' } ================================================ FILE: desktop_version/VVVVVV-android/app/jni/Android.mk ================================================ include $(call all-subdir-makefiles) ================================================ FILE: desktop_version/VVVVVV-android/app/jni/Application.mk ================================================ # Uncomment this if you're using STL in your project # You can find more information here: # https://developer.android.com/ndk/guides/cpp-support # APP_STL := c++_shared APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 # Min runtime API level APP_PLATFORM=android-16 ================================================ FILE: desktop_version/VVVVVV-android/app/jni/CMakeLists.txt ================================================ cmake_minimum_required(VERSION 3.6) project(VVVVVV_android) # armeabi-v7a requires cpufeatures library # include(AndroidNdkModules) # android_ndk_import_module_cpufeatures() # Compilation of companion libraries #add_subdirectory(SDL_image) #add_subdirectory(SDL_mixer) #add_subdirectory(SDL_ttf) add_subdirectory(../../.. desktop_version) ================================================ FILE: desktop_version/VVVVVV-android/app/proguard-rules.pro ================================================ # Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in [sdk]/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/AndroidManifest.xml ================================================ ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/java/com/distractionware/vvvvvv/BaseDirProvider.java ================================================ package com.distractionware.vvvvvv; import android.database.Cursor; import android.database.MatrixCursor; import android.database.MatrixCursor.RowBuilder; import android.net.Uri; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Document; import android.provider.DocumentsContract.Root; import java.io.File; import java.io.FileNotFoundException; public class BaseDirProvider extends FileSystemProvider { private static final String AUTHORITY = "com.distractionware.vvvvvv.basedir"; private static final String DOC_ID_ROOT = "vvvvvv"; private static final String[] DEFAULT_ROOT_PROJECTION = new String[]{ Root.COLUMN_ROOT_ID, Root.COLUMN_FLAGS, Root.COLUMN_ICON, Root.COLUMN_TITLE, Root.COLUMN_DOCUMENT_ID, }; private static final String[] DEFAULT_DOCUMENT_PROJECTION = new String[]{ Document.COLUMN_DOCUMENT_ID, Document.COLUMN_MIME_TYPE, Document.COLUMN_DISPLAY_NAME, Document.COLUMN_LAST_MODIFIED, Document.COLUMN_FLAGS, Document.COLUMN_SIZE, }; private File mRoot; @Override public boolean onCreate() { super.onCreate(DEFAULT_DOCUMENT_PROJECTION); mRoot = getContext().getExternalFilesDir(null); return true; } @Override public Cursor queryRoots(String[] projection) throws FileNotFoundException { final MatrixCursor result = new MatrixCursor(resolveRootProjection(projection)); final RowBuilder row = result.newRow(); row.add(Root.COLUMN_ROOT_ID, DOC_ID_ROOT); row.add(Root.COLUMN_FLAGS, Root.FLAG_LOCAL_ONLY | Root.FLAG_SUPPORTS_CREATE | Root.FLAG_SUPPORTS_SEARCH | Root.FLAG_SUPPORTS_IS_CHILD); row.add(Root.COLUMN_ICON, R.mipmap.ic_launcher); row.add(Root.COLUMN_TITLE, "VVVVVV"); row.add(Root.COLUMN_DOCUMENT_ID, DOC_ID_ROOT); return result; } @Override protected Uri buildNotificationUri(String docId) { return DocumentsContract.buildChildDocumentsUri(AUTHORITY, docId); } private static String[] resolveRootProjection(String[] projection) { return projection != null ? projection : DEFAULT_ROOT_PROJECTION; } private static String[] resolveDocumentProjection(String[] projection) { return projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION; } @Override protected String getDocIdForFile(File file) { return "raw:" + file.getAbsolutePath(); } @Override protected File getFileForDocId(String documentId, boolean visible) throws FileNotFoundException { if (DOC_ID_ROOT.equals(documentId)) { return mRoot; } else if (documentId.startsWith("raw:")) { final String name = documentId.substring(4); final File file = new File(name); if (!file.exists()) { throw new FileNotFoundException("File not found: " + name); } return file; } else { throw new FileNotFoundException("Invalid document ID: " + documentId); } } } ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/java/com/distractionware/vvvvvv/FileSystemProvider.java ================================================ /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.distractionware.vvvvvv; import static android.provider.DocumentsContract.EXTRA_ORIENTATION; import static android.provider.DocumentsContract.QUERY_ARG_DISPLAY_NAME; import static android.provider.DocumentsContract.QUERY_ARG_EXCLUDE_MEDIA; import static android.provider.DocumentsContract.QUERY_ARG_FILE_SIZE_OVER; import static android.provider.DocumentsContract.QUERY_ARG_LAST_MODIFIED_AFTER; import static android.provider.DocumentsContract.QUERY_ARG_MIME_TYPES; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.res.AssetFileDescriptor; import android.database.Cursor; import android.database.MatrixCursor; import android.database.MatrixCursor.RowBuilder; import android.graphics.Point; import android.media.MediaScannerConnection; import android.net.Uri; import android.os.Bundle; import android.os.CancellationSignal; import android.os.FileObserver; import android.os.Handler; import android.os.ParcelFileDescriptor; import android.provider.DocumentsContract; import android.provider.DocumentsContract.Document; import android.provider.DocumentsProvider; import android.text.TextUtils; import android.util.ArrayMap; import android.util.Log; import android.webkit.MimeTypeMap; import androidx.core.content.MimeTypeFilter; import androidx.exifinterface.media.ExifInterface; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Locale; import java.util.Objects; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Predicate; /** * A helper class for {@link android.provider.DocumentsProvider} to perform file operations on local * files. */ public abstract class FileSystemProvider extends DocumentsProvider { private static final String TAG = "FileSystemProvider"; private static final boolean LOG_INOTIFY = false; protected static final String SUPPORTED_QUERY_ARGS = joinNewline( QUERY_ARG_DISPLAY_NAME, QUERY_ARG_FILE_SIZE_OVER, QUERY_ARG_LAST_MODIFIED_AFTER, QUERY_ARG_MIME_TYPES); private static String joinNewline(String... args) { return TextUtils.join("\n", args); } private String[] mDefaultProjection; private final ArrayMap mObservers = new ArrayMap<>(); private Handler mHandler; protected abstract File getFileForDocId(String docId, boolean visible) throws FileNotFoundException; protected abstract String getDocIdForFile(File file) throws FileNotFoundException; protected abstract Uri buildNotificationUri(String docId); /** * Callback indicating that the given document has been modified. This gives the provider a hook * to invalidate cached data, such as {@code sdcardfs}. */ protected void onDocIdChanged(String docId) { // Default is no-op } /** * Callback indicating that the given document has been deleted or moved. This gives the * provider a hook to revoke the uri permissions. */ protected void onDocIdDeleted(String docId) { // Default is no-op } @Override public boolean onCreate() { throw new UnsupportedOperationException( "Subclass should override this and call onCreate(defaultDocumentProjection)"); } protected void onCreate(String[] defaultProjection) { mHandler = new Handler(); mDefaultProjection = defaultProjection; } private static boolean contains(String dirPath, String filePath) { if (dirPath.equals(filePath)) { return true; } if (!dirPath.endsWith("/")) { dirPath += "/"; } return filePath.startsWith(dirPath); } private static boolean contains(File dir, File file) { if (dir == null || file == null) return false; return contains(dir.getAbsolutePath(), file.getAbsolutePath()); } @Override public boolean isChildDocument(String parentDocId, String docId) { try { final File parent = getFileForDocId(parentDocId).getCanonicalFile(); final File doc = getFileForDocId(docId).getCanonicalFile(); return contains(parent, doc); } catch (IOException e) { throw new IllegalArgumentException( "Failed to determine if " + docId + " is child of " + parentDocId + ": " + e); } } protected final List findDocumentPath(File parent, File doc) throws FileNotFoundException { if (!doc.exists()) { throw new FileNotFoundException(doc + " is not found."); } if (!contains(parent, doc)) { throw new FileNotFoundException(doc + " is not found under " + parent); } LinkedList path = new LinkedList<>(); while (doc != null && contains(parent, doc)) { path.addFirst(getDocIdForFile(doc)); doc = doc.getParentFile(); } return path; } private static boolean isValidFatFilenameChar(char c) { if ((0x00 <= c && c <= 0x1f)) { return false; } switch (c) { case '"': case '*': case '/': case ':': case '<': case '>': case '?': case '\\': case '|': case 0x7F: return false; default: return true; } } private static String buildValidFatFilename(String name) { if (TextUtils.isEmpty(name) || ".".equals(name) || "..".equals(name)) { return "(invalid)"; } final StringBuilder res = new StringBuilder(name.length()); for (int i = 0; i < name.length(); i++) { final char c = name.charAt(i); if (isValidFatFilenameChar(c)) { res.append(c); } else { res.append('_'); } } // Even though vfat allows 255 UCS-2 chars, we might eventually write to // ext4 through a FUSE layer, so use that limit. trimFilename(res, 255); return res.toString(); } private static String trimFilename(String str, int maxBytes) { final StringBuilder res = new StringBuilder(str); trimFilename(res, maxBytes); return res.toString(); } private static void trimFilename(StringBuilder res, int maxBytes) { byte[] raw = res.toString().getBytes(StandardCharsets.UTF_8); if (raw.length > maxBytes) { maxBytes -= 3; while (raw.length > maxBytes) { res.deleteCharAt(res.length() / 2); raw = res.toString().getBytes(StandardCharsets.UTF_8); } res.insert(res.length() / 2, "..."); } } private static File buildFile(File parent, String name, String ext) { if (TextUtils.isEmpty(ext)) { return new File(parent, name); } else { return new File(parent, name + "." + ext); } } private static File buildUniqueFileWithExtension(File parent, String name, String ext) throws FileNotFoundException { File file = buildFile(parent, name, ext); // If conflicting file, try adding counter suffix int n = 0; while (file.exists()) { if (n++ >= 32) { throw new FileNotFoundException("Failed to create unique file"); } file = buildFile(parent, name + " (" + n + ")", ext); } return file; } private static String[] splitFileName(String mimeType, String displayName) { String name; String ext; if (Document.MIME_TYPE_DIR.equals(mimeType)) { name = displayName; ext = null; } else { String mimeTypeFromExt; // Extract requested extension from display name final int lastDot = displayName.lastIndexOf('.'); if (lastDot >= 0) { name = displayName.substring(0, lastDot); ext = displayName.substring(lastDot + 1); mimeTypeFromExt = MimeTypeMap.getSingleton().getMimeTypeFromExtension( ext.toLowerCase()); } else { name = displayName; ext = null; mimeTypeFromExt = null; } if (mimeTypeFromExt == null) { mimeTypeFromExt = "application/octet-stream"; } final String extFromMimeType; if ("application/octet-stream".equals(mimeType)) { extFromMimeType = null; } else { extFromMimeType = MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType); } if (Objects.equals(mimeType, mimeTypeFromExt) || Objects.equals(ext, extFromMimeType)) { // Extension maps back to requested MIME type; allow it } else { // No match; insist that create file matches requested MIME name = displayName; ext = extFromMimeType; } } if (ext == null) { ext = ""; } return new String[]{name, ext}; } private static File buildUniqueFile(File parent, String mimeType, String displayName) throws FileNotFoundException { final String[] parts = splitFileName(mimeType, displayName); return buildUniqueFileWithExtension(parent, parts[0], parts[1]); } @Override public String createDocument(String docId, String mimeType, String displayName) throws FileNotFoundException { displayName = buildValidFatFilename(displayName); final File parent = getFileForDocId(docId); if (!parent.isDirectory()) { throw new IllegalArgumentException("Parent document isn't a directory"); } final File file = buildUniqueFile(parent, mimeType, displayName); final String childId; if (Document.MIME_TYPE_DIR.equals(mimeType)) { if (!file.mkdir()) { throw new IllegalStateException("Failed to mkdir " + file); } childId = getDocIdForFile(file); onDocIdChanged(childId); } else { try { if (!file.createNewFile()) { throw new IllegalStateException("Failed to touch " + file); } childId = getDocIdForFile(file); onDocIdChanged(childId); } catch (IOException e) { throw new IllegalStateException("Failed to touch " + file + ": " + e); } } updateMediaStore(getContext(), file); return childId; } private static File buildUniqueFile(File parent, String displayName) throws FileNotFoundException { final String name; final String ext; // Extract requested extension from display name final int lastDot = displayName.lastIndexOf('.'); if (lastDot >= 0) { name = displayName.substring(0, lastDot); ext = displayName.substring(lastDot + 1); } else { name = displayName; ext = null; } return buildUniqueFileWithExtension(parent, name, ext); } @Override public String renameDocument(String docId, String displayName) throws FileNotFoundException { // Since this provider treats renames as generating a completely new // docId, we're okay with letting the MIME type change. displayName = buildValidFatFilename(displayName); final File before = getFileForDocId(docId); final File beforeVisibleFile = getFileForDocId(docId, true); final File after = buildUniqueFile(before.getParentFile(), displayName); if (!before.renameTo(after)) { throw new IllegalStateException("Failed to rename to " + after); } final String afterDocId = getDocIdForFile(after); onDocIdChanged(docId); onDocIdDeleted(docId); onDocIdChanged(afterDocId); final File afterVisibleFile = getFileForDocId(afterDocId, true); updateMediaStore(getContext(), beforeVisibleFile); updateMediaStore(getContext(), afterVisibleFile); if (!TextUtils.equals(docId, afterDocId)) { return afterDocId; } else { return null; } } @Override public String moveDocument(String sourceDocumentId, String sourceParentDocumentId, String targetParentDocumentId) throws FileNotFoundException { final File before = getFileForDocId(sourceDocumentId); final File after = new File(getFileForDocId(targetParentDocumentId), before.getName()); final File visibleFileBefore = getFileForDocId(sourceDocumentId, true); if (after.exists()) { throw new IllegalStateException("Already exists " + after); } if (!before.renameTo(after)) { throw new IllegalStateException("Failed to move to " + after); } final String docId = getDocIdForFile(after); onDocIdChanged(sourceDocumentId); onDocIdDeleted(sourceDocumentId); onDocIdChanged(docId); // update the database updateMediaStore(getContext(), visibleFileBefore); updateMediaStore(getContext(), getFileForDocId(docId, true)); return docId; } private static void updateMediaStore(@NotNull Context context, File file) { if (file != null) { final ContentResolver resolver = context.getContentResolver(); final String noMedia = ".nomedia"; // For file, check whether the file name is .nomedia or not. // If yes, scan the parent directory to update all files in the directory. if (!file.isDirectory() && file.getName().toLowerCase(Locale.ROOT).endsWith(noMedia)) { MediaScannerConnection.scanFile(context, new String[]{file.getParent()}, null, null); } else { MediaScannerConnection.scanFile(context, new String[]{file.getParent()}, null, null); } } } private static boolean deleteContents(File dir) { File[] files = dir.listFiles(); boolean success = true; if (files != null) { for (File file : files) { if (file.isDirectory()) { success &= deleteContents(file); } if (!file.delete()) { Log.w(TAG, "Failed to delete " + file); success = false; } } } return success; } @Override public void deleteDocument(String docId) throws FileNotFoundException { final File file = getFileForDocId(docId); final File visibleFile = getFileForDocId(docId, true); final boolean isDirectory = file.isDirectory(); if (isDirectory) { deleteContents(file); } // We could be deleting pending media which doesn't have any content yet, so only throw // if the file exists and we fail to delete it. if (file.exists() && !file.delete()) { throw new IllegalStateException("Failed to delete " + file); } onDocIdChanged(docId); onDocIdDeleted(docId); updateMediaStore(getContext(), visibleFile); } @Override public Cursor queryDocument(String documentId, String[] projection) throws FileNotFoundException { final MatrixCursor result = new MatrixCursor(resolveProjection(projection)); includeFile(result, documentId, null); return result; } /** * This method is similar to * {@link DocumentsProvider#queryChildDocuments(String, String[], String)}. This method returns * all children documents including hidden directories/files. * *

* In a scoped storage world, access to "Android/data" style directories are hidden for privacy * reasons. This method may show privacy sensitive data, so its usage should only be in * restricted modes. * * @param parentDocumentId the directory to return children for. * @param projection list of {@link Document} columns to put into the cursor. If * {@code null} all supported columns should be included. * @param sortOrder how to order the rows, formatted as an SQL {@code ORDER BY} clause * (excluding the ORDER BY itself). Passing {@code null} will use the * default sort order, which may be unordered. This ordering is a hint * that can be used to prioritize how data is fetched from the network, * but UI may always enforce a specific ordering * @throws FileNotFoundException when parent document doesn't exist or query fails */ protected Cursor queryChildDocumentsShowAll( String parentDocumentId, String[] projection, String sortOrder) throws FileNotFoundException { return queryChildDocuments(parentDocumentId, projection, sortOrder, File -> true); } @Override public Cursor queryChildDocuments( String parentDocumentId, String[] projection, String sortOrder) throws FileNotFoundException { // Access to some directories is hidden for privacy reasons. return queryChildDocuments(parentDocumentId, projection, sortOrder, this::shouldShow); } private static @NotNull File[] listFilesOrEmpty(@Nullable File dir) { if (dir == null) { return new File[]{}; } else { File[] files = dir.listFiles(); if (files == null) { return new File[]{}; } else { return files; } } } private Cursor queryChildDocuments( String parentDocumentId, String[] projection, String sortOrder, @NotNull Predicate filter) throws FileNotFoundException { final File parent = getFileForDocId(parentDocumentId); final MatrixCursor result = new DirectoryCursor( resolveProjection(projection), parentDocumentId, parent); if (!filter.test(parent)) { Log.w(TAG, "No permission to access parentDocumentId: " + parentDocumentId); return result; } if (parent.isDirectory()) { for (File file : listFilesOrEmpty(parent)) { if (filter.test(file)) { includeFile(result, null, file); } } } else { Log.w(TAG, "parentDocumentId '" + parentDocumentId + "' is not Directory"); } return result; } private static String[] getHandledQueryArguments(Bundle queryArgs) { if (queryArgs == null) { return new String[0]; } final ArrayList args = new ArrayList<>(); if (queryArgs.keySet().contains(QUERY_ARG_EXCLUDE_MEDIA)) { args.add(QUERY_ARG_EXCLUDE_MEDIA); } if (queryArgs.keySet().contains(QUERY_ARG_DISPLAY_NAME)) { args.add(QUERY_ARG_DISPLAY_NAME); } if (queryArgs.keySet().contains(QUERY_ARG_FILE_SIZE_OVER)) { args.add(QUERY_ARG_FILE_SIZE_OVER); } if (queryArgs.keySet().contains(QUERY_ARG_LAST_MODIFIED_AFTER)) { args.add(QUERY_ARG_LAST_MODIFIED_AFTER); } if (queryArgs.keySet().contains(QUERY_ARG_MIME_TYPES)) { args.add(QUERY_ARG_MIME_TYPES); } return args.toArray(new String[0]); } /** * Searches documents under the given folder. *

* To avoid runtime explosion only returns the at most 23 items. * * @param folder the root folder where recursive search begins * @param projection projection of the returned cursor * @param exclusion absolute file paths to exclude from result * @param queryArgs the query arguments for search * @return cursor containing search result. Include {@link ContentResolver#EXTRA_HONORED_ARGS} * in {@link Cursor} extras {@link Bundle} when any QUERY_ARG_* value was honored during the * preparation of the results. * @throws FileNotFoundException when root folder doesn't exist or search fails * @see ContentResolver#EXTRA_HONORED_ARGS */ protected final Cursor querySearchDocuments( File folder, String[] projection, Set exclusion, Bundle queryArgs) throws FileNotFoundException { final MatrixCursor result = new MatrixCursor(resolveProjection(projection)); final LinkedList pending = new LinkedList<>(); pending.add(folder); while (!pending.isEmpty() && result.getCount() < 24) { final File file = pending.removeFirst(); if (shouldHide(file)) continue; if (file.isDirectory()) { for (File child : listFilesOrEmpty(file)) { pending.add(child); } } if (!exclusion.contains(file.getAbsolutePath()) && matchSearchQueryArguments(file, queryArgs)) { includeFile(result, null, file); } } final String[] handledQueryArgs = getHandledQueryArguments(queryArgs); if (handledQueryArgs.length > 0) { final Bundle extras = new Bundle(); extras.putStringArray(ContentResolver.EXTRA_HONORED_ARGS, handledQueryArgs); result.setExtras(extras); } return result; } @Override public String getDocumentType(String documentId) throws FileNotFoundException { return getDocumentType(documentId, getFileForDocId(documentId)); } private String getDocumentType(final String documentId, final File file) throws FileNotFoundException { if (file.isDirectory()) { return Document.MIME_TYPE_DIR; } else { final int lastDot = documentId.lastIndexOf('.'); if (lastDot >= 0) { final String extension = documentId.substring(lastDot + 1).toLowerCase(); final String mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); if (mime != null) { return mime; } } return "application/octet-stream"; } } @Override public ParcelFileDescriptor openDocument( String documentId, String mode, CancellationSignal signal) throws FileNotFoundException { final File file = getFileForDocId(documentId); final File visibleFile = getFileForDocId(documentId, true); final int pfdMode = ParcelFileDescriptor.parseMode(mode); if (visibleFile == null || pfdMode == ParcelFileDescriptor.MODE_READ_ONLY) { return ParcelFileDescriptor.open(file, pfdMode); } else { try { // When finished writing, kick off media scanner return ParcelFileDescriptor.open( file, pfdMode, mHandler, (IOException e) -> { onDocIdChanged(documentId); scanFile(visibleFile); }); } catch (IOException e) { throw new FileNotFoundException("Failed to open for writing: " + e); } } } public static boolean matchSearchQueryArguments(Bundle queryArgs, String displayName, String mimeType, long lastModified, long size) { if (queryArgs == null) { return true; } final String argDisplayName = queryArgs.getString(QUERY_ARG_DISPLAY_NAME, ""); if (!argDisplayName.isEmpty()) { // TODO (118795812) : Enhance the search string handled in DocumentsProvider if (!displayName.toLowerCase().contains(argDisplayName.toLowerCase())) { return false; } } final long argFileSize = queryArgs.getLong(QUERY_ARG_FILE_SIZE_OVER, -1 /* defaultValue */); if (argFileSize != -1 && size < argFileSize) { return false; } final long argLastModified = queryArgs.getLong(QUERY_ARG_LAST_MODIFIED_AFTER, -1 /* defaultValue */); if (argLastModified != -1 && lastModified < argLastModified) { return false; } final String[] argMimeTypes = queryArgs.getStringArray(QUERY_ARG_MIME_TYPES); if (argMimeTypes != null && argMimeTypes.length > 0) { mimeType = Intent.normalizeMimeType(mimeType); for (String type : argMimeTypes) { if (MimeTypeFilter.matches(mimeType, Intent.normalizeMimeType(type))) { return true; } } return false; } return true; } /** * Test if the file matches the query arguments. * * @param file the file to test * @param queryArgs the query arguments */ private boolean matchSearchQueryArguments(File file, Bundle queryArgs) { if (file == null) { return false; } final String fileMimeType; final String fileName = file.getName(); if (file.isDirectory()) { fileMimeType = DocumentsContract.Document.MIME_TYPE_DIR; } else { int dotPos = fileName.lastIndexOf('.'); if (dotPos < 0) { return false; } final String extension = fileName.substring(dotPos + 1); fileMimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); } return matchSearchQueryArguments(queryArgs, fileName, fileMimeType, file.lastModified(), file.length()); } private void scanFile(File visibleFile) { final Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); intent.setData(Uri.fromFile(visibleFile)); getContext().sendBroadcast(intent); } private static AssetFileDescriptor openImageThumbnail(File file) throws FileNotFoundException { final ParcelFileDescriptor pfd = ParcelFileDescriptor.open( file, ParcelFileDescriptor.MODE_READ_ONLY); try { final ExifInterface exif = new ExifInterface(file.getAbsolutePath()); final long[] thumb = exif.getThumbnailRange(); if (thumb != null) { // If we use thumb to decode, we need to handle the rotation by ourselves. Bundle extras = null; switch (exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, -1)) { case ExifInterface.ORIENTATION_ROTATE_90: extras = new Bundle(1); extras.putInt(EXTRA_ORIENTATION, 90); break; case ExifInterface.ORIENTATION_ROTATE_180: extras = new Bundle(1); extras.putInt(EXTRA_ORIENTATION, 180); break; case ExifInterface.ORIENTATION_ROTATE_270: extras = new Bundle(1); extras.putInt(EXTRA_ORIENTATION, 270); break; } return new AssetFileDescriptor(pfd, thumb[0], thumb[1], extras); } } catch (IOException ignored) { } // Do full file decoding, we don't need to handle the orientation return new AssetFileDescriptor(pfd, 0, AssetFileDescriptor.UNKNOWN_LENGTH, null); } @Override public AssetFileDescriptor openDocumentThumbnail( String documentId, Point sizeHint, CancellationSignal signal) throws FileNotFoundException { final File file = getFileForDocId(documentId); return openImageThumbnail(file); } protected RowBuilder includeFile(final MatrixCursor result, String docId, File file) throws FileNotFoundException { final String[] columns = result.getColumnNames(); final RowBuilder row = result.newRow(); if (docId == null) { docId = getDocIdForFile(file); } else { file = getFileForDocId(docId); } final String mimeType = getDocumentType(docId, file); row.add(Document.COLUMN_DOCUMENT_ID, docId); row.add(Document.COLUMN_MIME_TYPE, mimeType); final int flagIndex = Arrays.asList(columns).indexOf(Document.COLUMN_FLAGS); if (flagIndex != -1) { int flags = 0; if (file.canWrite()) { if (mimeType.equals(Document.MIME_TYPE_DIR)) { flags |= Document.FLAG_DIR_SUPPORTS_CREATE; flags |= Document.FLAG_SUPPORTS_DELETE; flags |= Document.FLAG_SUPPORTS_RENAME; flags |= Document.FLAG_SUPPORTS_MOVE; } else { flags |= Document.FLAG_SUPPORTS_WRITE; flags |= Document.FLAG_SUPPORTS_DELETE; flags |= Document.FLAG_SUPPORTS_RENAME; flags |= Document.FLAG_SUPPORTS_MOVE; } } if (mimeType.startsWith("image/")) { flags |= Document.FLAG_SUPPORTS_THUMBNAIL; } if (typeSupportsMetadata(mimeType)) { flags |= Document.FLAG_SUPPORTS_METADATA; } row.add(Document.COLUMN_FLAGS, flags); } final int displayNameIndex = Arrays.asList(columns).indexOf(Document.COLUMN_DISPLAY_NAME); if (displayNameIndex != -1) { row.add(Document.COLUMN_DISPLAY_NAME, file.getName()); } final int lastModifiedIndex = Arrays.asList(columns).indexOf(Document.COLUMN_LAST_MODIFIED); if (lastModifiedIndex != -1) { final long lastModified = file.lastModified(); // Only publish dates reasonably after epoch if (lastModified > 31536000000L) { row.add(Document.COLUMN_LAST_MODIFIED, lastModified); } } final int sizeIndex = Arrays.asList(columns).indexOf(Document.COLUMN_SIZE); if (sizeIndex != -1) { row.add(Document.COLUMN_SIZE, file.length()); } // Return the row builder just in case any subclass want to add more stuff to it. return row; } protected boolean shouldHide(@NotNull File file) { return false; } private boolean shouldShow(@NotNull File file) { return !shouldHide(file); } protected boolean typeSupportsMetadata(String mimeType) { return Document.MIME_TYPE_DIR.equals(mimeType); } protected final File getFileForDocId(String docId) throws FileNotFoundException { return getFileForDocId(docId, false); } private String[] resolveProjection(String[] projection) { return projection == null ? mDefaultProjection : projection; } private void startObserving(File file, Uri notifyUri, DirectoryCursor cursor) { synchronized (mObservers) { DirectoryObserver observer = mObservers.get(file); if (observer == null) { observer = new DirectoryObserver(file, getContext().getContentResolver(), notifyUri); observer.startWatching(); mObservers.put(file, observer); } observer.mCursors.add(cursor); if (LOG_INOTIFY) Log.d(TAG, "after start: " + observer); } } private void stopObserving(File file, DirectoryCursor cursor) { synchronized (mObservers) { DirectoryObserver observer = mObservers.get(file); if (observer == null) return; observer.mCursors.remove(cursor); if (observer.mCursors.size() == 0) { mObservers.remove(file); observer.stopWatching(); } if (LOG_INOTIFY) Log.d(TAG, "after stop: " + observer); } } private static class DirectoryObserver extends FileObserver { private static final int NOTIFY_EVENTS = ATTRIB | CLOSE_WRITE | MOVED_FROM | MOVED_TO | CREATE | DELETE | DELETE_SELF | MOVE_SELF; private final File mFile; private final ContentResolver mResolver; private final Uri mNotifyUri; private final CopyOnWriteArrayList mCursors; DirectoryObserver(File file, ContentResolver resolver, Uri notifyUri) { super(file.getAbsolutePath(), NOTIFY_EVENTS); mFile = file; mResolver = resolver; mNotifyUri = notifyUri; mCursors = new CopyOnWriteArrayList<>(); } @Override public void onEvent(int event, String path) { if ((event & NOTIFY_EVENTS) != 0) { if (LOG_INOTIFY) Log.d(TAG, "onEvent() " + event + " at " + path); for (DirectoryCursor cursor : mCursors) { cursor.notifyChanged(); } mResolver.notifyChange(mNotifyUri, null, false); } } @Override public String toString() { String filePath = mFile.getAbsolutePath(); return "DirectoryObserver{file=" + filePath + ", ref=" + mCursors.size() + "}"; } } private class DirectoryCursor extends MatrixCursor { private final File mFile; public DirectoryCursor(String[] columnNames, String docId, File file) { super(columnNames); final Uri notifyUri = buildNotificationUri(docId); boolean registerSelfObserver = false; // Our FileObserver sees all relevant changes. setNotificationUris(getContext().getContentResolver(), Arrays.asList(notifyUri)); mFile = file; startObserving(mFile, notifyUri, this); } public void notifyChanged() { onChange(false); } @Override public void close() { super.close(); stopObserving(mFile, this); } } } ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/java/com/distractionware/vvvvvv/VVVVVV.java ================================================ package com.distractionware.vvvvvv; import org.libsdl.app.SDLActivity; public class VVVVVV extends SDLActivity { @Override protected String[] getLibraries() { return new String[] { "SDL2", "VVVVVV" }; } @Override protected String[] getArguments() { // always pass -debug, logcat has level filtering anyway return new String[] { "-debug" }; } } ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml ================================================ ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml ================================================ ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/res/values/colors.xml ================================================ #3F51B5 #303F9F #FF4081 ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/res/values/ic_launcher_background.xml ================================================ #000000 ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/res/values/strings.xml ================================================ VVVVVV ================================================ FILE: desktop_version/VVVVVV-android/app/src/main/res/values/styles.xml ================================================ ================================================ FILE: desktop_version/VVVVVV-android/build.gradle ================================================ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenCentral() google() } dependencies { classpath 'com.android.tools.build:gradle:8.1.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenCentral() google() mavenLocal() } } task clean(type: Delete) { delete rootProject.buildDir } ================================================ FILE: desktop_version/VVVVVV-android/gradle/wrapper/gradle-wrapper.properties ================================================ #Thu Nov 11 18:20:34 PST 2021 distributionBase=GRADLE_USER_HOME distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-rc-2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME ================================================ FILE: desktop_version/VVVVVV-android/gradle.properties ================================================ # Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m -XX:-UseContainerSupport # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true android.useAndroidX=true android.enableJetifier=true ================================================ FILE: desktop_version/VVVVVV-android/gradlew ================================================ #!/usr/bin/env bash ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS="" APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn ( ) { echo "$*" } die ( ) { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; esac # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin, switch paths to Windows format before running java if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|grep -E -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|grep -E -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=$((i+1)) done case $i in (0) set -- ;; (1) set -- "$args0" ;; (2) set -- "$args0" "$args1" ;; (3) set -- "$args0" "$args1" "$args2" ;; (4) set -- "$args0" "$args1" "$args2" "$args3" ;; (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules function splitJvmOpts() { JVM_OPTS=("$@") } eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" ================================================ FILE: desktop_version/VVVVVV-android/gradlew.bat ================================================ @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS= set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto init echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto init echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :init @rem Get command-line arguments, handling Windowz variants if not "%OS%" == "Windows_NT" goto win9xME_args if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= set _SKIP=2 :win9xME_args_slurp if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* goto execute :4NT_args @rem Get arguments from the 4NT Shell from JP Software set CMD_LINE_ARGS=%$ :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega ================================================ FILE: desktop_version/VVVVVV-android/settings.gradle ================================================ include ':app' ================================================ FILE: desktop_version/fixupMac.sh ================================================ #!/bin/bash # flibit has this solely for convenience when cleaning up Mac binaries. install_name_tool -change /usr/local/lib/libSDL2-2.0.0.dylib @rpath/libSDL2-2.0.0.dylib VVVVVV strip -S VVVVVV otool -L VVVVVV ================================================ FILE: desktop_version/fonts/README.txt ================================================ === I N T R O D U C T I O N === This file will explain the font format. If you need a font (like a TTF) converted into the format that the game can read, for now you might want to ask Dav, who has tools for it. === F O N T F O R M A T === Fonts consist of two files: a .png and a .fontmeta. The .png contains all the "images" for all glyphs, and the .fontmeta is an XML document containing all information about which characters are in the file and other metadata. For example, a font for Japanese might be called font_ja.png and font_ja.fontmeta. The fontmeta file looks like this: 日本語 12 12 1 buttons_12x12 * type: not specified for normal fonts. buttons is used in button glyph fonts. * display_name: the name of the language the font is specifically meant for - in the language itself. Users will see this in the level editor when choosing a font to use. If this font is used equally by multiple translations, this could be set to a combination like "繁體中文/한국어". (If you are creating a custom player level: don't worry about this) * width/height: the width and height of each glyph in the font. Every character will always be drawn as a rectangle of this size. VVVVVV is rated to support fonts up to 12 pixels high - anything higher may cause text overlapping or not fitting in place. * white_teeth: indicates that all characters in the font are white, so the game itself doesn't have to remove all color from the image and make all pixels white like it would in old versions of the game. If this is not set to 1, this font cannot have colored (button) glyphs, and the game has to specifically process the font every time it is loaded, so 1 is highly recommended. * chars: defines which characters are in the image. Starting at the top left of the image, each character is simply a rectangle of equal size (defined in and ) from left to right, top to bottom. In the example given above, the image first has Unicode every character from U+0020 up to and including U+007F, then every character from U+00A0 to U+017F, and so on. To include a single character, simply use a range with equal start and end attributes equal. * special: defines special attributes that will be applied to a range of characters. One or more of the following attributes can be used: - color: set to 1 if these glyphs should be drawn with its original colors (for button glyphs, or even emoji...) - advance: instead of , the cursor (for drawing the next character) should be advanced this amount of pixels to the right. This controls the width of a character, but it does not affect how characters are arranged in the image, and the full glyph will still be drawn. While this means the font system has support for variable-width fonts, it's recommended to not use this option. There are some problems arising from using a variable-width font (especially in text boxes), so please consider copying the font's fullwidth forms (U+FF01-U+FF5E) to ASCII U+0021-U+007E instead. One may argue that a monospaced font also fits more with the game's style. * fallback: specifies the button glyphs font to use. Make sure to choose one that fits fully within your [width]x[height] rectangle, so for an 8x12 font, choose buttons_8x8, not buttons_12x12. ================================================ FILE: desktop_version/fonts/buttons_10x10.fontmeta ================================================ buttons 10 10 1 ================================================ FILE: desktop_version/fonts/buttons_12x12.fontmeta ================================================ buttons 12 12 1 ================================================ FILE: desktop_version/fonts/buttons_8x8.fontmeta ================================================ buttons 8 8 1 ================================================ FILE: desktop_version/fonts/font.fontmeta ================================================ english/… 8 8 1 buttons_8x8 ================================================ FILE: desktop_version/fonts/font_ar.fontmeta ================================================ العربية/فارسی 8 10 1 buttons_8x8 ================================================ FILE: desktop_version/fonts/font_ja.fontmeta ================================================ 日本語 8 12 1 buttons_8x8 ================================================ FILE: desktop_version/fonts/font_ko.fontmeta ================================================ 한국어 10 10 1 buttons_10x10 ================================================ FILE: desktop_version/fonts/font_ko_license.txt ================================================ This is a Modified Version. Original Version: Copyright (c) 2019-2023 Minseo Lee (itoupluk427@gmail.com) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: desktop_version/fonts/font_sc.fontmeta ================================================ 简体中文 12 12 1 buttons_12x12 ================================================ FILE: desktop_version/fonts/font_sc_tc_license.txt ================================================ This is a Modified Version. Original Version: Copyright (c) 2022, TakWolf (https://takwolf.com), with Reserved Font Name 'Fusion Pixel'. This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. The following font is part of the Original Version of the font with Reserved Font Name 'Fusion Pixel' above: Copyright (c) 2021, TakWolf (https://takwolf.com), with Reserved Font Name 'Ark Pixel'. This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. The following font is part of the Original Version of the font with Reserved Font Name 'Fusion Pixel' above: Copyright (c) 2019-2023 Minseo Lee (itoupluk427@gmail.com) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. The following font is part of the Original Version of the font with Reserved Font Name 'Fusion Pixel' above: [Cubic 11] These fonts are free software. Unlimited permission is granted to use, copy, and distribute them, with or without modification, either commercially or noncommercially. THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY. 此字型是免費的。 無論您是否進行對本字型進行商業或非商業性修改,均可無限制地使用,複製和分發它們。 本字型的衍生品之授權必須與此字型相同,且不作任何擔保。 [JF Dot M+H 12] Copyright(c) 2005 M+ FONTS PROJECT [M+ BITMAP FONTS] Copyright (C) 2002-2004 COZ These fonts are free software. Unlimited permission is granted to use, copy, and distribute it, with or without modification, either commercially and noncommercially. THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY. これらのフォントはフリー(自由な)ソフトウエアです。 あらゆる改変の有無に関わらず、また商業的な利用であっても、自由にご利用、複製、再配布することができますが、全て無保証とさせていただきます。 This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: desktop_version/fonts/font_tc.fontmeta ================================================ 繁體中文 12 12 1 buttons_12x12 ================================================ FILE: desktop_version/icon.rc ================================================ AAA ICON "icon.ico" ================================================ FILE: desktop_version/lang/README-programmers.txt ================================================ === I N T R O D U C T I O N === This file will explain what you need to know when maintaining translations of VVVVVV (like adding new strings to the game and syncing them across languages). For making new translations of the game, read README-translators.txt instead. === A D D I N G N E W S T R I N G S === If you want to add some new text to the game, all you generally need to do to make it translatable is wrap loc::gettext() around your raw strings in the code (you may need to add an #include "Localization.h"), and add the same strings to the English language file. The new strings can be automatically synced from English to all other language files using the translator menu. For example, "Game paused" can be made translatable by changing it to loc::gettext("Game paused"). Its entry in the English language file could look like this: The max value indicates how many characters of space there is for the text, and is further described below. It looks like "40" for single-line text, and "38*5" for multi-line text. The max value may not be applicable or may be hard to define, so this attribute can be completely left out. For example, when it's a diagonally-placed menu option, or because the limit depends on the lengths of other strings (like Low/Medium/High in the joystick menu), or a string looks progressively worse the longer it gets. As a general rule: if defining a hard limit would be misleading, then it can be exempt from having a limit. === E D I T I N G E X I S T I N G S T R I N G S === Sometimes you need to make a partial change to text that has already been translated. For example: you need to change the string "Press ENTER to stop" to "Press {button} to stop" (because you made that hotkey configurable). Please do *not* simply find-and-replace the text in the language files, nor remove the old string when you add the new one. (Whether you keep the translations or not.) Instead, duplicate the string in the English language file, putting your version underneath the old version, and mark the old version with the explanation "***OUTDATED***". For example: ↓ ↓ ↓ The game won't be using the outdated string anymore - it's only still in the language files to carry the existing translations for reference. Once a translator updates the language files, they can reuse parts of the old translation for the new version of the string. english | translation | explanation ================================================================================= Press ENTER to stop | Appuyez sur ENTRÉE pour arrêter | ***OUTDATED*** --------------------------------------------------------------------------------- Press {button} to stop | ? ? ? | stop super gravitron Eventually, once all languages are up-to-date, these outdated strings can be cleaned up. Of course, when you remove strings without replacement, you can simply remove them from the (English) language file. === T E X T P R I N T I N G === These are the text printing functions: font::print(flags, x, y, text, r, g, b) font::print_wrap(flags, x, y, text, r, g, b, linespacing = -1, maxwidth = -1) The flags argument can be 0, or a set of flags that do things like centering, enlarging, etc. Some examples (can also be found in Font.h): Standard print font::print(0, 50, 50, "Hello world!", 255, 255, 255); Centered text font::print(PR_CEN, -1, 50, "Hello world!", 255, 255, 255); (set X to -1, unless you want to center *around* X) 2x scale font::print(PR_2X, 50, 50, "V", 255, 255, 255); Centered 2x scale font::print(PR_CEN | PR_2X, -1, 50, "V", 255, 255, 255); Right-aligned 3x scale with a border around it font::print(PR_RIGHT | PR_3X | PR_BOR, 320, 50, "V", 255, 255, 255); Wordwrapped centered text font::print_wrap(PR_CEN, -1, 50, "Hello world, this will wordwrap to the screen width", 255, 255, 255); A not-technically-exhaustive list of all flags (which are defined in Font.h): - PR_2X/PR_3X/.../PR_8X Print at larger scale (PR_1X is default) - PR_FONT_INTERFACE [DEFAULT] Use interface (VVVVVV language) font - PR_FONT_LEVEL Use level-specific font (room names, cutscenes, etc) - PR_FONT_8X8 Use 8x8 font no matter what - PR_BRIGHTNESS(value) Use this brightness 0-255 (this value is mixed with r, g and b for an alpha effect, and accounts for colored glyphs correctly) - PR_BOR Draw a black border around the text - PR_LEFT [DEFAULT] Left-align text/place at X coordinate - PR_CEN Center-align text relative to X (X is center) or to screen if X == -1 - PR_RIGHT Right-align text to X (X is now the right border, not left border) - PR_CJK_CEN [DEFAULT] Large fonts (Chinese/Japanese/Korean) should stick out on top and bottom compared to 8x8 font - PR_CJK_LOW Larger fonts should stick out fully on the bottom (draw at Y) - PR_CJK_HIGH Larger fonts should stick out fully on the top - PR_RTL_XFLIP In RTL languages, mirror the X axis, so left is 320 and right is 0, and invert the meaning of PR_LEFT and PR_RIGHT === S T R I N G F O R M A T T I N G === Instead of sprintf-family functions, it is preferred to use VVVVVV's own formatting system, VFormat. Strings sometimes have placeholders, which look like {name} or {name|flags}. For example, "{n_trinkets} of {max_trinkets}". Placeholders can also have "flags" that modify their behavior. These can be added or removed in the translation as needed. Flags are separated by | (pipe). For more info, see the documentation at the top of VFormat.h. Full example: char buffer[100]; vformat_buf(buffer, sizeof(buffer), "{crewmate} got {number} out of {total} trinkets in {m}:{s|digits=2}.{ms|digits=3}", "number:int, total:int, crewmate:str, m:int, s:int, ms:int", 2, 20, "Vermilion", 2, 3, 1 ); => "Vermilion got 2 out of 20 trinkets in 2:03.001" === T R A N S L A T O R M E N U === The translator menu has options for both translators and maintainers - it allows testing menus, translating room names within the game, syncing all language files with the English template files, getting statistics on translation progress, and more. VVVVVV will show a "translator" menu in the main menu if either: - The "lang" folder is NOT next to data.zip, and the game is running somewhere within a "desktop_version" folder, and desktop_version/lang IS found. This normally happens when compiling the game from source; - The command line argument (or launch option) "-translator" is passed. - ALWAYS_SHOW_TRANSLATOR_MENU is defined during compilation (see top of Localization.h) To add new strings, add them to only the English strings.xml or strings_plural.xml, and use the option to sync all languages from the translator menu. This will copy the new strings to all translated language files. The language file sync option has differing support for the language files. As indicated in the menu itself, it handles each file as follows: [Full syncing EN→All] For these files, the English version of the file is fully copied and overwrites every language's version, while all existing translations and customizations are inserted for every language. This means newly added strings are copied to every language, and removed strings are simultaneously removed from every language, bringing them fully up-to-date. - meta.xml - strings.xml - strings_plural.xml - cutscenes.xml - roomnames.xml - roomnames_special.xml [Syncing not supported] These files are untouched by the syncing feature. - numbers.xml === F I L E S === * meta.xml: This file contains some general information about a translation. * strings.xml: This file contains general strings for the interface and some parts of the game. * strings_plural.xml: Similar usage to strings.xml, but for strings that need different plural forms ("1 trinket", "2 trinkets") * numbers.xml: This file contains all numbers from 0 to 100 written out (Zero, One, etc). This file also allows you to define the plural forms used in strings_plural.xml. * cutscenes.xml: This file contains nearly all the cutscenes that appear in the main game. * roomnames.xml: This file contains nearly all the room names for the main game. * roomnames_special.xml: This file contains some special cases for roomnames, some names for rooms that usually aren't displayed as regular (like The Ship), and some general area names. ================================================ FILE: desktop_version/lang/README-translators.txt ================================================ === I N T R O D U C T I O N === This file will explain everything you need to know when making translations of VVVVVV. WARNING TO VOLUNTEERS: VVVVVV translation is not a community effort where anyone can submit translations! It's *possible* that, on a case-by-case basis, someone can volunteer to become an official translator. But you would need to get approval from Terry first (or you can express interest in there being an official translation into your language, it may already be planned!) Likewise, you're welcome to report issues in existing translations (or to submit PRs to fix these issues), but it's not a good idea to rewrite significant parts of a translation, and then contribute it without warning. If you think there are errors or things that could be improved, please give an explanation as to why. (We may decide to discuss it with the official translator.) It *is* possible to make a fan translation for fun, for sharing with others, etc. But it probably won't be distributed with the game officially. === A D D I N G A N E W L A N G U A G E === The English language files are basically templates for other languages (all the translations are empty). To create a new language, simply copy the `en` folder, and start by filling out meta.xml (further explained below). Alternatively, you can create an empty language folder, and then use the in-game sync tool (translator > maintenance > sync language files) to populate it. === E X C E L === The game uses XML files for storing the translations. If you prefer, there is an .xlsm file which can be used as an editor. This can load in all the XML files, and then save changes back as XML. If you're an official translator, you should have received a version of this spreadsheet. If not, a blank version can be found here: https://github.com/Daaaav/TranslationEditor === T R A N S L A T O R M E N U === The translator menu has options for both translators and maintainers - it allows testing menus, translating room names within the game, syncing all language files with the English template files, getting statistics on translation progress, and more. The translator menu is hidden from players in regular versions of the game. When the translator menu is unlocked, you can also press F8 anywhere in the game to reload the current language files. So you can save translations and immediately preview them (except for menu buttons and the current cutscene dialogue, which can't be reloaded on the fly). You will hear a coin sound when the language files have been reloaded via F8. === L O W E R C A S E A N D U P P E R C A S E === If lowercase and uppercase does not exist in your language (Chinese, Japanese and Korean for example), you can set toupper to 0 in meta.xml, and ignore any directions about using lowercase or uppercase. VVVVVV's menu system has the style of using lowercase for unselected options and uppercase for selected options, for example: play levels [ OPTIONS ] translator credits quit The menu options are stored as their full-lowercase version, and they're normally commented as "menu option" in the translation files. A built-in function (toupper in Localization.cpp) automatically converts the lowercase text to uppercase when needed. This function has support for a good number of accented characters, Cyrillic and Greek, but more could be added if needed. It also accounts for special cases in Turkish and Irish. Turkish: The uppercase of i is İ, for example, "dil" becomes "DİL" and not "DIL". To enable this, set toupper_i_dot to 1 in meta.xml. Irish: Specific letters may be kept in lowercase when making a string full-caps. For example, "mac tíre na hainnise" should be "MAC TÍRE NA hAINNISE" instead of "MAC TÍRE NA HAINNISE". If enabled, you can use the ~ character before the letter which should be forced in lowercase: "mac tíre na ~hainnise". This ~ character only has an effect in strings which are subject to automatic uppercasing (otherwise it'll be visible as å). This can be enabled by setting toupper_lower_escape_char to 1 in meta.xml. === W O R D W R A P P I N G A N D L E N G T H L I M I T S === For most languages, VVVVVV can automatically wordwrap based on spaces. This may not work for some languages (like Chinese, Japanese and Korean), so instead, newlines can be inserted manually (see below) and automatic wordwrapping can be disabled in meta.xml. VVVVVV's resolution is 320x240, and the default font is 8x8, which means there is a 40x30 character grid (although we don't adhere to this grid for the UI, but it gives a good indication). Naturally, if the font has a different size like 12x12, less characters will fit on the screen too. Strings are usually annotated with their limits (for example, max="38*3"). This can be formatted like one of the following: (A) 33 (B) 33*3 (A) if it's a single number (for example "33"): the hard maximum number of characters that are known to fit. Being exactly on the limit may not look good, so try to go at least a character under it if possible. (B) if X*Y (for example 33*3): the text should fit within an area of X characters wide and Y lines high. The text is automatically word-wrapped to fit (unless disabled in meta.xml). If automatic word-wrapping is disabled, you need to manually insert newlines with |, or possibly as a literal newline. If your language uses a font with a different size than 8x8, there will be two limits given: `max`, which is the original limit based on the 8x8 font, and `max_local`, which is adapted to the size of your font. To get this notation, use the maintenance option to sync language files from within VVVVVV. Ensure the correct font is set in meta.xml first. The translator menu has an option ("limits check") to automatically find strings that break the given limits. There may be a few cases where this detection isn't perfect, but it should be a helpful quality assurance tool. The maximum lengths are not always given. Notoriously, menu option buttons are placed diagonally, thus they have maximums that are hard to look up. Even more so, making an option differ too much in length from the other options might make it look out of place. Best thing to do there is probably just translate as usual and then test all menus via the "menu test" option in the translator menu. However, menus do automatically reposition based on the text length, so worst-case scenario, if an option is 36 characters long, all options are displayed right underneath each other. === F O N T S === The game uses an 8x8 pixel font by default (font.png and font.fontmeta in the "fonts" folder). If your language can be represented in 8x8 characters, it is preferable to use this font, or for this font to be extended. The fonts directory also has a README.txt file that explains how the font format works. === N U M B E R S A N D P L U R A L F O R M S === In certain places, VVVVVV (perhaps unconventionally) writes out numbers as full words. For example: - One out of Fifteen - Two crewmates remaining - Two remaining These words can be found in numbers.xml. The numbers Zero through Twenty will be the most commonly seen. It's always possible for numbers up to One Hundred to be seen though (players can put up to 100 trinkets and crewmates in a custom level). Your language may not allow the same word to be used for the same number in different scenarios. For example, in Polish, "twenty out of twenty" may be "dwadzieścia z dwudziestu". Right now, you have two sets of wordy numbers to choose from, `translation` and `translation2`, but this will likely change to a more customizable system in the future. You can choose when these "wordy" numbers are used and when numeric forms (20 out of 20) are used (see "STRING FORMATTING" below). It's also possible to leave the translations for all the numbers empty. In that case, numeric forms will always be used. In English, using Title Case is appropriate, but in most other languages, it probably isn't. Therefore, you may want to translate all numbers in lowercase, when it's more appropriate to use "twenty out of twenty" than "Twenty out of Twenty". You can then apply auto-uppercasing to any placeholder you choose (see "STRING FORMATTING" below), making it possible to display "Twenty out of twenty". As for plural forms: English and some other languages have a singular (1 crewmate) and a plural (2 crewmates). Some languages may have different rules (like for 0, or numbers that end in 2, 3 and 4). VVVVVV can accommodate these rules and allows you to translate certain strings (strings_plural.xml) in different ways depending on the number. The different forms can be defined by changing the "form" attribute on each number in numbers.xml. For English, form "1" is used for singular, and form "0" is used for plural. You can set up any amount of plural forms you will need. Numbers that identify the forms do not need to be sequential, you may use any number between 0 and 254 to identify the different forms. So instead of using forms 0, 1, 2 and 3, you could also name them 1, 2, 5 and 7. Suppose you need a different form for the number 1, the numbers 2-4, and all other numbers. You could use "form 1" for the number 1, "form 2" for 2-4, and "form 0" for all other numbers: ... When translating the plural strings, you can add translations for every unique form. For example: Plural forms can appear both for wordy numbers ("you saved one crewmate") as well as numbery numbers ("you died 136 times in this room"), so we need the plural forms to go further than 100. For the numbers 100 and higher: as far as I can find (with information about plural rules across 160 languages) - the plural forms always repeat themselves every 100 numbers. So numbers 100-199 always have the same forms as 200-299, 300-399, and so on. However, 100-119 (200-219, etc) don't always work the same as 0-19 do (in English for example, it's not "101 trinket" despite ending in 01). Therefore, forms for 100-119 can also be filled in. The system will simply copy 20-99 for 120-199, and that should be enough to cover all numbers from 0 to infinity. Technically the system supports providing forms until 199, but it should never be necessary to go higher than 119, so they're not in the language files by default. Numbers higher than 100 cannot have a written out translation ("one hundred and one" does not exist). === S T R I N G F O R M A T T I N G === Strings sometimes have placeholders, which look like {name} or {name|flags}. For example, "{n_trinkets} of {max_trinkets}". Placeholders can also have "flags" that modify their behavior. These can be added or removed in the translation as needed. Flags are separated by | (pipe). For example, "{n_trinkets|wordy}" makes the number of trinkets display as a "wordy" number (twenty instead of 20) (See "NUMBERS AND PLURAL FORMS"). "{n_trinkets|wordy|upper}" makes that word start with a capital letter (Twenty instead of twenty). So for example, "{n_trinkets|wordy|upper} of {max_trinkets|wordy}" may be displayed as "Twenty out of twenty" - assuming numbers.xml is translated all-lowercase. The valid flags are: - wordy [ints only] use number words (Twenty) of the first set (translation), instead of digits (20) - wordy2 [ints only] use number words of the second set (translation2), instead of digits - digits=n [ints only] force minimum n digits, like n=5 --> 00031 - spaces [only if using digits=n] use leading spaces instead of 0s - upper uppercase the first character with loc::toupper_ch === S T O R Y A N D C H A R A C T E R I N F O R M A T I O N === This is a brief story and character overview for reference. Any further questions can be directed to Terry: https://distractionware.com/email/ == The Crewmates == VVVVVV is about a crew of curious and super-intelligent aliens exploring the universe. There are six crewmates onboard the ship, in six different colours. They are: * Viridian (Cyan, the player character) * Verdigris (Green) * Vitellary (Yellow) * Vermilion (Red) * Victoria (Blue) * Violet (Purple) All six characters have names that start with V. In addition, each crewmate's name is an obscure word that suggests their colour - for example, Verdigris is the name of the green pigment that forms on copper when it oxidises. This might be hard to translate! (So, potentially it just makes sense not to translate the names at all, unless you have a good idea about how to do it - for example, if you can pull off the same colour/name beginning with V trick in your language.) Each crewmate has the following "rank", i.e. their job on the ship. These are all basically just Star Trek inspired roles: * "Captain" Viridian (Captain as in leader) * "Chief" Verdigris (Chief as in Lead Engineer) * "Professor" Vitellary (Kind of the senior scientist on board) * "Officer" Vermilion (Officer as in Away-Officer, the one who usually goes out exploring) * "Doctor" Victoria (Doctor in the scientific sense) * "Doctor" Violet (Doctor in the medical sense) Verdigris, Vitellary and Vermilion are male. Victoria and Violet are female. Viridian is deliberately unspecified - when translating cutscenes, if at all possible, try to avoid specifying their gender, even if that leads to some otherwise awkward phrasing or requires the use of some cutting edge grammar tricks in your language. == Personalities == If it helps with tone: the running joke in VVVVVV's writing is that all six characters are hyper intelligent prodigies, who will nevertheless speak to each other as if they're small children. E.g. Viridian "we were just playing with it!", Vermilion "I'm helping!", Verdigris "I'm an engineer!", etc. More specifically: * Viridian is a classic hero - unphased by danger, never worried, always completely certain that they'll be able to fix everything. * Verdigris is a romantic - he has a huge (reciprocated!) crush on Violet, which he does a terrible job of keeping secret. * Vitellary is an academic - he loves science, and has a dry and long winded science thing to tell you in almost every cutscene. * Vermilion is bold and adventurous - after you rescue him, you'll find him exploring different parts of the world on his own quest to find the rest of the crew (he's not much help, though). * Victoria is a worrier - she's quick to feelings of despair. Victoria's sprite is almost always sad! * Violet is a caretaker - she's the ship's Doctor, and most of her cutscenes are status updates about the other crewmates. == Dimension VVVVVV == The world you're exploring is filled with terminals, with text logs from the previous inhabitants, who we never see. We don't know much about them. The ship you're all on is called the "D.S.S. Souleye", which is a minor easter egg. D.S.S. just stands for "Dimensional Space Ship" - a craft that warps between different dimensions. Souleye is the pseudonym for Magnus Pålsson, the game's composer. === S P R I T E S T R A N S L A T I O N === There are several enemies in the game which contain words: STOP, YES, OBEY, LIES and TRUTH. These, as well as the C on checkpoints, can be translated. This may be a bit tricky - the sizes of the translated graphics should be as close to the original English as possible, which means that even though letters can be compressed a bit, they will quickly be too long. For example, if you'd like to translate LIES with 5 letters, it really doesn't help if one of those 5 letters is not an I (the most slim letter). Fortunately, the translation does not have to be literal, as the words themselves are only referenced in room names at most, and the exact meanings aren't that important, only the spirit of them is. OBEY is a They Live reference, so there are a lot of other signs you could use. Some inspiration: * STOP: this is on a stop sign, so may not need to be translated * OBEY: maybe something like FOLLOW, or one of the other words in "They Live" (WORK, BUY, CONSUME, CONFORM, ...) * LIES: maybe singular LIE, maybe some form of NONSENSE (as in BS but non-offensive), FALSE, FAKE, BLAH, FABLE * TRUTH: maybe FACTS == Implementation of translated sprites == If you'd like to pixel translated sprites yourself: Take sprites.png and flipsprites.png from the graphics folder in data.zip. These spritesheets are a 32x32 grid - for example, you cannot extend OBEY upwards or to the left. The translated file does not have to contain any untranslated sprites - these can simply be made transparent, for optimization. So: the files should be transparent sheets with some translations in the middle. The translated versions of sprites.png and flipsprites.png can be placed in a "graphics" subfolder of your language folder. Then, put a file next to them called "spritesmask.xml", with the following contents: This file defines which sprites in the translated files should overwrite the original ones. Remove any lines for sprites you did not translate. After that, your translated sprites should work! For completeness: sprite_w and sprite_h on the tag define the size of each unit in the attributes of . The possible attributes of are: * x, y: the position of the sprite to copy (in blocks of sprite_w by sprite_h) * w, h: the width and height of the sprite to copy (default 1 for both) * dx, dy: the destination position of the sprite (default x,y; so the same position as copied from) === F I L E S === == meta.xml == This file contains some general information about this translation. It contains the following attributes: * active: If 0, this language will not be shown in the languages menu * nativename: The name of the language in itself, fully in lowercase (so not "spanish" or "Español", but "español"). A language name can be at most 16 characters wide (in the 8x8 font) * credit: You can fill in credit here that will appear on the language screen, like "Spanish translation by X". May be in your language. Max 38*2 @8x8 * action_hint: This is displayed at the bottom of the language screen when your language is highlighted, to show that Space/Z/V sets the selected option as the language. Max 40 @8x8 * gamepad_hint: The same as action_hint, but now a gamepad button will be filled into {button}, such as (A), (X), etc * autowordwrap: Whether automatic wordwrapping is enabled. Can be disabled for CJK (in which case newlines have to be inserted manually in text) * toupper: Whether to enable automatic uppercasing of menu options (unselected, SELECTED). May be disabled for languages such as CJK that don't have lowercase and uppercase. * toupper_i_dot: When automatically uppercasing, map i to İ, as in Turkish. * toupper_lower_escape_char: When automatically uppercasing, allow ~ to be used to stop the next letter from being uppercased, for Irish. * rtl: This should be enabled for languages that are written right-to-left. It will horizontally flip many parts of the interface and allows text to be right-aligned in places like textboxes. * menu_select: The indication that a certain menu option or button is selected, in addition to the automatic uppercasing if "toupper" is enabled. For example, "[ {label} ]" looks like "[ SELECTED ]" * menu_select_tight: Similar to menu_select, except used in cases where space is a bit more limited (like the map screen). "[{label}]" looks like "[SELECTED]" * font: The filename of the font to use. The 8x8 font is called "font", the Japanese font is "font_ja", et cetera. == strings.xml == This file contains general strings for the interface and some parts of the game. In the XML, the tag for one string looks like this: To translate a string, simply fill in the translation attribute, like this: If the translation is left blank, the English text will be used as a fallback. Translations should NOT be left blank on purpose if the text is the same however; the string will be counted as untranslated and it'll be harder to keep track of what's new. Always just copy-paste the English string into the translation in that case. The following attributes may be found for each string: * english: the English text. * translation: the translation. * case: a number (1, 2, etc) for separate strings that are identical in English but may need different translations. * explanation: an explanation about the context, location and possibly the formatting. * max: length restrictions, described above in "WORDWRAPPING AND LENGTH LIMITS" == strings_plural.xml == See "NUMBERS AND PLURAL FORMS" above. You can define the plural forms in numbers.xml. Then, simply add translations for each form you set up in numbers.xml. For example: The "wordy" flag indicates a word will be filled in (like twelve), otherwise a number (12). As described above in "STRING FORMATTING", you can change this as needed in your translations. The `var` attribute indicates which placeholder will be filled in, the `expect` attribute indicates how high the values are that you may expect to be filled in. For example, expect="20" means any value above 20 will probably not be used in this string. This is mainly needed so that the limits check knows not to worry about a number like "seventy seven" making the string too long, but it may also be a useful context clue. == numbers.xml == This file contains all numbers from 0 to 100 written out (Zero, One, etc). This will be filled in strings like: - One out of Fifteen - Two crewmates remaining - Two remaining If this can't work for your language, or wordy numbers are really unfitting, you can leave all of these empty, in which case numbers will be used (20 out of 20). You may want to do it all-lowercase in order to not get English-style title casing. "Twenty out of Twenty" may be grammatically incorrect in MANY languages, and "twenty out of twenty" would be better. Translating the numbers all-lowercase allows you to apply context-specific uppercasing, like "Twenty out of twenty" (see "STRING FORMATTING" above) This file also allows you to define the plural forms used in strings_plural.xml. For more information, see "NUMBERS AND PLURAL FORMS" above. == cutscenes.xml == This file contains nearly all the cutscenes that appear in the main game. Each line has a "speaker" attribute, which is not used by the game - it's just for translators to know who says what and to establish context. The dialogues are automatically text-wrapped, except if automatic wrapping is disabled in meta.xml. In that case, the maximum line length is 36 8x8 characters (288 pixels) or 24 12x12 characters. In the few cases where the same text appears multiple times in a cutscene, these have the attribute "case" added to them (for example case="1", case="2", etc), so they can be translated separately if needed. (These match up with textcase(x) commands in the scripts themselves) You may find some additional formatting attributes on each tag. These are used to make spacing and formatting in translations consistent with the original English text (for example, centered text, padding on both sides, etc). You can change any of these if you need, and you can also add them yourself to ANY dialogue tag. * tt: teletype. if "1", disable automatic word wrapping, even if autowordwrap is enabled in meta.xml. You will have to add newlines manually for this textbox, either with hard enters, or with | * wraplimit: change the maximum width of the text before it wordwraps, in pixels. Only if tt is not enabled. Example: [Hello world!] --[wraplimit="56"]--> [Hello ] (56=7*8) [world!] If autowordwrap is disabled in meta.xml, this also doesn't work, but it does give you an advisory maximum text width. The default is 288 (36*8 or 24*12). * centertext: center the text (but keep it aligned to the grid), for example: [You have rescued] --[centertext="1"]--> [You have rescued] [a crewmember!] [ a crewmember! ] * pad: pad each line of text with a number of spaces (0 by default), for example: [You have rescued] --[pad="2"]--> [ You have rescued ] [ a crewmember! ] [ a crewmember! ] This will automatically make the wrap limit smaller accordingly, unless a custom wraplimit is given. * pad_left/pad_right: same as pad, but only affects the left or right side. For example: [You have rescued] --[ pad_left="5"]--\ [ You have rescued ] [ a crewmember! ] --[pad_right="2"]--/ [ a crewmember! ] * padtowidth: pad the text on both sides if it's not this many pixels wide. For example: [-= Personal Log =-] --[padtowidth="224"]--> [ -= Personal Log =- ] (224=28*8) == roomnames.xml == This file contains nearly all the room names for the main game. The limit is always 40 8x8 characters (320 pixels) or 26 12x12 characters. It's recommended to translate the room names in-game to see why all rooms are called what they are. To do this, enable room name translation mode in translator > translator options > translate room names. == roomnames_special.xml == This file contains some special cases for roomnames, some names for rooms that usually aren't displayed as regular (like The Ship), and some general area names. One room ("Prize for the Reckless") is intentionally missing spikes in a time trial and no death mode so the player does not have to die there, and the room is called differently in both cases (for time trial "Imagine Spikes There, if You Like", and for no death mode "I Can't Believe You Got This Far"). There are also some roomnames in the game which gradually transform into others or cycle through a few minor variations. ================================================ FILE: desktop_version/lang/ar/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/ar/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/ar/meta.xml ================================================ 1 العربية الترجمة العربية من Eternal Dream Arabization اضغط مسافة، زر Z، أو زر V للاختيار اضغط {button} للاختيار 1 1 0 0 1 [ {label} ] [{label}] font_ar ================================================ FILE: desktop_version/lang/ar/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/ar/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/ar/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/ar/strings.xml ================================================ ================================================ FILE: desktop_version/lang/ar/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/ca/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/ca/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/ca/meta.xml ================================================ 1 català Traducció al català|d’Eduard Ereza Martínez Prem Espai, Z o V per a seleccionar Prem {button} per a seleccionar 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/ca/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/ca/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/ca/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/ca/strings.xml ================================================ ================================================ FILE: desktop_version/lang/ca/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/cy/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/cy/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/cy/meta.xml ================================================ 1 cymraeg Cyfieithiad Cymraeg gan Morgan Roberts (ynchwarae) Pwyso, Z, neu V i'w dewis Pwyswch {button} i ddewis 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/cy/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/cy/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/cy/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/cy/strings.xml ================================================ ================================================ FILE: desktop_version/lang/cy/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/de/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/de/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/de/meta.xml ================================================ 1 deutsch Deutsche Übersetzung von Thomas Faust Mit Leertaste, Z oder V auswählen Mit {button} auswählen 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/de/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/de/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/de/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/de/strings.xml ================================================ ================================================ FILE: desktop_version/lang/de/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/en/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/en/meta.xml ================================================ 1 english Press Space, Z, or V to select Press {button} to select 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/en/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/en/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/en/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/en/strings.xml ================================================ ================================================ FILE: desktop_version/lang/en/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/eo/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/eo/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/eo/meta.xml ================================================ 1 esperanto Esperanta traduko de Reese Rivers Premu spaceton, Z aŭ V por elekti Premu {button} por elekti 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/eo/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/eo/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/eo/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/eo/strings.xml ================================================ ================================================ FILE: desktop_version/lang/eo/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/es/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/es/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/es/meta.xml ================================================ 1 español (es) Traducción al español de Felipe Mercader y Sara Marín Pulsa Espacio, Z, o V para seleccionar Pulsa {button} para seleccionar 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/es/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/es/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/es/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/es/strings.xml ================================================ ================================================ FILE: desktop_version/lang/es/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/es_419/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/es_419/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/es_419/meta.xml ================================================ 1 español (latam) Traducción al español de Latinoamérica por Guido Di Carlo Pulsa Espacio, Z, o V para seleccionar Pulsa {button} para seleccionar 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/es_419/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/es_419/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/es_419/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/es_419/strings.xml ================================================ ================================================ FILE: desktop_version/lang/es_419/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/es_AR/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/es_AR/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/es_AR/meta.xml ================================================ 1 español (arg.) Traducción al español de Argentina por Guido Di Carlo Apretá Espacio, Z, o V para seleccionar Apretá {button} para seleccionar 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/es_AR/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/es_AR/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/es_AR/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/es_AR/strings.xml ================================================ ================================================ FILE: desktop_version/lang/es_AR/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/fa/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/fa/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/fa/meta.xml ================================================ 1 فارسی Persian Localization: Amir Arzani & Masoud Varaste برای انتخاب روی اسپیس، Z، یا V بزن برای انتخاب روی {button} بزن 1 1 0 0 1 [ {label} ] [{label}] font_ar ================================================ FILE: desktop_version/lang/fa/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/fa/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/fa/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/fa/strings.xml ================================================ ================================================ FILE: desktop_version/lang/fa/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/fr/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/fr/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/fr/meta.xml ================================================ 1 français Traduction française par|Words of Magic Espace, Z ou V pour sélectionner {button} pour sélectionner 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/fr/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/fr/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/fr/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/fr/strings.xml ================================================ ================================================ FILE: desktop_version/lang/fr/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/ga/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/ga/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/ga/meta.xml ================================================ 1 gaeilge Úna-Minh Kavanagh, Seaghán Ó Modhráin, Davis Sandefur Brúigh Space nó Z nó V chun roghnú Brúigh {button} lena roghnú 1 1 0 1 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/ga/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/ga/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/ga/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/ga/strings.xml ================================================ ================================================ FILE: desktop_version/lang/ga/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/it/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/it/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/it/meta.xml ================================================ 1 italiano Di A. Dellepiane, M. Scarabelli, L. Bertolucci e F. Bortolotti Premi spazio, Z o V per selezionare Premi {button} per selezione 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/it/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/it/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/it/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/it/strings.xml ================================================ ================================================ FILE: desktop_version/lang/it/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/ja/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/ja/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/ja/meta.xml ================================================ 1 日本語 初版翻訳: Nicalis, Inc. 追加翻訳/校正: KabanFriends スペース, Z または V を押して決定 {button} を押して決定 0 0 0 0 0 [ {label} ] [{label}] font_ja ================================================ FILE: desktop_version/lang/ja/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/ja/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/ja/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/ja/strings.xml ================================================ ================================================ FILE: desktop_version/lang/ja/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/ko/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/ko/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/ko/meta.xml ================================================ 1 한국어 번역: Bada Im, Hyungseok Cho 스페이스 바, Z, V를 눌러 선택 {button} 버튼을 눌러 선택 1 0 0 0 0 [ {label} ] [{label}] font_ko ================================================ FILE: desktop_version/lang/ko/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/ko/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/ko/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/ko/strings.xml ================================================ ================================================ FILE: desktop_version/lang/ko/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/nl/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/nl/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/nl/meta.xml ================================================ 1 nederlands Nederlandse vertaling door Dav999 Druk op spatie, Z, of V om te kiezen Druk op {button} om te kiezen 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/nl/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/nl/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/nl/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/nl/strings.xml ================================================ ================================================ FILE: desktop_version/lang/nl/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/pl/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/pl/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/pl/meta.xml ================================================ 1 polski Polskie tłumaczenie: Kuba Kallus Wciśnij Spację, Z, lub V by wybrać Wciśnij {button} by wybrać 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/pl/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/pl/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/pl/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/pl/strings.xml ================================================ ================================================ FILE: desktop_version/lang/pl/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/pt_BR/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/pt_BR/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/pt_BR/meta.xml ================================================ 1 português (br) Lucas Araujo e Thiago Araujo|Ivan Lopes e Lucas Nunes Pressione Espaço, Z ou V para selecionar Pressione {button} para selecionar 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/pt_BR/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/pt_BR/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/pt_BR/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/pt_BR/strings.xml ================================================ ================================================ FILE: desktop_version/lang/pt_BR/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/pt_PT/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/pt_PT/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/pt_PT/meta.xml ================================================ 1 português (pt) Adaptação portuguesa por Locsmiths Seleciona com Barra de Espaços, Z ou V Seleciona com {button} 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/pt_PT/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/pt_PT/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/pt_PT/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/pt_PT/strings.xml ================================================ ================================================ FILE: desktop_version/lang/pt_PT/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/ru/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/ru/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/ru/meta.xml ================================================ 1 русский Перевод на русский от TheMysticSword Нажмите Пробел, Z или V, чтобы выбрать Нажмите {button}, чтобы выбрать 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/ru/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/ru/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/ru/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/ru/strings.xml ================================================ ================================================ FILE: desktop_version/lang/ru/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/szl/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/szl/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/szl/meta.xml ================================================ 1 ślōnsko gŏdka Ślōnski przekłŏd: Kuba Kallus Tyknij Spacja, Z, abo V coby ôbrać Tyknij {button} coby ôbrać 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/szl/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/szl/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/szl/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/szl/strings.xml ================================================ ================================================ FILE: desktop_version/lang/szl/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/tr/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/tr/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/tr/meta.xml ================================================ 1 türkçe Türkçe yerelleştirme: Engin İlkiz Boşluk, Z veya V tuşu ile seç {button} ile seç 1 1 1 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/tr/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/tr/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/tr/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/tr/strings.xml ================================================ ================================================ FILE: desktop_version/lang/tr/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/uk/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/uk/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/uk/meta.xml ================================================ 1 українська Переклад українською|Оля Сушицька Для вибору натисність пробіл, Z або V Для вибору натисніть {button} 1 1 0 0 0 [ {label} ] [{label}] font ================================================ FILE: desktop_version/lang/uk/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/uk/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/uk/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/uk/strings.xml ================================================ ================================================ FILE: desktop_version/lang/uk/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/zh/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/zh/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/zh/meta.xml ================================================ 1 简体中文 中文本地化 by 谜之声 按空格、Z或V键选择 按{button}选择 1 0 0 0 0 [ {label} ] [{label}] font_sc ================================================ FILE: desktop_version/lang/zh/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/zh/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/zh/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/zh/strings.xml ================================================ ================================================ FILE: desktop_version/lang/zh/strings_plural.xml ================================================ ================================================ FILE: desktop_version/lang/zh_TW/cutscenes.xml ================================================ ================================================ FILE: desktop_version/lang/zh_TW/graphics/spritesmask.xml ================================================ ================================================ FILE: desktop_version/lang/zh_TW/meta.xml ================================================ 1 繁體中文 繁體中文本地化 by 谜之声 and craft 按空白鍵、Z或V鍵選擇 按{button}選擇 1 0 0 0 0 [ {label} ] [{label}] font_tc ================================================ FILE: desktop_version/lang/zh_TW/numbers.xml ================================================ ================================================ FILE: desktop_version/lang/zh_TW/roomnames.xml ================================================ ================================================ FILE: desktop_version/lang/zh_TW/roomnames_special.xml ================================================ ================================================ FILE: desktop_version/lang/zh_TW/strings.xml ================================================ ================================================ FILE: desktop_version/lang/zh_TW/strings_plural.xml ================================================ ================================================ FILE: desktop_version/src/ActionSets.h ================================================ /* For now, this isn't really a foundation for action sets yet; button glyphs * just need to be able to identify actions that are printed in text like * "Press ENTER to teleport". Thus, this currently ONLY contains identifiers * for the actions that button glyphs are needed for. * * Based on this comment: * https://github.com/TerryCavanagh/VVVVVV/issues/834#issuecomment-1015692161 */ #ifndef ACTIONSETS_H #define ACTIONSETS_H #ifdef __cplusplus extern "C" { #endif /*----------------------------------------* * List of all action sets (all "states") * *----------------------------------------*/ typedef enum { //ActionSet_Global, ActionSet_Menu, ActionSet_InGame //ActionSet_Editor } ActionSet; /*----------------------------------------------------------* * An enum for each actionset, with the actions in that set * *----------------------------------------------------------*/ /* typedef enum { Action_Global_Mute, Action_Global_MuteMusic } Action_Global; */ typedef enum { Action_Menu_Accept } Action_Menu; typedef enum { Action_InGame_ACTION, Action_InGame_Interact, Action_InGame_Map, Action_InGame_Restart, Action_InGame_Esc } Action_InGame; /* typedef enum { //Action_Editor_PrevTool, //Action_Editor_NextTool } Action_Editor; */ /*-----------------------------------------* * A union to represent any actionset enum * *-----------------------------------------*/ typedef union { int intval; //Action_Global Global; Action_Menu Menu; Action_InGame InGame; //Action_Editor Editor; } Action; #ifdef __cplusplus } // extern "C" #endif #endif // ACTIONSETS_H ================================================ FILE: desktop_version/src/Alloc.h ================================================ #ifndef ALLOCGAME_H #define ALLOCGAME_H /* TODO: VVV_malloc, VVV_realloc, etc. */ #define VVV_freefunc(func, obj) \ do \ { \ if (obj != NULL) \ { \ func(obj); \ obj = NULL; \ } \ } \ while (0) #define VVV_free(obj) VVV_freefunc(SDL_free, obj) #endif /* ALLOCGAME_H */ ================================================ FILE: desktop_version/src/BinaryBlob.cpp ================================================ #include "BinaryBlob.h" #include #ifdef VVV_COMPILEMUSIC #include #endif #include "Alloc.h" #include "Exit.h" #include "FileSystemUtils.h" #include "UtilityClass.h" #include "Vlogging.h" binaryBlob::binaryBlob(void) { #ifdef VVV_COMPILEMUSIC numberofHeaders = 0; #endif SDL_zeroa(m_headers); SDL_zeroa(m_memblocks); } #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*) SDL_malloc(size); if (memblock == NULL) { VVV_exit(1); } fread(memblock, 1, size, file); fclose(file); vlog_info("The complete file size: %li", 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 { vlog_info("Unable to open file"); } } void binaryBlob::writeBinaryBlob(const char* _name) { FILE *file = fopen(_name, "wb"); if (file != NULL) { fwrite((char*) &m_headers, 1, sizeof(m_headers), file); for (int i = 0; i < numberofHeaders; i += 1) { fwrite(m_memblocks[i], 1, m_headers[i].size, file); } fclose(file); } else { vlog_info("Unable to open new file for writing. Feels bad."); } } #endif bool binaryBlob::unPackBinary(const char* name) { return FILESYSTEM_loadBinaryBlob(this, name); } void binaryBlob::clear(void) { for (size_t i = 0; i < SDL_arraysize(m_headers); i += 1) { if (m_memblocks[i] != NULL) { VVV_free(m_memblocks[i]); } } SDL_zeroa(m_memblocks); SDL_zeroa(m_headers); } int binaryBlob::getIndex(const char* _name) { for (size_t i = 0; i < SDL_arraysize(m_headers); i += 1) { if (SDL_strcmp(_name, m_headers[i].name) == 0 && m_headers[i].valid) { return i; } } return -1; } int binaryBlob::getSize(int _index) { if (!INBOUNDS_ARR(_index, m_headers)) { vlog_error("getSize() out-of-bounds!"); return 0; } return m_headers[_index].size; } char* binaryBlob::getAddress(int _index) { if (!INBOUNDS_ARR(_index, m_memblocks)) { vlog_error("getAddress() out-of-bounds!"); return NULL; } return m_memblocks[_index]; } bool binaryBlob::nextExtra(size_t* start) { size_t* idx; if (start == NULL) { return false; } for (idx = start; *idx < SDL_arraysize(m_headers); *idx += 1) { if (m_headers[*idx].valid #define FOREACH_TRACK(_, track_name) && SDL_strcmp(m_headers[*idx].name, "data/" track_name) != 0 TRACK_NAMES(_) ) { return true; } } return false; } ================================================ FILE: desktop_version/src/BinaryBlob.h ================================================ #ifndef BINARYBLOB_H #define BINARYBLOB_H #include #include /* Laaaazyyyyyyy -flibit */ // #define VVV_COMPILEMUSIC #define TRACK_NAMES(blob) \ FOREACH_TRACK(blob, "music/0levelcomplete.ogg") \ FOREACH_TRACK(blob, "music/1pushingonwards.ogg") \ FOREACH_TRACK(blob, "music/2positiveforce.ogg") \ FOREACH_TRACK(blob, "music/3potentialforanything.ogg") \ FOREACH_TRACK(blob, "music/4passionforexploring.ogg") \ FOREACH_TRACK(blob, "music/5intermission.ogg") \ FOREACH_TRACK(blob, "music/6presentingvvvvvv.ogg") \ FOREACH_TRACK(blob, "music/7gamecomplete.ogg") \ FOREACH_TRACK(blob, "music/8predestinedfate.ogg") \ FOREACH_TRACK(blob, "music/9positiveforcereversed.ogg") \ FOREACH_TRACK(blob, "music/10popularpotpourri.ogg") \ FOREACH_TRACK(blob, "music/11pipedream.ogg") \ FOREACH_TRACK(blob, "music/12pressurecooker.ogg") \ FOREACH_TRACK(blob, "music/13pacedenergy.ogg") \ FOREACH_TRACK(blob, "music/14piercingthesky.ogg") \ FOREACH_TRACK(blob, "music/predestinedfatefinallevel.ogg") struct resourceheader { char name[48]; int32_t start_UNUSED; int32_t size; uint8_t valid; }; class binaryBlob { public: binaryBlob(void); #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); bool nextExtra(size_t* start); char* getAddress(int _index); void clear(void); static const int max_headers = 128; #ifdef VVV_COMPILEMUSIC int numberofHeaders; #endif resourceheader m_headers[max_headers]; char* m_memblocks[max_headers]; }; #endif /* BINARYBLOB_H */ ================================================ FILE: desktop_version/src/BlockV.cpp ================================================ #include "BlockV.h" #include #include "Script.h" #include "Font.h" blockclass::blockclass(void) { clear(); } void blockclass::clear(void) { type = 0; trigger = 0; xp = 0; yp = 0; wp = 0; hp = 0; rect.x = xp; rect.y = yp; rect.w = wp; rect.h = hp; r = 0; g = 0; b = 0; activity_y = 0; /* std::strings get initialized automatically, but this is * in case this function gets called again after construction */ script.clear(); prompt.clear(); gettext = true; } 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; } void blockclass::setblockcolour(const char* col) { bool exists = ::script.textbox_colours.count(col) != 0; r = ::script.textbox_colours[exists ? col : "gray"].r; g = ::script.textbox_colours[exists ? col : "gray"].g; b = ::script.textbox_colours[exists ? col : "gray"].b; } ================================================ FILE: desktop_version/src/BlockV.h ================================================ #ifndef BLOCKV_H #define BLOCKV_H #include #include #include class blockclass { public: blockclass(void); void clear(void); void rectset(const int xi, const int yi, const int wi, const int hi); void setblockcolour(const char* col); public: //Fundamentals SDL_Rect rect; int type; int trigger; int xp, yp, wp, hp; std::string script, prompt; int r, g, b; int activity_y; bool gettext; }; #endif /* BLOCKV_H */ ================================================ FILE: desktop_version/src/ButtonGlyphs.cpp ================================================ #include "ButtonGlyphs.h" #include #include "Game.h" #include "Localization.h" #include "UTF8.h" extern "C" { typedef enum { GLYPH_NINTENDO_DECK_A, // Note that for the Deck, the icons are same as Nintendo but the layout is the same as Xbox GLYPH_NINTENDO_DECK_B, GLYPH_NINTENDO_DECK_X, GLYPH_NINTENDO_DECK_Y, GLYPH_NINTENDO_PLUS, GLYPH_NINTENDO_MINUS, GLYPH_NINTENDO_L, GLYPH_NINTENDO_R, GLYPH_NINTENDO_ZL, GLYPH_NINTENDO_ZR, GLYPH_NINTENDO_XBOX_LSTICK, GLYPH_NINTENDO_XBOX_RSTICK, GLYPH_NINTENDO_SL, GLYPH_NINTENDO_SR, GLYPH_GENERIC_L, GLYPH_GENERIC_R, GLYPH_PLAYSTATION_CIRCLE, GLYPH_PLAYSTATION_CROSS, GLYPH_PLAYSTATION_TRIANGLE, GLYPH_PLAYSTATION_SQUARE, GLYPH_PLAYSTATION_START, GLYPH_PLAYSTATION_OPTIONS, GLYPH_PLAYSTATION_DECK_L1, GLYPH_PLAYSTATION_DECK_R1, GLYPH_PLAYSTATION_DECK_L2, GLYPH_PLAYSTATION_DECK_R2, GLYPH_PLAYSTATION_DECK_L3, GLYPH_PLAYSTATION_DECK_R3, GLYPH_DECK_L4, GLYPH_DECK_R4, GLYPH_DECK_L5, GLYPH_DECK_R5, GLYPH_XBOX_B, GLYPH_XBOX_A, GLYPH_XBOX_Y, GLYPH_XBOX_X, GLYPH_XBOX_DECK_VIEW, GLYPH_XBOX_DECK_MENU, GLYPH_XBOX_LB, GLYPH_XBOX_RB, GLYPH_XBOX_LT, GLYPH_XBOX_RT, GLYPH_NINTENDO_GENERIC_ACTIONRIGHT, GLYPH_NINTENDO_GENERIC_ACTIONDOWN, GLYPH_NINTENDO_GENERIC_ACTIONUP, GLYPH_NINTENDO_GENERIC_ACTIONLEFT, GLYPH_NINTENDO_GENERIC_STICK, GLYPH_UNKNOWN, /* Added after 2.4 */ GLYPH_NINTENDO_GAMECUBE_A, GLYPH_NINTENDO_GAMECUBE_B, GLYPH_NINTENDO_GAMECUBE_X, GLYPH_NINTENDO_GAMECUBE_Y, GLYPH_NINTENDO_GAMECUBE_L, GLYPH_NINTENDO_GAMECUBE_R, GLYPH_NINTENDO_GAMECUBE_Z, GLYPH_TOTAL } ButtonGlyphKey; static char glyph[GLYPH_TOTAL][5]; typedef enum { LAYOUT_NINTENDO_SWITCH_PRO, LAYOUT_NINTENDO_SWITCH_JOYCON_L, LAYOUT_NINTENDO_SWITCH_JOYCON_R, LAYOUT_DECK, LAYOUT_PLAYSTATION, LAYOUT_XBOX, LAYOUT_GENERIC, /* Added after 2.4 */ LAYOUT_GAMECUBE, LAYOUT_TOTAL } ButtonGlyphLayout; /* SDL provides Xbox buttons, we'd like to show the correct * (controller-specific) glyphs or labels for those... */ static const char* glyph_layout[LAYOUT_TOTAL][SDL_CONTROLLER_BUTTON_RIGHTSHOULDER + 1] = { { // NINTENDO_SWITCH_PRO glyph[GLYPH_NINTENDO_DECK_B], glyph[GLYPH_NINTENDO_DECK_A], glyph[GLYPH_NINTENDO_DECK_Y], glyph[GLYPH_NINTENDO_DECK_X], glyph[GLYPH_NINTENDO_MINUS], "HOME", glyph[GLYPH_NINTENDO_PLUS], glyph[GLYPH_NINTENDO_XBOX_LSTICK], glyph[GLYPH_NINTENDO_XBOX_RSTICK], glyph[GLYPH_NINTENDO_L], glyph[GLYPH_NINTENDO_R] }, { // NINTENDO_SWITCH_JOYCON_L glyph[GLYPH_NINTENDO_GENERIC_ACTIONDOWN], glyph[GLYPH_NINTENDO_GENERIC_ACTIONRIGHT], glyph[GLYPH_NINTENDO_GENERIC_ACTIONLEFT], glyph[GLYPH_NINTENDO_GENERIC_ACTIONUP], "CAPTURE", "GUIDE", glyph[GLYPH_NINTENDO_MINUS], glyph[GLYPH_NINTENDO_GENERIC_STICK], glyph[GLYPH_NINTENDO_XBOX_RSTICK], glyph[GLYPH_NINTENDO_SL], glyph[GLYPH_NINTENDO_SR] }, { // NINTENDO_SWITCH_JOYCON_R glyph[GLYPH_NINTENDO_GENERIC_ACTIONDOWN], glyph[GLYPH_NINTENDO_GENERIC_ACTIONRIGHT], glyph[GLYPH_NINTENDO_GENERIC_ACTIONLEFT], glyph[GLYPH_NINTENDO_GENERIC_ACTIONUP], "HOME", "GUIDE", glyph[GLYPH_NINTENDO_PLUS], glyph[GLYPH_NINTENDO_GENERIC_STICK], glyph[GLYPH_NINTENDO_XBOX_RSTICK], glyph[GLYPH_NINTENDO_SL], glyph[GLYPH_NINTENDO_SR] }, { // DECK glyph[GLYPH_NINTENDO_DECK_A], glyph[GLYPH_NINTENDO_DECK_B], glyph[GLYPH_NINTENDO_DECK_X], glyph[GLYPH_NINTENDO_DECK_Y], glyph[GLYPH_XBOX_DECK_VIEW], "GUIDE", glyph[GLYPH_XBOX_DECK_MENU], glyph[GLYPH_PLAYSTATION_DECK_L3], glyph[GLYPH_PLAYSTATION_DECK_R3], glyph[GLYPH_PLAYSTATION_DECK_L1], glyph[GLYPH_PLAYSTATION_DECK_R1] }, { // PLAYSTATION glyph[GLYPH_PLAYSTATION_CROSS], glyph[GLYPH_PLAYSTATION_CIRCLE], glyph[GLYPH_PLAYSTATION_SQUARE], glyph[GLYPH_PLAYSTATION_TRIANGLE], glyph[GLYPH_PLAYSTATION_OPTIONS], "PS", glyph[GLYPH_PLAYSTATION_START], glyph[GLYPH_PLAYSTATION_DECK_L3], glyph[GLYPH_PLAYSTATION_DECK_R3], glyph[GLYPH_PLAYSTATION_DECK_L1], glyph[GLYPH_PLAYSTATION_DECK_R1] }, { // XBOX glyph[GLYPH_XBOX_A], glyph[GLYPH_XBOX_B], glyph[GLYPH_XBOX_X], glyph[GLYPH_XBOX_Y], glyph[GLYPH_XBOX_DECK_VIEW], "GUIDE", glyph[GLYPH_XBOX_DECK_MENU], glyph[GLYPH_NINTENDO_XBOX_LSTICK], glyph[GLYPH_NINTENDO_XBOX_RSTICK], glyph[GLYPH_XBOX_LB], glyph[GLYPH_XBOX_RB] }, { // GENERIC glyph[GLYPH_NINTENDO_GENERIC_ACTIONDOWN], glyph[GLYPH_NINTENDO_GENERIC_ACTIONRIGHT], glyph[GLYPH_NINTENDO_GENERIC_ACTIONLEFT], glyph[GLYPH_NINTENDO_GENERIC_ACTIONUP], "SELECT", "GUIDE", "START", glyph[GLYPH_NINTENDO_XBOX_LSTICK], glyph[GLYPH_NINTENDO_XBOX_RSTICK], glyph[GLYPH_GENERIC_L], glyph[GLYPH_GENERIC_R] }, { // GAMECUBE glyph[GLYPH_NINTENDO_GAMECUBE_A], glyph[GLYPH_NINTENDO_GAMECUBE_X], glyph[GLYPH_NINTENDO_GAMECUBE_B], glyph[GLYPH_NINTENDO_GAMECUBE_Y], glyph[GLYPH_UNKNOWN], glyph[GLYPH_UNKNOWN], "START", glyph[GLYPH_UNKNOWN], glyph[GLYPH_UNKNOWN], glyph[GLYPH_UNKNOWN], glyph[GLYPH_NINTENDO_GAMECUBE_Z] } }; static bool keyboard_is_active = true; static ButtonGlyphLayout layout = LAYOUT_GENERIC; void BUTTONGLYPHS_init(void) { /* Set glyph array to strings for all the button glyph codepoints (U+EBxx) */ for (int i = 0; i < GLYPH_TOTAL; i++) { SDL_strlcpy(glyph[i], UTF8_encode(0xEB00+i).bytes, sizeof(glyph[i])); } } bool BUTTONGLYPHS_keyboard_is_available(void) { /* Returns true if it makes sense to show button hints that are only available * on keyboards (like press M to mute), false if we're on a console. */ if (BUTTONGLYPHS_keyboard_is_active()) { /* The keyboard is active, so there HAS to be a keyboard available */ return true; } #if defined(__ANDROID__) || TARGET_OS_IPHONE return false; #else return !SDL_GetHintBoolean("SteamDeck", SDL_FALSE); #endif } bool BUTTONGLYPHS_keyboard_is_active(void) { /* Returns true if, not only do we have a keyboard available, but it's also the * active input method. (So, show keyboard keys, if false, show controller glyphs) */ return keyboard_is_active; } void BUTTONGLYPHS_keyboard_set_active(bool active) { keyboard_is_active = active; } void BUTTONGLYPHS_update_layout(SDL_GameController *c) { Uint16 vendor = SDL_GameControllerGetVendor(c); Uint16 product = SDL_GameControllerGetProduct(c); if (vendor == 0x054c) { layout = LAYOUT_PLAYSTATION; } else if (vendor == 0x28de) { /* Steam Virtual Gamepads can hypothetically tell us that the physical * device is a PlayStation controller, so try to catch that scenario */ SDL_GameControllerType gct = SDL_GameControllerGetType(c); if ( gct == SDL_CONTROLLER_TYPE_PS3 || gct == SDL_CONTROLLER_TYPE_PS4 || gct == SDL_CONTROLLER_TYPE_PS5 ) { layout = LAYOUT_PLAYSTATION; } else { layout = LAYOUT_DECK; } } else if (vendor == 0x057e) { if (product == 0x2006) { layout = LAYOUT_NINTENDO_SWITCH_JOYCON_L; } else if (product == 0x2007) { layout = LAYOUT_NINTENDO_SWITCH_JOYCON_R; } else if (product == 0x0337) { layout = LAYOUT_GAMECUBE; } else { layout = LAYOUT_NINTENDO_SWITCH_PRO; } } else if (vendor == 0x2dc8) /* 8BitDo */ { if ( product == 0x2002 || /* Ultimate Wired Controller for Xbox */ product == 0x3106 ) /* Ultimate Wireless / Pro 2 Wired Controller */ { layout = LAYOUT_XBOX; } else { layout = LAYOUT_NINTENDO_SWITCH_PRO; } } else { /* For now we assume Xbox (0x045e), Generic will be used when * migrating to SDL_ActionSet */ layout = LAYOUT_XBOX; } } const char* BUTTONGLYPHS_get_wasd_text(void) { /* Returns the string to use in Welcome Aboard */ if (BUTTONGLYPHS_keyboard_is_active()) { return loc::gettext("Press arrow keys or WASD to move"); } return loc::gettext("Press left/right to move"); } const char* BUTTONGLYPHS_sdlbutton_to_glyph(const SDL_GameControllerButton button) { if (button < 0 || button > SDL_CONTROLLER_BUTTON_RIGHTSHOULDER) { SDL_assert(0 && "Unhandled button!"); return glyph[GLYPH_UNKNOWN]; } return glyph_layout[layout][button]; } static const char* glyph_for_vector( const std::vector& buttons, const int index ) { if (index < 0 || index >= (int) buttons.size()) { return NULL; } return BUTTONGLYPHS_sdlbutton_to_glyph(buttons[index]); } const char* BUTTONGLYPHS_get_button(const ActionSet actionset, const Action action, int binding) { /* Given a specific action (like INTERACT in-game), * return either a (localized) keyboard key string like "ENTER" or "E", * or a controller button glyph from the table above like glyph[GLYPH_XBOX_Y], * to fill into strings like "Press {button} to activate terminal". * * Normally, set binding = -1. This will return the best keyboard key OR controller glyph. * * If binding >= 0, select a specific CONTROLLER binding glyph, * or NULL if the index is higher than the max binding index. */ bool show_controller = binding >= 0 || !BUTTONGLYPHS_keyboard_is_active(); if (binding < 0) { binding = 0; } switch (actionset) { case ActionSet_Menu: switch (action.Menu) { case Action_Menu_Accept: if (show_controller) { return glyph_for_vector(game.controllerButton_flip, binding); } return loc::gettext("ACTION"); } break; case ActionSet_InGame: switch (action.InGame) { case Action_InGame_ACTION: if (show_controller) { return glyph_for_vector(game.controllerButton_flip, binding); } return loc::gettext("ACTION"); case Action_InGame_Interact: if (show_controller) { /* FIXME: this really does depend on the Enter/E speedrunner option... * This is messy, but let's not show the wrong thing here... */ if (game.separate_interact) { return glyph_for_vector(game.controllerButton_interact, binding); } return glyph_for_vector(game.controllerButton_map, binding); } if (game.separate_interact) { return "E"; } return loc::gettext("ENTER"); case Action_InGame_Map: if (show_controller) { return glyph_for_vector(game.controllerButton_map, binding); } return loc::gettext("ENTER"); case Action_InGame_Esc: if (show_controller) { return glyph_for_vector(game.controllerButton_esc, binding); } return loc::gettext("ESC"); case Action_InGame_Restart: if (show_controller) { return glyph_for_vector(game.controllerButton_restart, binding); } return "R"; } break; } SDL_assert(0 && "Trying to get label/glyph for unknown action!"); return glyph[GLYPH_UNKNOWN]; } char* BUTTONGLYPHS_get_all_gamepad_buttons( char* buffer, size_t buffer_len, const ActionSet actionset, const int action ) { /* Gives a list of all controller bindings, for in the menu */ Action union_action; union_action.intval = action; buffer[0] = '\0'; size_t cur = 0; const char* glyph; int binding = 0; while ((glyph = BUTTONGLYPHS_get_button(actionset, union_action, binding))) { if (binding > 0 && buffer_len >= 1) { buffer[cur] = '/'; cur++; buffer_len--; } size_t glyph_len = SDL_strlcpy(&buffer[cur], glyph, buffer_len); if (glyph_len >= buffer_len) { // Truncation occurred, we're done return buffer; } cur += glyph_len; buffer_len -= glyph_len; binding++; } return buffer; } } // extern "C" ================================================ FILE: desktop_version/src/ButtonGlyphs.h ================================================ #ifndef BUTTONGLYPHS_H #define BUTTONGLYPHS_H #include #include #include "ActionSets.h" #ifdef __cplusplus extern "C" { #endif void BUTTONGLYPHS_init(void); bool BUTTONGLYPHS_keyboard_is_available(void); bool BUTTONGLYPHS_keyboard_is_active(void); void BUTTONGLYPHS_keyboard_set_active(bool active); void BUTTONGLYPHS_update_layout(SDL_GameController *c); const char* BUTTONGLYPHS_get_wasd_text(void); const char* BUTTONGLYPHS_sdlbutton_to_glyph(SDL_GameControllerButton button); const char* BUTTONGLYPHS_get_button(ActionSet actionset, Action action, int binding); char* BUTTONGLYPHS_get_all_gamepad_buttons( char* buffer, size_t buffer_len, ActionSet actionset, int action ); #ifdef __cplusplus } // extern "C" #endif #endif // BUTTONGLYPHS_H ================================================ FILE: desktop_version/src/CWrappers.cpp ================================================ #include "CWrappers.h" #include #include "Graphics.h" #include "GraphicsUtil.h" #include "Localization.h" #include "UtilityClass.h" extern "C" { char* HELP_number_words(int _t, const char* number_class) { /* C wrapper for UtilityClass::number_words. * Caller must VVV_free. */ std::string str = help.number_words(_t, number_class); char* buffer = (char*) SDL_malloc(str.size() + 1); str.copy(buffer, str.size()); buffer[str.size()] = '\0'; return buffer; } uint32_t LOC_toupper_ch(uint32_t ch) { return loc::toupper_ch(ch); } SDL_Surface* GRAPHICS_tempScreenshot(void) { return graphics.tempScreenshot; } SDL_Surface* GRAPHICS_tempScreenshot2x(void) { return graphics.tempScreenshot2x; } uint8_t UTIL_TakeScreenshot(SDL_Surface** surface) { return TakeScreenshot(surface); } uint8_t UTIL_UpscaleScreenshot2x(SDL_Surface* src, SDL_Surface** dest) { return UpscaleScreenshot2x(src, dest); } } /* extern "C" */ ================================================ FILE: desktop_version/src/CWrappers.h ================================================ #ifndef CWRAPPERS_H #define CWRAPPERS_H #include #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ char* HELP_number_words(int _t, const char* number_class); uint32_t LOC_toupper_ch(uint32_t ch); SDL_Surface* GRAPHICS_tempScreenshot(void); SDL_Surface* GRAPHICS_tempScreenshot2x(void); uint8_t UTIL_TakeScreenshot(SDL_Surface** surface); uint8_t UTIL_UpscaleScreenshot2x(SDL_Surface* src, SDL_Surface** dest); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CWRAPPERS_H */ ================================================ FILE: desktop_version/src/Constants.h ================================================ #ifndef CONSTANTS_H #define CONSTANTS_H /* * FIXME: These should be used everywhere... * FIXME: This should include more constants! */ #define SCREEN_WIDTH_TILES 40 #define SCREEN_HEIGHT_TILES 30 #define SCREEN_WIDTH_PIXELS (SCREEN_WIDTH_TILES * 8) #define SCREEN_HEIGHT_PIXELS (SCREEN_HEIGHT_TILES * 8) #define TILE_IDX(x, y) (x + y * SCREEN_WIDTH_TILES) /* 4 bytes per char, for UTF-8 encoding. */ #define SCREEN_WIDTH_CHARS (SCREEN_WIDTH_TILES * 4) #endif /* CONSTANTS_H */ ================================================ FILE: desktop_version/src/Credits.h ================================================ #ifndef CREDITS_H #define CREDITS_H #include namespace Credits { /* Translators list; lines prefaced with a space aren't translatable */ static const char* translators[] = { "Arabic", " Eternal Dream Arabization", " Montassar Ghanmi", " Mohammed Seif Eddine Chaib", "Catalan", " Eduard Ereza Martínez", "Welsh", " Morgan Roberts", "German", " Thomas Faust", "Esperanto", " Reese Rivers", "Spanish (ES)", " Felipe Mercader", " Sara Marín", "Spanish (LATAM)", " LocQuest", " Guido Di Carlo", "Spanish (ARG.)", " LocQuest", " Guido Di Carlo", "Persian", " Amir Arzani", " Masoud Varaste", "French", " Words of Magic", "Irish", " Úna-Minh Kavanagh", " Seaghán Ó Modhráin", " Davis Sandefur", "Italian", " gloc.team", " Alain Dellepiane", " Matteo Scarabelli", " Lorenzo Bertolucci", " Fabio Bortolotti", "Japanese", " Nicalis, Inc.", " KabanFriends", "Korean", " Bada Im", " Hyungseok Cho", "Dutch", " Dav999", "Polish", " Kuba Kallus", "Brazilian Portuguese", ">Translators", " Lucas Araujo", " Thiago Araujo", ">Editing and LQA", " Ivan Lopes", " Lucas Nunes", "European Portuguese", " Locsmiths", "Russian", " TheMysticSword", "Silesian", " Kuba Kallus", "Turkish", " Engin İlkiz", "Ukrainian", " Olya Sushytska", "Chinese (Simplified)", " Sound of Mystery", "Chinese (Traditional)", " Sound of Mystery / craft", }; /* Hardcoded pagesizes for the translator credits. Simplifies paging backwards and forwards */ static const int translator_pagesize[] = { 6, 6, 12, 12, 10, 11, 10 }; /* Terry's Patrons... */ static const char* superpatrons[] = { "Anders Ekermo", "Andreas Kämper", "Anthony Burch", "Bennett Foddy", "Brendan O'Sullivan", "Christopher Armstrong", "Daniel Benmergui", "David Pittman", "Ian Bogost", "Ian Poma", "Jaz McDougall", "John Faulkenbury", "Jonathan Whiting", "Kyle Pulver", "Markus Persson", "Nathan Ostgard", "Nick Easler", "Stephen Lavelle", }; static const char* patrons[] = { "Adam Wendt", "Andreas Jörgensen", "Ángel Louzao Penalva", "Ashley Burton", "Aubrey Hesselgren", "Bradley Rose", "Brendan Urquhart", "Chris Ayotte", "Christopher Zamanillo", "Daniel Schuller", "Hybrid Mind Studios", "Emilie McGinley", "Francisco Solares", "Hal Helms", "Hayden Scott-Baron", "Hermit Games", "Ido Yehieli", "Jade Vault Games", "James Andrews", "James Riley", "James Hsieh", "Jasper Byrne", "Jedediah Baker", "Jens Bergensten", "Jeremy J. Penner", "Jeremy Peterson", "Jim McGinley", "Jonathan Cartwright", "John Nesky", "Jos Yule", "Jose Flores", "Josh Bizeau", "Joshua Buergel", "Joshua Hochner", "Kurt Ostfeld", "Magnus Pålsson", "Mark Neschadimenko", "Matt Antonellis", "Matthew Reppert", "Michael Falkensteiner", "Michael Vendittelli", "Mike Kasprzak", "Mitchel Stein", "Sean Murray", "Simon Michael", "Simon Schmid", "Stephen Maxwell", "Swing Swing Submarine", "Tam Toucan", "Terry Dooher", "Tim W.", "Timothy Bragan", }; /* CONTRIBUTORS.txt, again listed alphabetically (according to `sort`) by first name * Misa is special; she gets to be listed in C++ credits alongside Ethan */ static const char* githubfriends[] = { "Alexandra Fox", "AlexApps99", "Allison Fleischer", "Brian Callahan", "Charlie Bruce", "Christoph Böhmwalder", "Daniel Lee", "Dav999", "Elijah Stone", "Elliott Saltar", "Emmanuel Vadot", "fraZ0R", "Fredrik Ljungdahl", "iliana etaoin", "Jules de Sartiges", "Keith Stellyes", "KyoZM", "leo vriska", "MAO3J1m0Op", "Malte Grimm", "Marvin Scholz", "Matt Penny", "mothbeanie", "Nichole Mattera", "Pierre-Alain TORET", "Reese Rivers", "Rémi Verschelde", "SnDream", "Space-G", "Thomas Sänger", "Tynan Richards", "Wouter", "viri", "Vittorio Romeo", "Yussur Mustafa Oraji", }; /* Calculate credits length, finally. */ static const int creditmaxposition = 1348 + (10 * ( SDL_arraysize(superpatrons) + SDL_arraysize(patrons) + SDL_arraysize(githubfriends) )) + (12 * SDL_arraysize(translators)); } /* namespace Credits */ #endif /* CREDITS_H */ ================================================ FILE: desktop_version/src/CustomLevels.cpp ================================================ #define CL_DEFINITION #include "CustomLevels.h" #include #include #include #include #include "Alloc.h" #include "Constants.h" #include "Editor.h" #include "Enums.h" #include "FileSystemUtils.h" #include "Font.h" #include "Game.h" #include "Graphics.h" #include "GraphicsUtil.h" #include "KeyPoll.h" #include "Localization.h" #include "LocalizationStorage.h" #include "Map.h" #include "Screen.h" #include "Script.h" #include "UTF8.h" #include "UtilityClass.h" #include "Vlogging.h" #include "XMLUtils.h" #ifdef _WIN32 #define SCNx32 "x" #define SCNu32 "u" #else #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #endif #include #endif #define VMULT(y) (y * SCREEN_WIDTH_TILES * maxwidth) #define Y_INBOUNDS(y) (y >= 0 && y < SCREEN_HEIGHT_TILES * maxheight) RoomProperty::RoomProperty(void) { tileset=0; tilecol=0; warpdir=0; platx1=0; platy1=0; platx2=320; platy2=240; platv=4; enemyx1=0; enemyy1=0; enemyx2=320; enemyy2=240; enemytype=0; enemyv=0; directmode=0; } customlevelclass::customlevelclass(void) { reset(); } // comparison, not case sensitive. static bool compare_nocase (std::string first, std::string second) { unsigned int i=0; while ( (iSDL_tolower(second[i])) return false; ++i; } if (first.length()"); //Encode general XML entities size_t start_pos = 0; while ((start_pos = value.find("&#", start_pos)) != std::string::npos) { if (start_pos + 2 >= value.length()) { return ""; } bool hex = value[start_pos + 2] == 'x'; size_t end = value.find(';', start_pos); if (end == std::string::npos) { return ""; } size_t real_start = start_pos + 2 + ((int) hex); std::string number(value.substr(real_start, end - real_start)); if (!is_positive_num(number.c_str(), hex)) { return ""; } uint32_t character = 0; if (hex) { SDL_sscanf(number.c_str(), "%" SCNx32, &character); } else { SDL_sscanf(number.c_str(), "%" SCNu32, &character); } value.replace(start_pos, end - start_pos + 1, UTF8_encode(character).bytes); } return value; } #define TAG_FINDER(NAME, TAG) \ static std::string NAME(const std::string& buf) \ { \ return find_tag(buf, "<" TAG ">", ""); \ } TAG_FINDER(find_metadata, "MetaData") //only for checking that it exists TAG_FINDER(find_creator, "Creator") TAG_FINDER(find_title, "Title") TAG_FINDER(find_desc1, "Desc1") TAG_FINDER(find_desc2, "Desc2") TAG_FINDER(find_desc3, "Desc3") TAG_FINDER(find_website, "website") TAG_FINDER(find_font, "font") TAG_FINDER(find_rtl, "rtl") /* For CliPlaytestArgs */ TAG_FINDER(find_playtest, "Playtest") TAG_FINDER(find_playx, "playx") TAG_FINDER(find_playy, "playy") TAG_FINDER(find_playrx, "playrx") TAG_FINDER(find_playry, "playry") TAG_FINDER(find_playgc, "playgc") TAG_FINDER(find_playmusic, "playmusic") #undef TAG_FINDER static void levelMetaDataCallback(const char* filename) { extern customlevelclass cl; LevelMetaData temp; std::string filename_ = filename; if (!endsWith(filename, ".vvvvvv") || !FILESYSTEM_isFile(filename) || FILESYSTEM_isMounted(filename)) { return; } if (cl.getLevelMetaData(filename_, temp)) { cl.ListOfMetaData.push_back(temp); } else { vlog_warn("Level %s not found :(", filename_.c_str()); } } static void unloadZips(void) { char** list = PHYSFS_getSearchPath(); if (list == NULL) { return; } for (char** path = list; *path != NULL; path++) { if (SDL_strncmp(*path, "levels/", 7) == 0 && endsWith(*path, ".zip")) { PHYSFS_unmount(*path); } } PHYSFS_freeList(list); } void customlevelclass::getDirectoryData(void) { ListOfMetaData.clear(); FILESYSTEM_clearLevelDirError(); unloadZips(); loadZips(); FILESYSTEM_enumerateLevelDirFileNames(levelMetaDataCallback); for(size_t i = 0; i < ListOfMetaData.size(); i++) { for(size_t k = 0; k < ListOfMetaData.size(); k++) { if(compare_nocase(ListOfMetaData[i].title, ListOfMetaData[k].title )) { std::swap(ListOfMetaData[i] , ListOfMetaData[k]); } } } } bool customlevelclass::getLevelMetaDataAndPlaytestArgs(const std::string& _path, LevelMetaData& _data, CliPlaytestArgs* pt_args) { unsigned char *uMem; FILESYSTEM_loadFileToMemory(_path.c_str(), &uMem, NULL); if (uMem == NULL) { return false; } std::string buf((char*) uMem); VVV_free(uMem); if (find_metadata(buf) == "") { vlog_warn("Couldn't load metadata for %s", _path.c_str()); return false; } _data.creator = find_creator(buf); _data.creator_is_gettext = translate_creator(_data.creator); _data.title = find_title(buf); _data.title_is_gettext = translate_title(_data.title); _data.Desc1 = find_desc1(buf); _data.Desc2 = find_desc2(buf); _data.Desc3 = find_desc3(buf); _data.website = find_website(buf); if (!font::find_main_font_by_name(find_font(buf).c_str(), &_data.level_main_font_idx)) { _data.level_main_font_idx = font::get_font_idx_8x8(); } _data.rtl = help.Int(find_rtl(buf).c_str()); if (pt_args != NULL) { const std::string playtest = find_playtest(buf); if (playtest == "") { pt_args->valid = false; } else { pt_args->valid = true; pt_args->x = help.Int(find_playx(playtest).c_str()); pt_args->y = help.Int(find_playy(playtest).c_str()); pt_args->rx = help.Int(find_playrx(playtest).c_str()); pt_args->ry = help.Int(find_playry(playtest).c_str()); pt_args->gc = help.Int(find_playgc(playtest).c_str()); pt_args->music = help.Int(find_playmusic(playtest).c_str()); } } _data.filename = _path; return true; } bool customlevelclass::getLevelMetaData(const std::string& _path, LevelMetaData& _data) { return getLevelMetaDataAndPlaytestArgs(_path, _data, NULL); } void customlevelclass::reset(void) { version=2; //New smaller format change is 2 mapwidth=5; mapheight=5; title="Untitled Level"; // Already translatable creator="Unknown"; levmusic=0; customentities.clear(); levmusic=0; for (int j = 0; j < maxheight; j++) { for (int i = 0; i < maxwidth; i++) { roomproperties[i+(j*maxwidth)].tileset=0; roomproperties[i+(j*maxwidth)].tilecol=(i+j)%32; roomproperties[i+(j*maxwidth)].roomname=""; roomproperties[i+(j*maxwidth)].warpdir=0; roomproperties[i+(j*maxwidth)].platx1=0; roomproperties[i+(j*maxwidth)].platy1=0; roomproperties[i+(j*maxwidth)].platx2=320; roomproperties[i+(j*maxwidth)].platy2=240; roomproperties[i+(j*maxwidth)].platv=4; roomproperties[i+(j*maxwidth)].enemyx1=0; roomproperties[i+(j*maxwidth)].enemyy1=0; roomproperties[i+(j*maxwidth)].enemyx2=320; roomproperties[i+(j*maxwidth)].enemyy2=240; roomproperties[i+(j*maxwidth)].enemytype=0; roomproperties[i+(j*maxwidth)].enemyv=0; roomproperties[i+(j*maxwidth)].directmode=0; } } SDL_zeroa(contents); script.clearcustom(); onewaycol_override = false; script.textbox_colours.clear(); script.add_default_colours(); map.specialroomnames.clear(); player_colour = 0; } const int* customlevelclass::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; static int result[1200]; for (int j = 0; j < 30; j++) { for (int i = 0; i < 40; i++) { result[i + j*40] = gettile(rxi, ryi, i, j); } } return result; } int customlevelclass::getlevelcol(const int tileset, const int tilecol) { if(tileset==0) //Space Station { return tilecol; } else if(tileset==1) //Outside { return 32+tilecol; } else if(tileset==2) //Lab { return 40+tilecol; } else if(tileset==3) //Warp Zone { return 46+tilecol; } else if(tileset==4) //Ship { return 52+tilecol; } return 0; } int customlevelclass::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; } } int customlevelclass::getwarpbackground(int rx, int ry) { const RoomProperty* const room = getroomprop(rx, ry); switch(room->tileset) { case 0: //Space Station switch(room->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(room->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(room->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(room->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(room->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 customlevelclass::gettileidx( const int rx, const int ry, const int x, const int y ) { const int yoff = y + ry*30; int mult; int idx; if (Y_INBOUNDS(yoff)) { mult = VMULT(yoff); } else { mult = 0; } idx = x + rx*40 + mult; return idx; } void customlevelclass::settile( const int rx, const int ry, const int x, const int y, const int t ) { const int idx = gettileidx(rx, ry, x, y); if (!INBOUNDS_ARR(idx, contents)) { return; } contents[idx] = t; } int customlevelclass::gettile( const int rx, const int ry, const int x, const int y ) { const int idx = gettileidx(rx, ry, x, y); if (!INBOUNDS_ARR(idx, contents)) { return 0; } return contents[idx]; } int customlevelclass::getabstile(const int x, const int y) { int idx; int yoff; if (Y_INBOUNDS(y)) { yoff = VMULT(y); } else { yoff = 0; } idx = x + yoff; if (!INBOUNDS_ARR(idx, contents)) { return 0; } return contents[idx]; } int customlevelclass::getroompropidx(const int rx, const int ry) { return rx + ry*maxwidth; } const RoomProperty* customlevelclass::getroomprop(const int rx, const int ry) { const int idx = getroompropidx(rx, ry); if (INBOUNDS_ARR(idx, roomproperties)) { return &roomproperties[idx]; } static RoomProperty blank; blank.tileset = 1; blank.directmode = 1; blank.roomname.clear(); return ␣ } #define FOREACH_PROP(NAME, TYPE) \ void customlevelclass::setroom##NAME(const int rx, const int ry, const TYPE NAME) \ { \ const int idx = getroompropidx(rx, ry); \ \ if (!INBOUNDS_ARR(idx, roomproperties)) \ { \ return; \ } \ \ roomproperties[idx].NAME = NAME; \ } ROOM_PROPERTIES #undef FOREACH_PROP int customlevelclass::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 && getabstile(x, y)<80) { return 0; } if(getabstile(x, y)>=680) { return 0; } } } return 1; } void customlevelclass::findstartpoint(void) { //Ok! Scan the room for the closest checkpoint int testeditor=-1; //First up; is there a start point on this screen? for(size_t i=0; iNextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText(); if(pText == NULL) { pText = ""; } if (SDL_strcmp(pKey, "MetaData") == 0) { for( tinyxml2::XMLElement* subElem = pElem->FirstChildElement(); subElem; subElem= subElem->NextSiblingElement()) { const char* pKey_ = subElem->Value(); const char* pText_ = subElem->GetText() ; if(pText_ == NULL) { pText_ = ""; } if(SDL_strcmp(pKey_, "Creator") == 0) { creator = pText_; } if(SDL_strcmp(pKey_, "Title") == 0) { title = pText_; } if(SDL_strcmp(pKey_, "Desc1") == 0) { Desc1 = pText_; } if(SDL_strcmp(pKey_, "Desc2") == 0) { Desc2 = pText_; } if(SDL_strcmp(pKey_, "Desc3") == 0) { Desc3 = pText_; } if(SDL_strcmp(pKey_, "website") == 0) { website = pText_; } if(SDL_strcmp(pKey_, "onewaycol_override") == 0) { onewaycol_override = help.Int(pText_); } if(SDL_strcmp(pKey_, "font") == 0) { level_font_name = pText_; } if(SDL_strcmp(pKey_, "rtl") == 0) { rtl = help.Int(pText_); } } } if (SDL_strcmp(pKey, "mapwidth") == 0) { mapwidth = help.Int(pText); } if (SDL_strcmp(pKey, "mapheight") == 0) { mapheight = help.Int(pText); } if (SDL_strcmp(pKey, "levmusic") == 0) { levmusic = help.Int(pText); } if (SDL_strcmp(pKey, "contents") == 0 && pText[0] != '\0') { int x = 0; int y = 0; char buffer[16]; size_t start = 0; while (next_split_s(buffer, sizeof(buffer), &start, pText, ',')) { const int idx = x + maxwidth*40*y; if (INBOUNDS_ARR(idx, contents)) { contents[idx] = help.Int(buffer); } ++x; if (x == mapwidth*40) { x = 0; ++y; } } } if (SDL_strcmp(pKey, "edEntities") == 0) { for( tinyxml2::XMLElement* edEntityEl = pElem->FirstChildElement(); edEntityEl; edEntityEl=edEntityEl->NextSiblingElement()) { CustomEntity entity = CustomEntity(); const char* text = edEntityEl->GetText(); int global_x = 0; int global_y = 0; if (text != NULL) { size_t len = SDL_strlen(text); // And now we come to the part where we have to deal with // the terrible decisions of the past. // // For some reason, the closing tag of edentities generated // by 2.2 and below has not only been put on a separate // line, but also indented to match with the opening tag as // well. Like this: // // contents // // // Instead of doing contents. // // This is COMPLETELY terrible. This requires the XML to be // parsed in an extremely specific and quirky way, which // TinyXML-1 just happened to do. // // TinyXML-2 by default interprets the newline and the next // indentation of whitespace literally, so you end up with // tag contents that has a linefeed plus a bunch of extra // spaces. You can't fix this by setting the whitespace // mode to COLLAPSE_WHITESPACE, that does way more than // TinyXML-1 ever did - it removes the leading whitespace // from things like this, and // collapses XML-encoded whitespace like // this, which TinyXML-1 never did. // // Best solution here is to specifically hardcode removing // the linefeed + the extremely specific amount of // whitespace at the end of the contents. if (endsWith(text, "\n ")) // linefeed + exactly 12 spaces { // 12 spaces + 1 linefeed = 13 chars len -= 13; } entity.scriptname = std::string(text, len); } edEntityEl->QueryIntAttribute("x", &global_x); edEntityEl->QueryIntAttribute("y", &global_y); entity.rx = global_x / SCREEN_WIDTH_TILES; entity.x = global_x % SCREEN_WIDTH_TILES; entity.ry = global_y / SCREEN_HEIGHT_TILES; entity.y = global_y % SCREEN_HEIGHT_TILES; edEntityEl->QueryIntAttribute("t", &entity.t); edEntityEl->QueryIntAttribute("p1", &entity.p1); edEntityEl->QueryIntAttribute("p2", &entity.p2); edEntityEl->QueryIntAttribute("p3", &entity.p3); edEntityEl->QueryIntAttribute("p4", &entity.p4); edEntityEl->QueryIntAttribute("p5", &entity.p5); edEntityEl->QueryIntAttribute("p6", &entity.p6); customentities.push_back(entity); } } if (SDL_strcmp(pKey, "levelMetaData") == 0) { int i = 0; for( tinyxml2::XMLElement* edLevelClassElement = pElem->FirstChildElement(); edLevelClassElement; edLevelClassElement=edLevelClassElement->NextSiblingElement()) { if (!INBOUNDS_ARR(i, roomproperties)) { continue; } if(edLevelClassElement->GetText() != NULL) { roomproperties[i].roomname = std::string(edLevelClassElement->GetText()) ; } edLevelClassElement->QueryIntAttribute("tileset", &roomproperties[i].tileset); edLevelClassElement->QueryIntAttribute("tilecol", &roomproperties[i].tilecol); edLevelClassElement->QueryIntAttribute("platx1", &roomproperties[i].platx1); edLevelClassElement->QueryIntAttribute("platy1", &roomproperties[i].platy1); edLevelClassElement->QueryIntAttribute("platx2", &roomproperties[i].platx2); edLevelClassElement->QueryIntAttribute("platy2", &roomproperties[i].platy2); edLevelClassElement->QueryIntAttribute("platv", &roomproperties[i].platv); edLevelClassElement->QueryIntAttribute("enemyx1", &roomproperties[i].enemyx1); edLevelClassElement->QueryIntAttribute("enemyy1", &roomproperties[i].enemyy1); edLevelClassElement->QueryIntAttribute("enemyx2", &roomproperties[i].enemyx2); edLevelClassElement->QueryIntAttribute("enemyy2", &roomproperties[i].enemyy2); edLevelClassElement->QueryIntAttribute("enemytype", &roomproperties[i].enemytype); edLevelClassElement->QueryIntAttribute("enemyv", &roomproperties[i].enemyv); edLevelClassElement->QueryIntAttribute("directmode", &roomproperties[i].directmode); edLevelClassElement->QueryIntAttribute("warpdir", &roomproperties[i].warpdir); i++; } } if (SDL_strcmp(pKey, "script") == 0 && pText[0] != '\0') { Script script_; bool headerfound = false; size_t start = 0; size_t len = 0; size_t prev_start = 0; while (next_split(&start, &len, &pText[start], '|')) { if (len > 0 && pText[prev_start + len - 1] == ':') { if (headerfound) { script.customscripts.push_back(script_); } script_.name = std::string(&pText[prev_start], len - 1); script_.contents.clear(); headerfound = true; goto next; } if (headerfound) { script_.contents.push_back(std::string(&pText[prev_start], len)); } next: prev_start = start; } /* Add the last script */ if (headerfound) { script.customscripts.push_back(script_); } } if (SDL_strcmp(pKey, "TextboxColours") == 0) { for (tinyxml2::XMLElement* textColourElement = pElem->FirstChildElement(); textColourElement; textColourElement = textColourElement->NextSiblingElement()) { if (SDL_strcmp(textColourElement->Value(), "colour") == 0) { int r = 255; int g = 255; int b = 255; textColourElement->QueryIntAttribute("r", &r); textColourElement->QueryIntAttribute("g", &g); textColourElement->QueryIntAttribute("b", &b); const char* name = textColourElement->Attribute("name"); if (name != NULL) { SDL_Colour colour; colour.r = r; colour.g = g; colour.b = b; script.textbox_colours[name] = colour; } } } } if (SDL_strcmp(pKey, "SpecialRoomnames") == 0) { for (tinyxml2::XMLElement* roomnameElement = pElem->FirstChildElement(); roomnameElement; roomnameElement = roomnameElement->NextSiblingElement()) { const char* roomnameType = roomnameElement->Value(); Roomname name; name.x = 0; name.y = 0; name.flag = -1; name.loop = false; name.type = RoomnameType_STATIC; name.progress = 0; name.delay = 0; if (SDL_strcmp(roomnameType, "transform") == 0) { name.type = RoomnameType_TRANSFORM; name.delay = 2; } else if (SDL_strcmp(roomnameType, "glitch") == 0) { name.type = RoomnameType_GLITCH; name.progress = 1; name.delay = -1; } name.text.clear(); roomnameElement->QueryIntAttribute("x", &name.x); roomnameElement->QueryIntAttribute("y", &name.y); roomnameElement->QueryIntAttribute("flag", &name.flag); roomnameElement->QueryBoolAttribute("loop", &name.loop); // Rooms start at (100, 100) instead of (0, 0), so offset the coordinates name.x += 100; name.y += 100; if (name.type == RoomnameType_STATIC) { const char* text = roomnameElement->GetText(); if (text != NULL) { name.text.push_back(std::string(text)); } else { name.text.push_back(std::string("")); } } else { // Does it have children? if (roomnameElement->FirstChildElement() == NULL) { continue; } for (tinyxml2::XMLElement* textElement = roomnameElement->FirstChildElement(); textElement; textElement = textElement->NextSiblingElement()) { if (SDL_strcmp(textElement->Value(), "text") == 0) { const char* text = textElement->GetText(); if (text != NULL) { name.text.push_back(std::string(text)); } else { name.text.push_back(std::string("")); } } } } map.specialroomnames.push_back(name); } } if (SDL_strcmp(pKey, "PlayerColour") == 0) { player_colour = help.Int(pText); game.savecolour = player_colour; } } if (mapwidth < maxwidth) { /* Unscramble platv, since it was stored incorrectly * in 2.2 and previous... */ size_t i; int x = 0; int y = 0; int temp_platv[numrooms]; for (i = 0; i < numrooms; ++i) { temp_platv[i] = roomproperties[i].platv; } for (i = 0; i < numrooms; ++i) { if (x < mapwidth) { const int platv_idx = x + y * mapwidth; if (INBOUNDS_ARR(platv_idx, temp_platv)) { roomproperties[i].platv = temp_platv[platv_idx]; } } else { roomproperties[i].platv = 4; /* default */ } ++x; if (x >= maxwidth) { x = 0; ++y; } } } loc::loadtext_custom(_path.c_str()); font::load_custom(level_font_name.c_str()); version=2; return true; fail: return false; } bool customlevelclass::save(const std::string& _path) { tinyxml2::XMLDocument doc; std::string newpath("levels/" + _path); // Try to preserve the XML of the currently-loaded one bool already_exists = !ed.loaded_filepath.empty() && FILESYSTEM_loadTiXml2Document(ed.loaded_filepath.c_str(), doc); if (!already_exists && !ed.loaded_filepath.empty()) { vlog_error("Currently-loaded %s not found", ed.loaded_filepath.c_str()); } ed.loaded_filepath = newpath; tinyxml2::XMLElement* msg; xml::update_declaration(doc); tinyxml2::XMLElement * root = xml::update_element(doc, "MapData"); root->SetAttribute("version",version); xml::update_comment(root, " Save file "); tinyxml2::XMLElement * data = xml::update_element(root, "Data"); msg = xml::update_element(data, "MetaData"); //getUser xml::update_tag(msg, "Creator", creator.c_str()); xml::update_tag(msg, "Title", title.c_str()); xml::update_tag(msg, "Created", version); xml::update_tag(msg, "Modified", modifier.c_str()); xml::update_tag(msg, "Modifiers", version); xml::update_tag(msg, "Desc1", Desc1.c_str()); xml::update_tag(msg, "Desc2", Desc2.c_str()); xml::update_tag(msg, "Desc3", Desc3.c_str()); xml::update_tag(msg, "website", website.c_str()); if (onewaycol_override) { xml::update_tag(msg, "onewaycol_override", onewaycol_override); } else { // Delete the element. I could just delete one, but just to be sure, // I will delete all of them if there are more than one tinyxml2::XMLElement* element; while ((element = msg->FirstChildElement("onewaycol_override")) != NULL) { doc.DeleteNode(element); } } if (level_font_name != "" && level_font_name != "font") { xml::update_tag(msg, "font", level_font_name.c_str()); } else { // Get rid of it completely, same as tinyxml2::XMLElement* element; while ((element = msg->FirstChildElement("font")) != NULL) { doc.DeleteNode(element); } } if (rtl) { xml::update_tag(msg, "rtl", rtl); } else { // Also get rid of this one... tinyxml2::XMLElement* element; while ((element = msg->FirstChildElement("rtl")) != NULL) { doc.DeleteNode(element); } } xml::update_tag(data, "mapwidth", mapwidth); xml::update_tag(data, "mapheight", mapheight); xml::update_tag(data, "levmusic", levmusic); //New save format std::string contentsString=""; for(int y = 0; y < mapheight*30; y++ ) { for(int x = 0; x < mapwidth*40; x++ ) { contentsString += help.String(getabstile(x, y)) + ","; } } xml::update_tag(data, "contents", contentsString.c_str()); msg = xml::update_element_delete_contents(data, "edEntities"); for(size_t i = 0; i < customentities.size(); i++) { tinyxml2::XMLElement *edentityElement = doc.NewElement( "edentity" ); const int global_x = customentities[i].rx * SCREEN_WIDTH_TILES + customentities[i].x; const int global_y = customentities[i].ry * SCREEN_HEIGHT_TILES + customentities[i].y; edentityElement->SetAttribute("x", global_x); edentityElement->SetAttribute("y", global_y); edentityElement->SetAttribute( "t", customentities[i].t); edentityElement->SetAttribute( "p1", customentities[i].p1); edentityElement->SetAttribute( "p2", customentities[i].p2); edentityElement->SetAttribute( "p3", customentities[i].p3); edentityElement->SetAttribute( "p4", customentities[i].p4); edentityElement->SetAttribute( "p5", customentities[i].p5); edentityElement->SetAttribute( "p6", customentities[i].p6); edentityElement->LinkEndChild( doc.NewText( customentities[i].scriptname.c_str() )) ; msg->LinkEndChild( edentityElement ); } msg = xml::update_element_delete_contents(data, "levelMetaData"); int temp_platv[numrooms]; for (size_t i = 0; i < SDL_arraysize(temp_platv); ++i) { temp_platv[i] = 4; /* default */ } if (mapwidth < maxwidth) { /* Re-scramble platv, since it was stored incorrectly * in 2.2 and previous... */ size_t i; int x = 0; int y = 0; for (i = 0; i < numrooms; ++i) { if (x < mapwidth) { const int platv_idx = x + y * mapwidth; if (INBOUNDS_ARR(platv_idx, temp_platv)) { temp_platv[platv_idx] = roomproperties[i].platv; } } ++x; if (x >= mapwidth) { /* Skip to next actual row. */ i += maxwidth - mapwidth; x = 0; ++y; } } } for(size_t i = 0; i < SDL_arraysize(roomproperties); i++) { tinyxml2::XMLElement *roompropertyElement = doc.NewElement( "edLevelClass" ); roompropertyElement->SetAttribute( "tileset", roomproperties[i].tileset); roompropertyElement->SetAttribute( "tilecol", roomproperties[i].tilecol); roompropertyElement->SetAttribute( "platx1", roomproperties[i].platx1); roompropertyElement->SetAttribute( "platy1", roomproperties[i].platy1); roompropertyElement->SetAttribute( "platx2", roomproperties[i].platx2); roompropertyElement->SetAttribute( "platy2", roomproperties[i].platy2); roompropertyElement->SetAttribute( "platv", temp_platv[i]); roompropertyElement->SetAttribute( "enemyx1", roomproperties[i].enemyx1); roompropertyElement->SetAttribute( "enemyy1", roomproperties[i].enemyy1); roompropertyElement->SetAttribute( "enemyx2", roomproperties[i].enemyx2); roompropertyElement->SetAttribute( "enemyy2", roomproperties[i].enemyy2); roompropertyElement->SetAttribute( "enemytype", roomproperties[i].enemytype); roompropertyElement->SetAttribute( "enemyv", roomproperties[i].enemyv); roompropertyElement->SetAttribute( "directmode", roomproperties[i].directmode); roompropertyElement->SetAttribute( "warpdir", roomproperties[i].warpdir); roompropertyElement->LinkEndChild( doc.NewText( roomproperties[i].roomname.c_str() )) ; msg->LinkEndChild( roompropertyElement ); } std::string scriptString; for(size_t i = 0; i < script.customscripts.size(); i++) { Script& script_ = script.customscripts[i]; scriptString += script_.name + ":|"; for (size_t ii = 0; ii < script_.contents.size(); ++ii) { scriptString += script_.contents[ii]; // Inserts a space if the line ends with a : if (script_.contents[ii].length() && *script_.contents[ii].rbegin() == ':') { scriptString += " "; } scriptString += "|"; } } xml::update_tag(data, "script", scriptString.c_str()); if (player_colour != 0) { xml::update_tag(data, "PlayerColour", player_colour); } else { // Get rid of this one as well, since older levels don't have this property anyways tinyxml2::XMLElement* element; while ((element = data->FirstChildElement("PlayerColour")) != NULL) { doc.DeleteNode(element); } } return FILESYSTEM_saveTiXml2Document(newpath.c_str(), doc); } void customlevelclass::generatecustomminimap(void) { const MapRenderData data = map.get_render_data(); // Start drawing the minimap SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer); graphics.set_render_target(graphics.images[IMAGE_CUSTOMMINIMAP]); graphics.clear(); // Scan over the map size for (int j2 = data.starty; j2 < data.starty + data.height; j2++) { for (int i2 = data.startx; i2 < data.startx + data.width; i2++) { std::vector dark_points; std::vector light_points; bool dark = getroomprop(i2, j2)->tileset == 1; // Ok, now scan over each square for (int j = 0; j < 9 * data.zoom; j++) { for (int i = 0; i < 12 * data.zoom; i++) { int tile; switch (data.zoom) { case 4: tile = absfree( int(i * 0.83) + (i2 * 40), int(j * 0.83) + (j2 * 30) ); break; case 2: tile = absfree( int(i * 1.6) + (i2 * 40), int(j * 1.6) + (j2 * 30) ); break; default: tile = absfree( 3 + (i * 3) + (i2 * 40), (j * 3) + (j2 * 30) ); break; } if (tile >= 1) { // Add this pixel SDL_Point point = { ((i2 - data.startx) * 12 * data.zoom) + i, ((j2 - data.starty) * 9 * data.zoom) + j }; if (dark) { dark_points.push_back(point); } else { light_points.push_back(point); } } } } // Draw them all at once if (!dark_points.empty()) { graphics.draw_points(dark_points.data(), dark_points.size(), 96, 96, 96); } if (!light_points.empty()) { graphics.draw_points(light_points.data(), light_points.size(), 196, 196, 196); } } } graphics.set_render_target(target); } // Return a graphics-ready color based off of the given tileset and tilecol // Much kudos to Dav999 for saving me a lot of work, because I stole these colors from const.lua in Ved! -Info Teddy SDL_Color customlevelclass::getonewaycol(const int rx, const int ry) { const RoomProperty* const room = getroomprop(rx, ry); switch (room->tileset) { case 0: // Space Station switch (room->tilecol) { case -1: return graphics.getRGB(109, 109, 109); case 0: return graphics.getRGB(131, 141, 235); case 1: return graphics.getRGB(227, 140, 227); case 2: return graphics.getRGB(242, 126, 151); case 3: return graphics.getRGB(229, 235, 133); case 4: return graphics.getRGB(148, 238, 130); case 5: return graphics.getRGB(140, 165, 227); case 6: return graphics.getRGB(227, 140, 148); case 7: return graphics.getRGB(140, 173, 228); case 8: return graphics.getRGB(142, 235, 137); case 9: return graphics.getRGB(137, 235, 206); case 10: return graphics.getRGB(235, 139, 223); case 11: return graphics.getRGB(238, 130, 138); case 12: return graphics.getRGB(137, 235, 178); case 13: return graphics.getRGB(125, 205, 247); case 14: return graphics.getRGB(190, 137, 235); case 15: return graphics.getRGB(235, 137, 206); case 16: return graphics.getRGB(229, 247, 127); case 17: return graphics.getRGB(127, 200, 247); case 18: return graphics.getRGB(197, 137, 235); case 19: return graphics.getRGB(235, 131, 175); case 20: return graphics.getRGB(242, 210, 123); case 21: return graphics.getRGB(131, 235, 158); case 22: return graphics.getRGB(242, 126, 151); case 23: return graphics.getRGB(219, 243, 123); case 24: return graphics.getRGB(131, 234, 145); case 25: return graphics.getRGB(131, 199, 234); case 26: return graphics.getRGB(141, 131, 234); case 27: return graphics.getRGB(226, 140, 144); case 28: return graphics.getRGB(129, 236, 144); case 29: return graphics.getRGB(235, 231, 131); case 30: return graphics.getRGB(153, 235, 131); case 31: return graphics.getRGB(207, 131, 235); } break; case 1: // Outside switch (room->tilecol) { case 0: return graphics.getRGB(57, 86, 140); case 1: return graphics.getRGB(156, 42, 42); case 2: return graphics.getRGB(42, 156, 155); case 3: return graphics.getRGB(125, 36, 162); case 4: return graphics.getRGB(191, 198, 0); case 5: return graphics.getRGB(0, 198, 126); case 6: return graphics.getRGB(224, 110, 177); case 7: return graphics.getRGB(255, 142, 87); } break; case 2: // Lab switch (room->tilecol) { case 0: return graphics.getRGB(0, 165, 206); case 1: return graphics.getRGB(206, 5, 0); case 2: return graphics.getRGB(222, 0, 173); case 3: return graphics.getRGB(27, 67, 255); case 4: return graphics.getRGB(194, 206, 0); case 5: return graphics.getRGB(0, 206, 39); case 6: return graphics.getRGB(0, 165, 206); } break; case 3: // Warp Zone switch (room->tilecol) { case 0: return graphics.getRGB(113, 178, 197); case 1: return graphics.getRGB(197, 113, 119); case 2: return graphics.getRGB(196, 113, 197); case 3: return graphics.getRGB(149, 113, 197); case 4: return graphics.getRGB(197, 182, 113); case 5: return graphics.getRGB(141, 197, 113); case 6: return graphics.getRGB(109, 109, 109); } break; case 4: // Ship switch (room->tilecol) { case 0: return graphics.getRGB(0, 206, 39); case 1: return graphics.getRGB(0, 165, 206); case 2: return graphics.getRGB(194, 206, 0); case 3: return graphics.getRGB(206, 0, 160); case 4: return graphics.getRGB(27, 67, 255); case 5: return graphics.getRGB(206, 5, 0); } break; } // Uh, I guess return solid white return graphics.getRGB(255, 255, 255); } // This version detects the room automatically SDL_Color customlevelclass::getonewaycol(void) { if (game.gamestate == EDITORMODE) { return getonewaycol(ed.levx, ed.levy); } else if (map.custommode) { return getonewaycol(game.roomx - 100, game.roomy - 100); } // Uh, I guess return solid white return graphics.getRGB(255, 255, 255); } static SDL_INLINE bool inbounds(const CustomEntity* entity) { extern customlevelclass cl; return entity->x >= 0 && entity->y >= 0 && entity->x < cl.mapwidth * SCREEN_WIDTH_TILES && entity->y < cl.mapheight * SCREEN_HEIGHT_TILES; } int customlevelclass::numtrinkets(void) { int temp = 0; for (size_t i = 0; i < customentities.size(); i++) { if (customentities[i].t == 9 && inbounds(&customentities[i])) { temp++; } } return temp; } int customlevelclass::numcrewmates(void) { int temp = 0; for (size_t i = 0; i < customentities.size(); i++) { if (customentities[i].t == 15 && inbounds(&customentities[i])) { temp++; } } return temp; } ================================================ FILE: desktop_version/src/CustomLevels.h ================================================ #ifndef CUSTOMLEVELS_H #define CUSTOMLEVELS_H #include #include #include class CustomEntity { public: int rx, ry; int x, y, t; //parameters int p1, p2, p3, p4, p5, p6; std::string scriptname; }; #define ROOM_PROPERTIES \ FOREACH_PROP(tileset, int) \ FOREACH_PROP(tilecol, int) \ FOREACH_PROP(roomname, std::string) \ FOREACH_PROP(warpdir, int) \ FOREACH_PROP(platx1, int) \ FOREACH_PROP(platy1, int) \ FOREACH_PROP(platx2, int) \ FOREACH_PROP(platy2, int) \ FOREACH_PROP(platv, int) \ FOREACH_PROP(enemyx1, int) \ FOREACH_PROP(enemyy1, int) \ FOREACH_PROP(enemyx2, int) \ FOREACH_PROP(enemyy2, int) \ FOREACH_PROP(enemytype, int) \ FOREACH_PROP(enemyv, int) \ FOREACH_PROP(directmode, int) class RoomProperty { public: RoomProperty(void); #define FOREACH_PROP(NAME, TYPE) TYPE NAME; ROOM_PROPERTIES #undef FOREACH_PROP }; 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; /* true if a system "Untitled Level"/"Unknown" * was stored in this struct (for the levels list) */ bool title_is_gettext; bool creator_is_gettext; /* This is for the metadata in the levels list, * so it will only be a main font (no custom ones). */ uint8_t level_main_font_idx; bool rtl; }; struct CliPlaytestArgs { int x; int y; int rx; int ry; int gc; int music; bool valid; }; extern std::vector customentities; class customlevelclass { public: customlevelclass(void); std::string title; std::string creator; std::string modifier; std::string Desc1; std::string Desc2; std::string Desc3; std::string website; std::vector ListOfMetaData; void loadZips(void); void getDirectoryData(void); bool getLevelMetaDataAndPlaytestArgs(const std::string& filename, LevelMetaData& _data, CliPlaytestArgs* pt_args); bool getLevelMetaData(const std::string& filename, LevelMetaData& _data); void reset(void); const int* loadlevel(int rxi, int ryi); int gettileidx( const int rx, const int ry, const int x, const int y ); void settile( const int rx, const int ry, const int x, const int y, const int t ); int gettile( const int rx, const int ry, const int x, const int y ); int getabstile(const int x, const int y); int getroompropidx(const int rx, const int ry); const RoomProperty* getroomprop(const int rx, const int ry); #define FOREACH_PROP(NAME, TYPE) \ void setroom##NAME(const int rx, const int ry, const TYPE NAME); ROOM_PROPERTIES #undef FOREACH_PROP int absfree(int x, int y); bool load(std::string _path); bool save(const std::string& _path); void generatecustomminimap(void); int findtrinket(int t); int findcrewmate(int t); int findwarptoken(int t); void findstartpoint(void); int getlevelcol(const int tileset, const int tilecol); int getenemycol(int t); //Colouring stuff int getwarpbackground(int rx, int ry); static const int maxwidth = 20, maxheight = 20; //Special; the physical max the engine allows static const int numrooms = maxwidth * maxheight; int contents[40 * 30 * numrooms]; int numtrinkets(void); int numcrewmates(void); RoomProperty roomproperties[numrooms]; //Maxwidth*maxheight int levmusic; int mapwidth, mapheight; //Actual width and height of stage std::string level_font_name; bool rtl; int version; SDL_Color getonewaycol(int rx, int ry); SDL_Color getonewaycol(void); bool onewaycol_override; int player_colour; }; bool translate_title(const std::string& title); bool translate_creator(const std::string& creator); #ifndef CL_DEFINITION extern customlevelclass cl; #endif #endif /* CUSTOMLEVELS_H */ ================================================ FILE: desktop_version/src/DeferCallbacks.c ================================================ #include "DeferCallbacks.h" #include /* Callbacks to be deferred to the end of each sequence of gamestate functions * in main. Useful for fixing frame-flicker glitches when doing a state * transition in a function that gets executed before the render function. * * We store a linked list of callbacks, to allow for the possibility of having * more than one callback active at a time (otherwise we could easily just * have a single pointer here and the header would only be 1 line and an * include guard) and to do it without having to allocate memory at runtime. */ static struct DEFER_Callback* head = NULL; /* Add a callback. Don't call this directly; use the DEFER_CALLBACK macro. */ void DEFER_add_callback(struct DEFER_Callback* callback) { struct DEFER_Callback* node; /* Are we adding the first node? */ if (head == NULL) { head = callback; return; } /* Time to walk the linked list */ node = head; if (node == callback) { goto fail; } while (node->next != NULL) { node = node->next; if (node == callback) { goto fail; } } /* We're at the end */ node->next = callback; /* Success! */ return; fail: /* Having multiple instances of a callback isn't well-defined * and is a bit complicated to reason about */ SDL_assert(0 && "Duplicate callback added!"); } /* Call each callback in the list, along with deleting the entire list. */ void DEFER_execute_callbacks(void) { struct DEFER_Callback* node = head; struct DEFER_Callback* next; head = NULL; if (node == NULL) { return; } next = node->next; node->func(); node->next = NULL; while (next != NULL) { node = next; next = node->next; node->func(); node->next = NULL; } } ================================================ FILE: desktop_version/src/DeferCallbacks.h ================================================ #ifndef DEFERCALLBACKS_H #define DEFERCALLBACKS_H #ifdef __cplusplus extern "C" { #endif struct DEFER_Callback { void (*func)(void); struct DEFER_Callback* next; }; void DEFER_add_callback(struct DEFER_Callback* callback); void DEFER_execute_callbacks(void); #define DEFER_CALLBACK(FUNC) \ do \ { \ static struct DEFER_Callback callback = {FUNC, NULL}; \ \ DEFER_add_callback(&callback); \ } while (0) #ifdef __cplusplus } /* extern "C" */ #endif #endif /* DEFERCALLBACKS_H */ ================================================ FILE: desktop_version/src/Editor.cpp ================================================ #define ED_DEFINITION #include "Editor.h" #include #include #include "Constants.h" #include "CustomLevels.h" #include "DeferCallbacks.h" #include "Entity.h" #include "Enums.h" #include "Font.h" #include "Game.h" #include "Graphics.h" #include "GraphicsUtil.h" #include "KeyPoll.h" #include "Localization.h" #include "Map.h" #include "Maths.h" #include "Music.h" #include "Screen.h" #include "Script.h" #include "UTF8.h" #include "UtilityClass.h" #include "VFormat.h" #include "Vlogging.h" #define SCRIPT_LINE_PADDING 6 editorclass::editorclass(void) { reset(); register_tool(EditorTool_WALLS, "Walls", "1", SDLK_1, false); register_tool(EditorTool_BACKING, "Backing", "2", SDLK_2, false); register_tool(EditorTool_SPIKES, "Spikes", "3", SDLK_3, false); register_tool(EditorTool_TRINKETS, "Trinkets", "4", SDLK_4, false); register_tool(EditorTool_CHECKPOINTS, "Checkpoints", "5", SDLK_5, false); register_tool(EditorTool_DISAPPEARING_PLATFORMS, "Disappearing Platforms", "6", SDLK_6, false); register_tool(EditorTool_CONVEYORS, "Conveyors", "7", SDLK_7, false); register_tool(EditorTool_MOVING_PLATFORMS, "Moving Platforms", "8", SDLK_8, false); register_tool(EditorTool_ENEMIES, "Enemies", "9", SDLK_9, false); register_tool(EditorTool_GRAVITY_LINES, "Gravity Lines", "0", SDLK_0, false); register_tool(EditorTool_ROOMTEXT, "Roomtext", "R", SDLK_r, false); register_tool(EditorTool_TERMINALS, "Terminals", "T", SDLK_t, false); register_tool(EditorTool_SCRIPTS, "Script Boxes", "Y", SDLK_y, false); register_tool(EditorTool_WARP_TOKENS, "Warp Tokens", "U", SDLK_u, false); register_tool(EditorTool_WARP_LINES, "Warp Lines", "I", SDLK_i, false); register_tool(EditorTool_CREWMATES, "Crewmates", "O", SDLK_o, false); register_tool(EditorTool_START_POINT, "Start Point", "P", SDLK_p, false); static const short basic[] = { 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 80, 80, 80, 120, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 80, 80, 80, 120, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 80, 80, 80, 120, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 82, 82, 82, 82, 82, 82, 82, 0, 82, 82, 82, 82, 81, 81, 81, 42, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 80, 80, 80, 120, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 121, 121, 121, 160, 121, 121, 121, 121, 80, 80, 80, 120, 121, 162, 121, 162, 121, 162, 121, 161, 121, 162, 121, 162, 121, 162, 121, 161, 121, 162, 121, 162, 121, 162, 121, 161, 121, 162, 121, 162, 80, 0, 80, 2, 121, 162, 121, 162, 121, 162, 121, 161, 121, 162, 121, 162, 121, 162, 121, 161, 82, 122, 82, 122, 82, 122, 82, 1, 82, 122, 82, 122, 81, 41, 81, 0 }; std::vector basic_vec; basic_vec.assign(basic, basic + SDL_arraysize(basic)); autotile_types["basic"] = basic_vec; static const short lab_cyan[] = { 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 26, 162, 26, 162, 25, 161, 25, 106, 26, 162, 26, 162, 25, 161, 25, 106, 82, 122, 82, 186, 81, 0, 81, 0, 82, 122, 82, 122, 66, 0, 66, 0, 26, 162, 26, 162, 25, 161, 25, 106, 26, 162, 26, 162, 25, 161, 25, 106, 82, 186, 82, 186, 65, 0, 65, 0, 82, 186, 82, 186, 81, 199, 81, 42, 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 26, 162, 26, 162, 25, 105, 25, 161, 26, 162, 26, 162, 25, 105, 25, 161, 82, 146, 82, 146, 81, 0, 81, 64, 82, 146, 82, 146, 66, 0, 66, 2, 26, 162, 26, 162, 25, 105, 25, 161, 26, 162, 26, 162, 25, 105, 25, 161, 82, 122, 82, 122, 65, 0, 65, 1, 82, 122, 82, 122, 81, 41, 81, 0 }; std::vector lab_cyan_vec; lab_cyan_vec.assign(lab_cyan, lab_cyan + SDL_arraysize(lab_cyan)); autotile_types["lab_cyan"] = lab_cyan_vec; static const short lab_red[] = { 121, 190, 121, 190, 30, 160, 30, 160, 121, 190, 121, 190, 30, 160, 30, 160, 110, 150, 110, 150, 80, 120, 80, 151, 110, 150, 110, 150, 80, 191, 80, 120, 121, 190, 121, 190, 30, 160, 30, 160, 121, 190, 121, 190, 30, 160, 30, 160, 110, 150, 110, 150, 80, 120, 80, 151, 110, 150, 110, 150, 80, 191, 80, 120, 32, 162, 32, 162, 31, 161, 31, 112, 32, 162, 32, 162, 31, 161, 31, 112, 82, 122, 82, 122, 81, 0, 81, 0, 82, 122, 82, 122, 72, 0, 81, 0, 32, 162, 32, 162, 31, 161, 31, 112, 32, 162, 32, 162, 31, 161, 31, 112, 82, 192, 82, 192, 71, 0, 71, 0, 82, 192, 82, 192, 81, 70, 81, 42, 121, 190, 121, 190, 30, 160, 30, 160, 121, 190, 121, 190, 30, 160, 30, 160, 110, 150, 110, 150, 80, 120, 80, 151, 110, 150, 110, 150, 80, 191, 80, 120, 121, 190, 121, 190, 30, 160, 30, 160, 121, 190, 121, 190, 30, 160, 30, 160, 110, 150, 110, 150, 80, 120, 121, 151, 110, 150, 110, 150, 80, 191, 80, 120, 32, 162, 32, 162, 31, 111, 31, 161, 32, 162, 32, 162, 31, 111, 31, 161, 82, 152, 82, 152, 81, 0, 81, 76, 82, 152, 82, 152, 72, 0, 72, 2, 32, 162, 32, 162, 31, 111, 31, 161, 32, 162, 32, 162, 31, 111, 31, 161, 82, 122, 82, 122, 71, 156, 71, 1, 82, 122, 82, 122, 81, 41, 81, 0 }; std::vector lab_red_vec; lab_red_vec.assign(lab_red, lab_red + SDL_arraysize(lab_red)); autotile_types["lab_red"] = lab_red_vec; static const short lab_pink[] = { 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 26, 162, 26, 162, 25, 161, 25, 106, 26, 162, 26, 162, 25, 161, 25, 106, 82, 122, 82, 122, 81, 0, 81, 0, 82, 122, 82, 122, 66, 0, 66, 0, 26, 162, 26, 162, 25, 161, 25, 106, 26, 162, 26, 162, 25, 161, 25, 106, 82, 186, 82, 186, 65, 0, 65, 0, 82, 122, 82, 122, 81, 64, 81, 42, 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 121, 184, 121, 184, 24, 160, 24, 160, 121, 184, 121, 184, 24, 160, 24, 160, 104, 144, 104, 144, 80, 120, 80, 145, 104, 144, 104, 144, 80, 185, 80, 120, 26, 162, 26, 162, 25, 105, 25, 161, 26, 162, 26, 162, 25, 105, 25, 161, 82, 146, 82, 146, 81, 0, 81, 113, 82, 146, 82, 146, 66, 0, 66, 2, 26, 162, 26, 162, 25, 105, 25, 161, 26, 162, 26, 162, 25, 105, 25, 161, 82, 122, 82, 122, 65, 0, 65, 1, 82, 122, 82, 122, 81, 41, 81, 0 }; std::vector lab_pink_vec; lab_pink_vec.assign(lab_pink, lab_pink + SDL_arraysize(lab_pink)); autotile_types["lab_pink"] = lab_pink_vec; static const short lab_yellow[] = { 121, 175, 121, 175, 15, 160, 15, 160, 121, 175, 121, 175, 15, 160, 15, 160, 95, 135, 95, 135, 80, 120, 80, 136, 95, 135, 95, 135, 80, 176, 80, 120, 121, 175, 121, 175, 15, 160, 15, 160, 121, 175, 121, 175, 15, 160, 15, 160, 95, 135, 95, 135, 80, 120, 80, 136, 95, 135, 95, 135, 80, 176, 80, 120, 17, 162, 17, 162, 16, 161, 16, 97, 17, 162, 17, 162, 16, 161, 16, 97, 82, 122, 82, 122, 81, 0, 81, 0, 82, 122, 82, 122, 57, 0, 57, 0, 17, 162, 17, 162, 16, 161, 16, 97, 17, 162, 17, 162, 16, 161, 16, 97, 82, 177, 82, 177, 56, 0, 56, 0, 82, 177, 82, 177, 81, 55, 81, 42, 121, 175, 121, 175, 15, 160, 15, 160, 121, 175, 121, 175, 15, 160, 15, 160, 95, 135, 95, 135, 80, 120, 80, 136, 95, 135, 95, 135, 80, 176, 80, 120, 121, 175, 121, 175, 15, 160, 15, 160, 121, 175, 121, 175, 15, 160, 15, 160, 95, 135, 95, 135, 80, 120, 80, 136, 95, 135, 95, 135, 80, 176, 80, 120, 17, 162, 17, 162, 16, 96, 16, 161, 17, 162, 17, 162, 16, 96, 16, 161, 82, 137, 82, 137, 81, 0, 81, 27, 82, 137, 82, 137, 57, 0, 57, 2, 17, 162, 17, 162, 16, 162, 16, 161, 17, 162, 17, 162, 16, 96, 16, 161, 82, 122, 82, 122, 56, 0, 82, 1, 82, 122, 82, 122, 81, 41, 81, 0 }; std::vector lab_yellow_vec; lab_yellow_vec.assign(lab_yellow, lab_yellow + SDL_arraysize(lab_yellow)); autotile_types["lab_yellow"] = lab_yellow_vec; static const short lab_green[] = { 121, 181, 121, 181, 21, 160, 21, 160, 121, 181, 121, 181, 21, 160, 21, 160, 101, 141, 101, 141, 80, 120, 80, 142, 101, 141, 101, 141, 80, 182, 80, 120, 121, 181, 121, 181, 21, 160, 21, 160, 121, 181, 121, 181, 21, 160, 21, 160, 101, 141, 101, 141, 80, 120, 80, 142, 101, 141, 101, 141, 80, 182, 80, 120, 23, 162, 23, 162, 22, 161, 22, 103, 23, 162, 23, 162, 22, 161, 22, 103, 82, 122, 82, 122, 81, 0, 81, 0, 82, 122, 82, 122, 63, 0, 63, 0, 23, 162, 23, 162, 22, 161, 22, 103, 23, 162, 23, 162, 22, 161, 22, 103, 82, 183, 82, 183, 62, 0, 62, 0, 82, 183, 82, 183, 81, 61, 81, 42, 121, 181, 121, 181, 21, 160, 21, 160, 121, 181, 121, 181, 21, 160, 21, 160, 101, 141, 101, 141, 80, 120, 80, 142, 101, 141, 101, 141, 80, 182, 80, 120, 121, 181, 121, 181, 21, 160, 21, 160, 121, 181, 121, 181, 21, 160, 21, 160, 101, 141, 101, 141, 80, 120, 80, 142, 101, 141, 101, 141, 80, 182, 80, 120, 23, 162, 23, 162, 22, 102, 22, 161, 23, 162, 23, 162, 22, 102, 22, 161, 82, 143, 82, 143, 81, 0, 81, 0, 82, 143, 82, 143, 63, 0, 63, 2, 23, 162, 23, 162, 22, 102, 22, 161, 23, 162, 23, 162, 22, 102, 22, 161, 82, 122, 82, 122, 62, 0, 62, 1, 82, 122, 82, 122, 81, 41, 81, 0 }; std::vector lab_green_vec; lab_green_vec.assign(lab_green, lab_green + SDL_arraysize(lab_green)); autotile_types["lab_green"] = lab_green_vec; static const short outside[] = { 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 2, 1, 2, 1, 2, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 1, 2, 0, 0, 2, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 1, 2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2, 2, 2, 0, 2, 0, 1, 2, 1, 2, 2, 0, 2, 0, 1, 2, 1, 2, 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; std::vector outside_vec; outside_vec.assign(outside, outside + SDL_arraysize(outside)); autotile_types["outside"] = outside_vec; // Everything gets initialized to 0 by default static const short none[256] = {}; std::vector none_vec; none_vec.assign(none, none + SDL_arraysize(none)); autotile_types["none"] = none_vec; SDL_zeroa(tileset_min_colour); SDL_zeroa(tileset_max_colour); SDL_zeroa(tileset_min_colour_direct); SDL_zeroa(tileset_max_colour_direct); register_tileset(EditorTileset_SPACE_STATION, "Space Station"); register_tileset(EditorTileset_OUTSIDE, "Outside"); register_tileset(EditorTileset_LAB, "Lab"); register_tileset(EditorTileset_WARP_ZONE, "Warp Zone"); register_tileset(EditorTileset_SHIP, "Ship"); register_tilecol(EditorTileset_SPACE_STATION, -1, "basic", 80, "basic", 680); register_tilecol(EditorTileset_SPACE_STATION, 0, "basic", 83, "basic", 680); register_tilecol(EditorTileset_SPACE_STATION, 1, "basic", 86, "basic", 698); register_tilecol(EditorTileset_SPACE_STATION, 2, "basic", 89, "basic", 695); register_tilecol(EditorTileset_SPACE_STATION, 3, "basic", 92, "basic", 683); register_tilecol(EditorTileset_SPACE_STATION, 4, "basic", 95, "basic", 689); register_tilecol(EditorTileset_SPACE_STATION, 5, "basic", 98, "basic", 680); register_tilecol(EditorTileset_SPACE_STATION, 6, "basic", 101, "basic", 695); register_tilecol(EditorTileset_SPACE_STATION, 7, "basic", 104, "basic", 704); register_tilecol(EditorTileset_SPACE_STATION, 8, "basic", 107, "basic", 689); register_tilecol(EditorTileset_SPACE_STATION, 9, "basic", 110, "basic", 686); register_tilecol(EditorTileset_SPACE_STATION, 10, "basic", 113, "basic", 698); register_tilecol(EditorTileset_SPACE_STATION, 11, "basic", 283, "basic", 695); register_tilecol(EditorTileset_SPACE_STATION, 12, "basic", 286, "basic", 686); register_tilecol(EditorTileset_SPACE_STATION, 13, "basic", 289, "basic", 704); register_tilecol(EditorTileset_SPACE_STATION, 14, "basic", 292, "basic", 701); register_tilecol(EditorTileset_SPACE_STATION, 15, "basic", 295, "basic", 698); register_tilecol(EditorTileset_SPACE_STATION, 16, "basic", 298, "basic", 683); register_tilecol(EditorTileset_SPACE_STATION, 17, "basic", 301, "basic", 704); register_tilecol(EditorTileset_SPACE_STATION, 18, "basic", 304, "basic", 701); register_tilecol(EditorTileset_SPACE_STATION, 19, "basic", 307, "basic", 698); register_tilecol(EditorTileset_SPACE_STATION, 20, "basic", 310, "basic", 692); register_tilecol(EditorTileset_SPACE_STATION, 21, "basic", 313, "basic", 686); register_tilecol(EditorTileset_SPACE_STATION, 22, "basic", 483, "basic", 695); register_tilecol(EditorTileset_SPACE_STATION, 23, "basic", 486, "basic", 683); register_tilecol(EditorTileset_SPACE_STATION, 24, "basic", 489, "basic", 689); register_tilecol(EditorTileset_SPACE_STATION, 25, "basic", 492, "basic", 704); register_tilecol(EditorTileset_SPACE_STATION, 26, "basic", 495, "basic", 680); register_tilecol(EditorTileset_SPACE_STATION, 27, "basic", 498, "basic", 695); register_tilecol(EditorTileset_SPACE_STATION, 28, "basic", 501, "basic", 689); register_tilecol(EditorTileset_SPACE_STATION, 29, "basic", 504, "basic", 692); register_tilecol(EditorTileset_SPACE_STATION, 30, "basic", 507, "basic", 689); register_tilecol(EditorTileset_SPACE_STATION, 31, "basic", 510, "basic", 698); register_tilecol(EditorTileset_OUTSIDE, 0, "basic", 480, "outside", 680, false, true); register_tilecol(EditorTileset_OUTSIDE, 1, "basic", 483, "outside", 683, false, true); register_tilecol(EditorTileset_OUTSIDE, 2, "basic", 486, "outside", 686, false, true); register_tilecol(EditorTileset_OUTSIDE, 3, "basic", 489, "outside", 689, false, true); register_tilecol(EditorTileset_OUTSIDE, 4, "basic", 492, "outside", 692, false, true); register_tilecol(EditorTileset_OUTSIDE, 5, "basic", 495, "outside", 695, false, true); register_tilecol(EditorTileset_OUTSIDE, 6, "basic", 498, "outside", 698, false, true); register_tilecol(EditorTileset_OUTSIDE, 7, "basic", 501, "outside", 701, false, true); register_tilecol(EditorTileset_LAB, 0, "lab_cyan", 280, "none", 713); register_tilecol(EditorTileset_LAB, 1, "lab_red", 283, "none", 713); register_tilecol(EditorTileset_LAB, 2, "lab_pink", 286, "none", 713); register_tilecol(EditorTileset_LAB, 3, "basic", 289, "none", 713); register_tilecol(EditorTileset_LAB, 4, "lab_yellow", 292, "none", 713); register_tilecol(EditorTileset_LAB, 5, "lab_green", 295, "none", 713); register_tilecol(EditorTileset_LAB, 6, "none", 0, "none", 713, true); register_tilecol(EditorTileset_WARP_ZONE, 0, "basic", 80, "none", 120); register_tilecol(EditorTileset_WARP_ZONE, 1, "basic", 83, "none", 123); register_tilecol(EditorTileset_WARP_ZONE, 2, "basic", 86, "none", 126); register_tilecol(EditorTileset_WARP_ZONE, 3, "basic", 89, "none", 129); register_tilecol(EditorTileset_WARP_ZONE, 4, "basic", 92, "none", 132); register_tilecol(EditorTileset_WARP_ZONE, 5, "basic", 95, "none", 135); register_tilecol(EditorTileset_WARP_ZONE, 6, "basic", 98, "none", 138); register_tilecol(EditorTileset_SHIP, 0, "basic", 101, "basic", 741); register_tilecol(EditorTileset_SHIP, 1, "basic", 104, "basic", 744); register_tilecol(EditorTileset_SHIP, 2, "basic", 107, "basic", 747); register_tilecol(EditorTileset_SHIP, 3, "basic", 110, "basic", 750); register_tilecol(EditorTileset_SHIP, 4, "basic", 113, "basic", 753); register_tilecol(EditorTileset_SHIP, 5, "basic", 116, "basic", 756); } void editorclass::register_tileset(EditorTilesets tileset, const char* name) { tileset_names[tileset] = name; } void editorclass::register_tilecol( EditorTilesets tileset, const int index, const char* foreground_type, const int foreground_base, const char* background_type, const int background_base, const bool direct, const bool bg_ignores_walls ) { EditorTilecolInfo info; info.foreground_type = foreground_type; info.foreground_base = foreground_base; info.background_type = background_type; info.background_base = background_base; info.direct_mode = direct; info.bg_ignores_walls = bg_ignores_walls; tileset_colors[tileset][index] = info; if (!direct) { tileset_min_colour[tileset] = SDL_min(tileset_min_colour[tileset], index); tileset_max_colour[tileset] = SDL_max(tileset_max_colour[tileset], index); } tileset_min_colour_direct[tileset] = SDL_min(tileset_min_colour_direct[tileset], index); tileset_max_colour_direct[tileset] = SDL_max(tileset_max_colour_direct[tileset], index); } void editorclass::register_tilecol( EditorTilesets tileset, const int index, const char* foreground_type, const int foreground_base, const char* background_type, const int background_base, const bool bg_ignores_walls ) { register_tilecol(tileset, index, foreground_type, foreground_base, background_type, background_base, bg_ignores_walls, false); } void editorclass::register_tilecol( EditorTilesets tileset, const int index, const char* foreground_type, const int foreground_base, const char* background_type, const int background_base ) { register_tilecol(tileset, index, foreground_type, foreground_base, background_type, background_base, false); } void editorclass::reset(void) { current_tool = EditorTool_WALLS; roomnamehide = 0; z_modifier = false; x_modifier = false; c_modifier = false; v_modifier = false; h_modifier = false; b_modifier = false; f_modifier = false; toolbox_open = false; help_open = false; shiftkey = false; saveandquit = false; note = ""; note_timer = 0; old_note_timer = 0; backspace_held = false; current_text_mode = TEXT_NONE; warp_token_entity = -1; text_entity = 0; scripttexttype = 0; direct_mode_tile = 0; direct_mode_drawer = 0; entcol = 0; old_tilex = 0; old_tiley = 0; tilex = 0; tiley = 0; levx = 0; levy = 0; keydelay = 0; lclickdelay = 0; savekey = false; loadkey = false; updatetiles = true; changeroom = true; entframe = 0; entframedelay = 0; SDL_zeroa(kludgewarpdir); script_buffer.clear(); clear_script_buffer(); script_cursor_x = 0; script_cursor_y = 0; script_offset = 0; lines_visible = 25; current_script = "null"; script_list_offset = 0; selected_script = 0; return_message_timer = 0; old_return_message_timer = 0; ghosts.clear(); current_ghosts = 0; loaded_filepath = ""; state = EditorState_DRAW; substate = EditorSubState_MAIN; } void editorclass::show_note(const char* text) { note_timer = 45; note = text; } void editorclass::register_tool(EditorTools tool, const char* name, const char* keychar, const SDL_KeyCode key, const bool shift) { tool_names[tool] = name; tool_key_chars[tool] = keychar; tool_keys[tool] = key; tool_requires_shift[tool] = shift; } void editorclass::load_script_in_editor(const std::string& name) { // Load script t into the script editor clear_script_buffer(); for (size_t i = 0; i < script.customscripts.size(); i++) { if (script.customscripts[i].name == name) { script_buffer = script.customscripts[i].contents; break; } } if (script_buffer.empty()) { // Always have one line or we'll have problems script_buffer.resize(1); } } void editorclass::remove_script(const std::string& name) { for (size_t i = 0; i < script.customscripts.size(); i++) { if (script.customscripts[i].name == name) { script.customscripts.erase(script.customscripts.begin() + i); break; } } } void editorclass::create_script(const std::string& name, const std::vector& contents) { // Add a script. If there's an old one, delete it. remove_script(name); Script script_; script_.name = name; script_.contents = contents; script.customscripts.push_back(script_); } void editorclass::create_script(const std::string& name) { // Add an empty script. Script script_; script_.name = name; script_.contents.resize(1); script.customscripts.push_back(script_); } bool editorclass::script_exists(const std::string& name) { for (size_t i = 0; i < script.customscripts.size(); i++) { if (script.customscripts[i].name == name) { return true; } } return false; } void editorclass::clear_script_buffer(void) { script_buffer.clear(); } void editorclass::remove_line(int t) { //Remove line t from the script if ((int) script_buffer.size() > 1) { script_buffer.erase(script_buffer.begin() + t); } } void editorclass::insert_line(int t) { //insert a blank line into script at line t script_buffer.insert(script_buffer.begin() + t, ""); } static void editormenurender(int tr, int tg, int tb) { extern editorclass ed; switch (game.currentmenuname) { case Menu::ed_settings: font::print(PR_2X | PR_CEN, -1, 75, loc::gettext("Map Settings"), tr, tg, tb); if (game.currentmenuoption == 3) { if (!game.ghostsenabled) font::print(0, 2, 230, loc::gettext("Editor ghost trail is OFF"), tr/2, tg/2, tb/2); else font::print(0, 2, 230, loc::gettext("Editor ghost trail is ON"), tr, tg, tb); } break; case Menu::ed_desc: { const std::string input_text = key.keybuffer + ((ed.entframe < 2) ? "_" : " "); if (ed.current_text_mode == TEXT_TITLE) { font::print(PR_2X | PR_CEN | PR_FONT_LEVEL, -1, 35, input_text, tr, tg, tb); } else { const char* title = cl.title.c_str(); const bool title_is_gettext = translate_title(cl.title); if (title_is_gettext) { title = loc::gettext(title); } font::print(PR_2X | PR_CEN | (title_is_gettext ? PR_FONT_INTERFACE : PR_FONT_LEVEL), -1, 35, title, tr, tg, tb); } bool creator_is_gettext; const char* creator; if (ed.current_text_mode == TEXT_CREATOR) { creator_is_gettext = false; creator = input_text.c_str(); } else { creator_is_gettext = translate_creator(cl.creator); creator = cl.creator.c_str(); } if (creator_is_gettext) { creator = loc::gettext(creator); } int sp = SDL_max(10, font::height(PR_FONT_LEVEL)); graphics.print_level_creator((creator_is_gettext ? PR_FONT_INTERFACE : PR_FONT_LEVEL), 60, creator, tr, tg, tb); font::print(PR_CEN | PR_FONT_LEVEL, -1, 60 + sp, (ed.current_text_mode == TEXT_WEBSITE) ? input_text : cl.website, tr, tg, tb); font::print(PR_CEN | PR_FONT_LEVEL, -1, 60 + sp * 3, (ed.current_text_mode == TEXT_DESC1) ? input_text : cl.Desc1, tr, tg, tb); font::print(PR_CEN | PR_FONT_LEVEL, -1, 60 + sp * 4, (ed.current_text_mode == TEXT_DESC2) ? input_text : cl.Desc2, tr, tg, tb); if (ed.current_text_mode == TEXT_DESC3) { font::print(PR_CEN | PR_FONT_LEVEL, -1, 60 + sp * 5, input_text, tr, tg, tb); } else if (sp <= 10) { font::print(PR_CEN | PR_FONT_LEVEL, -1, 60 + sp * 5, cl.Desc3, tr, tg, tb); } const char* label = loc::gettext("Font: "); int len_label = font::len(0, label); const char* name = font::get_level_font_display_name(); int font_x = 2 + len_label; uint32_t font_flags = PR_FONT_LEVEL; if (font::is_rtl(PR_FONT_INTERFACE)) { font_x = SCREEN_WIDTH_PIXELS - font_x; font_flags |= PR_RIGHT; } font::print(PR_RTL_XFLIP, 2, 230, label, tr / 2, tg / 2, tb / 2); font::print(font_flags, font_x, 230, name, tr / 2, tg / 2, tb / 2); break; } case Menu::ed_music: { font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, 65, loc::gettext("Map Music"), tr, tg, tb); font::print_wrap(PR_CEN | PR_CJK_LOW, -1, 85, loc::gettext("Current map music:"), tr, tg, tb); const char* songname; switch(cl.levmusic) { case 0: songname = loc::gettext("No background music"); break; case Music_PUSHINGONWARDS: songname = loc::gettext("1: Pushing Onwards"); break; case Music_POSITIVEFORCE: songname = loc::gettext("2: Positive Force"); break; case Music_POTENTIALFORANYTHING: songname = loc::gettext("3: Potential for Anything"); break; case Music_PASSIONFOREXPLORING: songname = loc::gettext("4: Passion for Exploring"); break; case Music_PAUSE: songname = loc::gettext("N/A: Pause"); break; case Music_PRESENTINGVVVVVV: songname = loc::gettext("5: Presenting VVVVVV"); break; case Music_PLENARY: songname = loc::gettext("N/A: Plenary"); break; case Music_PREDESTINEDFATE: songname = loc::gettext("6: Predestined Fate"); break; case Music_POSITIVEFORCEREVERSED: songname = loc::gettext("N/A: ecroF evitisoP"); break; case Music_POPULARPOTPOURRI: songname = loc::gettext("7: Popular Potpourri"); break; case Music_PIPEDREAM: songname = loc::gettext("8: Pipe Dream"); break; case Music_PRESSURECOOKER: songname = loc::gettext("9: Pressure Cooker"); break; case Music_PACEDENERGY: songname = loc::gettext("10: Paced Energy"); break; case Music_PIERCINGTHESKY: songname = loc::gettext("11: Piercing the Sky"); break; case Music_PREDESTINEDFATEREMIX: songname = loc::gettext("N/A: Predestined Fate Remix"); break; default: songname = loc::gettext("?: something else"); break; } font::print_wrap(PR_CEN, -1, 120, songname, tr, tg, tb); break; } case Menu::ed_quit: font::print_wrap(PR_CEN, -1, 90, loc::gettext("Save before quitting?"), tr, tg, tb); break; case Menu::ed_font: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Level Font"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Select the language in which the text in this level is written."), tr, tg, tb); const char* label = loc::gettext("Font: "); int len_label = font::len(0, label); const char* name = font::get_level_font_display_name(); int font_x = 2 + len_label; uint32_t font_flags = PR_FONT_LEVEL; if (font::is_rtl(PR_FONT_INTERFACE)) { font_x = SCREEN_WIDTH_PIXELS - font_x; font_flags |= PR_RIGHT; } font::print(PR_RTL_XFLIP, 2, 230, label, tr/2, tg/2, tb/2); font::print(font_flags, font_x, 230, name, tr/2, tg/2, tb/2); break; } default: break; } } static void draw_background_grid(void) { for (int j = 0; j < 30; j++) { for (int i = 0; i < 40; i++) { if (i == 19 || i == 20 || j == 14 || j == 29) { // Major guidelines graphics.draw_rect(i * 8, j * 8, 7, 7, graphics.getRGB(32, 32, 32)); } else if (i == 9 || i == 30 || j == 6 || j == 7 || j == 21 || j == 22) { // Minor guidelines graphics.draw_rect(i * 8, j * 8, 7, 7, graphics.getRGB(24, 24, 24)); } else if (i % 4 == 0 || j % 4 == 0) { graphics.draw_rect(i * 8, j * 8, 7, 7, graphics.getRGB(16, 16, 16)); } else { graphics.draw_rect(i * 8, j * 8, 7, 7, graphics.getRGB(8, 8, 8)); } } } } static void draw_background(int warpdir) { extern editorclass ed; switch (warpdir) { case 1: graphics.rcol = cl.getwarpbackground(ed.levx, ed.levy); graphics.drawbackground(3); break; case 2: graphics.rcol = cl.getwarpbackground(ed.levx, ed.levy); graphics.drawbackground(4); break; case 3: graphics.rcol = cl.getwarpbackground(ed.levx, ed.levy); graphics.drawbackground(5); break; default: break; } } static void draw_edgeguide(const TileTypes type, const int x, const int y, const bool vertical) { static const SDL_Color white = graphics.getRGB(255 - help.glow, 255, 255); static const SDL_Color red = graphics.getRGB(255 - help.glow, 127, 127); if (type != TileType_SOLID && type != TileType_SPIKE) { return; } if (vertical) { graphics.fill_rect(x, y, 8, 2, (type == TileType_SOLID) ? white : red); } else { graphics.fill_rect(x, y, 2, 8, (type == TileType_SOLID) ? white : red); } } static void draw_edgeguides(void) { extern editorclass ed; const int global_x = ed.levx * 40; const int global_y = ed.levy * 30; // Draw edge-guides, so there's no room misalignments! for (int i = 0; i < 40; i++) { if (i < 30) { // Left edge draw_edgeguide(ed.get_abs_tile_type(global_x - 1, global_y + i, true), 0, i * 8, false); // Right edge draw_edgeguide(ed.get_abs_tile_type(global_x + 40, global_y + i, true), 318, i * 8, false); } // Top edge draw_edgeguide(ed.get_abs_tile_type(global_x + i, global_y - 1, true), i * 8, 0, true); // Bottom edge draw_edgeguide(ed.get_abs_tile_type(global_x + i, global_y + 30, true), i * 8, 238, true); } static const SDL_Color green = graphics.getRGB(127, 255 - help.glow, 127); // Horizontal gravity line edge-guides for (size_t i = 0; i < customentities.size(); ++i) { const CustomEntity* entity = &customentities[i]; const bool is_horizontal_gravity_line = entity->t == 11 && entity->p1 == 0; if (!is_horizontal_gravity_line) { continue; } const int x = entity->p2 * 8; const int w = entity->p3; if (entity->ry != ed.levy) { continue; } if (entity->rx == POS_MOD(ed.levx - 1, cl.mapwidth) // It's to the left... && x + w >= SCREEN_WIDTH_PIXELS - 8) { // And touching the right edge! graphics.fill_rect(0, entity->y * 8, 2, 8, green); } else if (entity->rx == POS_MOD(ed.levx + 1, cl.mapwidth) // It's to the right... && x <= 0) { // And touching the left edge! graphics.fill_rect(SCREEN_WIDTH_PIXELS - 2, entity->y * 8, 2, 8, green); } } } static void update_entities(void) { extern editorclass ed; for (size_t i = 0; i < customentities.size(); ++i) { CustomEntity* entity = &customentities[i]; if (entity->rx != ed.levx || entity->ry != ed.levy) { // It's not in this room, so just continue continue; } bool grav_line = (entity->t == 11); bool warp_line = (entity->t == 50); if ((grav_line || warp_line) && entity->p4 != 1) { // If it's a grav line or a warp line, and it's not locked if ((grav_line && entity->p1 == 0) || (warp_line && entity->p1 >= 2)) { /* Horizontal */ int tx = entity->x; int tx2 = tx; int ty = entity->y; while (ed.lines_can_pass(tx, ty)) { --tx; } while (ed.lines_can_pass(tx2, ty)) { ++tx2; } ++tx; entity->p2 = tx; entity->p3 = (tx2 - tx) * 8; } else { /* Vertical */ int tx = entity->x; int ty = entity->y; int ty2 = ty; while (ed.lines_can_pass(tx, ty)) { --ty; } while (ed.lines_can_pass(tx, ty2)) { ++ty2; } ++ty; entity->p2 = ty; entity->p3 = (ty2 - ty) * 8; } } } } static void draw_entities(void) { extern editorclass ed; const RoomProperty* const room = cl.getroomprop(ed.levx, ed.levy); //Draw entities obj.customplatformtile = game.customcol * 12; const int edent_under_cursor = ed.get_entity_at(ed.levx, ed.levy, ed.tilex, ed.tiley); // Special case for drawing gray entities bool custom_gray = room->tileset == 3 && room->tilecol == 6; // Draw entities backward to remain accurate with ingame for (int i = customentities.size() - 1; i >= 0; i--) { CustomEntity* entity = &customentities[i]; // If the entity is in the current room, draw it if (entity->rx == ed.levx && entity->ry == ed.levy) { const int x = entity->x * 8; const int y = entity->y * 8; static const char arrows[] = "V^<>"; switch (entity->t) { case 1: // Enemies { const int movement = entity->p1; if (custom_gray) { ed.entcolreal = graphics.getcol(18); } graphics.draw_sprite(x, y, ed.get_enemy_tile(room->enemytype), ed.entcolreal); if (movement >= 0 && movement < 4) { // If they have a basic movement type, draw an arrow to indicate direction font::print(PR_FONT_8X8, x + 4, y + 4, std::string(1, arrows[movement]), 255, 255, 255 - help.glow); } graphics.draw_rect(x, y, 16, 16, graphics.getRGB(255, 164, 255)); break; } case 2: // Conveyors & Platforms { const int movement = entity->p1; const short length = (movement == 7 || movement == 8) ? 8 : 4; const short glow = 255 - help.glow; for (int j = 0; j < length; j++) { graphics.draw_grid_tile(custom_gray ? graphics.grphx.im_entcolours_tint : graphics.grphx.im_entcolours, obj.customplatformtile, x + (j * 8), y, 8, 8); } switch (movement) { case 0: case 1: case 2: case 3: // If they have a basic movement type, draw an arrow to indicate direction font::print(PR_FONT_8X8, x + 12, y, std::string(1, arrows[movement]), glow, glow, glow); break; case 4: // Always move right, stopping when hitting collision font::print(PR_FONT_8X8, x + 8, y, ">I", glow, glow, glow); break; case 5: font::print(PR_FONT_8X8, x, y, ">>>>", glow, glow, glow); break; case 6: font::print(PR_FONT_8X8, x, y, "<<<<", glow, glow, glow); break; case 7: font::print(PR_FONT_8X8, x + 4, y, "> > > > ", glow, glow, glow); break; case 8: font::print(PR_FONT_8X8, x + 4, y, "< < < < ", glow, glow, glow); break; } if (movement < 0) { // Well, it's a negative type, so it'll just be still. font::print(PR_FONT_8X8, x + 8, y, "[]", glow, glow, glow); } else if (movement > 8) { // Invalid... draw a scary red X font::print(PR_FONT_8X8, x + 12, y, "X", glow, 0, 0); } graphics.draw_rect(x, y, 8 * length, 8, graphics.getRGB(255, 255, 255)); break; } case 3: // Disappearing Platforms for (int j = 0; j < 4; j++) { graphics.draw_grid_tile(custom_gray ? graphics.grphx.im_entcolours_tint : graphics.grphx.im_entcolours, obj.customplatformtile, x + (j * 8), y, 8, 8); } font::print(PR_FONT_8X8, x, y, "////", 255 - help.glow, 255 - help.glow, 255 - help.glow); graphics.draw_rect(x, y, 32, 8, graphics.getRGB(255, 255, 255)); break; case 9: // Shiny Trinkets graphics.draw_sprite(x, y, 22, 196, 196, 196); graphics.draw_rect(x, y, 16, 16, graphics.getRGB(255, 164, 164)); break; case 10: // Checkpoints graphics.draw_sprite(x, y, 20 + entity->p1, 196, 196, 196); graphics.draw_rect(x, y, 16, 16, graphics.getRGB(255, 164, 164)); break; case 11: // Gravity Lines // p2 is in tiles, and p3 is in pixels if (entity->p1 == 0) { // Horizontal gravity line const int left = entity->p2 * 8; const int width = entity->p3; graphics.fill_rect(left, y + 4, width, 1, graphics.getRGB(194, 194, 194)); } else { // Vertical gravity line const int top = entity->p2 * 8; const int height = entity->p3; graphics.fill_rect(x + 3, top, 1, height, graphics.getRGB(194, 194, 194)); } graphics.draw_rect(x, y, 8, 8, graphics.getRGB(164, 255, 164)); break; case 13: // Warp Tokens { std::string text; graphics.draw_sprite(x, y, 18 + (ed.entframe % 2), 196, 196, 196); graphics.draw_rect(x, y, 16, 16, graphics.getRGB(255, 164, 164)); if (i == edent_under_cursor) { text = "(" + help.String(entity->p1 / 40 + 1) + "," + help.String(entity->p2 / 30 + 1) + ")"; } else { text = help.String(cl.findwarptoken(i)); } font::print(PR_BOR | PR_CJK_HIGH, x, y - 8, text, 210, 210, 255); break; } case 15: // Crewmates graphics.draw_sprite(x - 4, y, 144, graphics.crewcolourreal(entity->p1)); graphics.draw_rect(x, y, 16, 24, graphics.getRGB(164, 164, 164)); break; case 16: // Start Point { const short labelcol = ed.entframe < 2 ? 255 : 196; if (entity->p1 == 0) // Facing right { graphics.draw_sprite(x - 4, y, 0, graphics.getcol(cl.player_colour)); } else // Non-zero is facing left { graphics.draw_sprite(x - 4, y, 3, graphics.getcol(cl.player_colour)); } graphics.draw_rect(x, y, 16, 24, graphics.getRGB(255, 255, 164)); font::print(PR_BOR | PR_CEN | PR_CJK_HIGH, x + 8, y - 8, loc::gettext("START"), labelcol, labelcol, labelcol); break; } case 17: // Roomtext { int width = 8; int height = 8; if (entity->scriptname.length() > 0) { width = font::len(PR_FONT_LEVEL, entity->scriptname.c_str()); height = font::height(PR_FONT_LEVEL); } int rect_x = x; if (entity->p1) { // RTL. The 8 is the size of a tile, not font width! rect_x -= width - 8; } graphics.draw_rect(rect_x, y, width, height, graphics.getRGB(96, 96, 96)); graphics.print_roomtext(x, y, entity->scriptname.c_str(), entity->p1); break; } case 18: // Terminals { int sprite = entity->p1; int corrected_y = y; // Not a boolean: just swapping 0 and 1, leaving the rest alone if (sprite == 0) { sprite = 1; // Unflipped } else if (sprite == 1) { sprite = 0; // Flipped; corrected_y -= 8; } graphics.draw_sprite(x, corrected_y + 8, sprite + 16, 96, 96, 96); graphics.draw_rect(x, y, 16, 24, graphics.getRGB(164, 164, 164)); if (i == edent_under_cursor) { font::print(PR_FONT_LEVEL | PR_BOR | PR_CJK_HIGH, x, y - 8, entity->scriptname, 210, 210, 255); } break; } case 19: // Script Triggers graphics.draw_rect(x, y, entity->p1 * 8, entity->p2 * 8, graphics.getRGB(255, 164, 255)); graphics.draw_rect(x, y, 8, 8, graphics.getRGB(255, 255, 255)); if (i == edent_under_cursor) { font::print(PR_FONT_LEVEL | PR_BOR | PR_CJK_HIGH, x, y - 8, entity->scriptname, 210, 210, 255); } break; case 50: // Warp Lines if (entity->p1 >= 2) // Horizontal { int left = entity->p2; int right = left + entity->p3 / 8; graphics.draw_rect((left * 8), y + 1, (right - left) * 8, 6, graphics.getRGB(194, 255, 255)); graphics.draw_rect(x, y, 8, 8, graphics.getRGB(164, 255, 255)); } else // Vertical { int top = entity->p2; int bottom = top + entity->p3 / 8; graphics.draw_rect(x + 1, (top * 8), 6, (bottom - top) * 8, graphics.getRGB(194, 255, 255)); graphics.draw_rect(x, y, 8, 8, graphics.getRGB(164, 255, 255)); } break; } } // Need to also check warp point destinations if (entity->t == 13 && ed.warp_token_entity != i && entity->p1 / 40 == ed.levx && entity->p2 / 30 == ed.levy) { const int x = entity->p1 % 40 * 8; const int y = entity->p2 % 30 * 8; std::string text; graphics.draw_sprite(x, y, 18 + (ed.entframe % 2), 64, 64, 64); graphics.draw_rect((entity->p1 * 8) - (ed.levx * 40 * 8), (entity->p2 * 8) - (ed.levy * 30 * 8), 16, 16, graphics.getRGB(96, 64, 64)); if (ed.tilex == x / 8 && ed.tiley == y / 8) { text = "(" + help.String(entity->rx + 1) + "," + help.String(entity->ry + 1) + ")"; } else { text = help.String(cl.findwarptoken(i)); } font::print(PR_BOR | PR_CJK_HIGH, x, y - 8, text, 190, 190, 225); } } } static void draw_ghosts(void) { extern editorclass ed; //Draw ghosts (spooky!) if (game.ghostsenabled) { graphics.set_render_target(graphics.ghostTexture); graphics.set_blendmode(graphics.ghostTexture, SDL_BLENDMODE_BLEND); graphics.clear(0, 0, 0, 0); for (int i = 0; i < (int) ed.ghosts.size(); i++) { if (i <= ed.current_ghosts) { // We don't want all of them to show up at once :) if (ed.ghosts[i].rx != ed.levx || ed.ghosts[i].ry != ed.levy) continue; SDL_Color ct = ed.ghosts[i].realcol; const int alpha = 3 * ct.a / 4; ct.a = (Uint8)alpha; graphics.draw_sprite(ed.ghosts[i].x, ed.ghosts[i].y, ed.ghosts[i].frame, ct); } } graphics.set_render_target(graphics.gameTexture); graphics.set_texture_alpha_mod(graphics.ghostTexture, 128); graphics.copy_texture(graphics.ghostTexture, NULL, NULL); } } static void adjust_box_coordinates(int x1, int y1, int x2, int y2, int* left, int* right, int* top, int* bottom) { if (x1 < x2 + 8) { *right = x2 + 8; *left = x1; } else { *right = x1 + 8; *left = x2; } if (y1 < y2 + 8) { *bottom = y2 + 8; *top = y1; } else { *bottom = y1 + 8; *top = y2; } } static void draw_bounds(void) { extern editorclass ed; const RoomProperty* const room = cl.getroomprop(ed.levx, ed.levy); // Draw boundaries if (room->enemyx1 != 0 || room->enemyy1 != 0 || room->enemyx2 != 320 || room->enemyy2 != 240) { graphics.draw_rect(room->enemyx1, room->enemyy1, room->enemyx2 - room->enemyx1, room->enemyy2 - room->enemyy1, graphics.getRGB(255 - (help.glow / 2), 64, 64)); } if (room->platx1 != 0 || room->platy1 != 0 || room->platx2 != 320 || room->platy2 != 240) { graphics.draw_rect(room->platx1, room->platy1, room->platx2 - room->platx1, room->platy2 - room->platy1, graphics.getRGB(64, 64, 255 - (help.glow / 2))); } if (ed.substate == EditorSubState_DRAW_BOX) { if (ed.box_corner == BoxCorner_FIRST) { graphics.draw_rect(ed.tilex * 8, ed.tiley * 8, 8, 8, graphics.getRGB(210 + help.glow / 2, 191 + help.glow, 255 - help.glow / 2)); graphics.draw_rect((ed.tilex * 8) + 2, (ed.tiley * 8) + 2, 4, 4, graphics.getRGB(105 + help.glow / 4, 100 + help.glow / 2, 128 - help.glow / 4)); } else { int left; int right; int top; int bottom; adjust_box_coordinates(ed.box_point.x, ed.box_point.y, ed.tilex * 8, ed.tiley * 8, &left, &right, &top, &bottom); graphics.draw_rect(left, top, right - left, bottom - top, graphics.getRGB(210 + help.glow / 2, 191 + help.glow, 255 - help.glow / 2)); graphics.draw_rect(left + 2, top + 2, (right - left) - 4, (bottom - top) - 4, graphics.getRGB(105 + help.glow / 4, 100 + help.glow / 2, 128 - help.glow / 4)); } } } static inline bool check_point(bool connected[SCREEN_HEIGHT_TILES][SCREEN_WIDTH_TILES], int x, int y) { if (x < 0 || x >= SCREEN_WIDTH_TILES || y < 0 || y >= SCREEN_HEIGHT_TILES) { return false; } return connected[y][x]; } static void draw_cursor(void) { extern editorclass ed; static const SDL_Color blue = graphics.getRGB(32, 32, 200); const int x = ed.tilex * 8; const int y = ed.tiley * 8; if (ed.substate == EditorSubState_DRAW_BOX) { // Just draw a 1x1 cursor, overriding everything else graphics.draw_rect(x, y, 8, 8, blue); return; } switch (ed.current_tool) { case EditorTool_WALLS: case EditorTool_BACKING: // Modifiers! if (ed.f_modifier) { bool connected[SCREEN_HEIGHT_TILES][SCREEN_WIDTH_TILES]; SDL_zeroa(connected); ed.get_tile_fill(ed.tilex, ed.tiley, cl.gettile(ed.levx, ed.levy, ed.tilex, ed.tiley), connected); graphics.set_color(blue); for (int i = 0; i < SCREEN_WIDTH_TILES * SCREEN_HEIGHT_TILES; i++) { const int x = i % SCREEN_WIDTH_TILES; const int y = i / SCREEN_WIDTH_TILES; if (!connected[y][x]) continue; bool top_left = true; bool top_right = true; bool bottom_left = true; bool bottom_right = true; if (!check_point(connected, x - 1, y)) { top_left = false; bottom_left = false; SDL_RenderDrawLine(gameScreen.m_renderer, x * 8, y * 8, x * 8, y * 8 + 7); } if (!check_point(connected, x + 1, y)) { top_right = false; bottom_right = false; SDL_RenderDrawLine(gameScreen.m_renderer, x * 8 + 7, y * 8, x * 8 + 7, y * 8 + 7); } if (!check_point(connected, x, y - 1)) { top_left = false; top_right = false; SDL_RenderDrawLine(gameScreen.m_renderer, x * 8, y * 8, x * 8 + 7, y * 8); } if (!check_point(connected, x, y + 1)) { bottom_left = false; bottom_right = false; SDL_RenderDrawLine(gameScreen.m_renderer, x * 8, y * 8 + 7, x * 8 + 7, y * 8 + 7); } if (!check_point(connected, x - 1, y - 1) && top_left) SDL_RenderDrawPoint(gameScreen.m_renderer, x * 8, y * 8); if (!check_point(connected, x - 1, y + 1) && top_right) SDL_RenderDrawPoint(gameScreen.m_renderer, x * 8, y * 8 + 7); if (!check_point(connected, x + 1, y - 1) && bottom_left) SDL_RenderDrawPoint(gameScreen.m_renderer, x * 8 + 7, y * 8); if (!check_point(connected, x + 1, y + 1) && bottom_right) SDL_RenderDrawPoint(gameScreen.m_renderer, x * 8 + 7, y * 8 + 7); } } else if (ed.b_modifier) graphics.draw_rect(x, 0, 8, 240, blue); // Vertical else if (ed.h_modifier) graphics.draw_rect(0, y, 320, 8, blue); // Horizontal else if (ed.v_modifier) graphics.draw_rect(x - 32, y - 32, 24 + 48, 24 + 48, blue); // 9x9 else if (ed.c_modifier) graphics.draw_rect(x - 24, y - 24, 24 + 32, 24 + 32, blue); // 7x7 else if (ed.x_modifier) graphics.draw_rect(x - 16, y - 16, 24 + 16, 24 + 16, blue); // 5x5 else if (ed.z_modifier) graphics.draw_rect(x - 8, y - 8, 24, 24, blue); // 3x3 SDL_FALLTHROUGH; case EditorTool_SPIKES: case EditorTool_GRAVITY_LINES: case EditorTool_ROOMTEXT: case EditorTool_SCRIPTS: // 1x1 graphics.draw_rect(x, y, 8, 8, blue); break; case EditorTool_TRINKETS: case EditorTool_CHECKPOINTS: case EditorTool_ENEMIES: case EditorTool_WARP_TOKENS: // 2x2 graphics.draw_rect(x, y, 16, 16, blue); break; case EditorTool_DISAPPEARING_PLATFORMS: case EditorTool_CONVEYORS: case EditorTool_MOVING_PLATFORMS: // 1x4 (platforms) graphics.draw_rect(x, y, 32, 8, blue); break; case EditorTool_WARP_LINES: // 1x1, but X if not on an edge (warp lines) if (ed.tilex == 0 || ed.tilex == 39 || ed.tiley == 0 || ed.tiley == 29) { graphics.draw_rect(x, y, 8, 8, blue); } else { font::print(PR_FONT_8X8, x, y, "X", 255, 0, 0); } break; case EditorTool_TERMINALS: case EditorTool_CREWMATES: case EditorTool_START_POINT: // 2x3 graphics.draw_rect(x, y, 16, 24, blue); break; default: break; } } static void draw_tile_drawer(int tileset) { extern editorclass ed; // Tile drawer for direct mode int t2 = 0; if (ed.direct_mode_drawer > 0) { if (ed.direct_mode_drawer <= 4) { t2 = graphics.lerp((4 - ed.direct_mode_drawer + 1) * 12, (4 - ed.direct_mode_drawer) * 12); } // Draw five lines of the editor const int temp = ed.direct_mode_tile - (ed.direct_mode_tile % 40) - 80; graphics.fill_rect(0, -t2, 320, 40, graphics.getRGB(0, 0, 0)); graphics.fill_rect(0, -t2 + 40, 320, 2, graphics.getRGB(255, 255, 255)); int texturewidth; int textureheight; if (graphics.query_texture(graphics.grphx.im_tiles, NULL, NULL, &texturewidth, &textureheight) != 0) { return; } const int numtiles = (int)(texturewidth / 8) * (textureheight / 8); for (int x = 0; x < SCREEN_WIDTH_TILES; x++) { for (int y = 0; y < 5; y++) { if (tileset == 0) { graphics.drawtile(x * 8, (y * 8) - t2, (temp + numtiles + (y * SCREEN_WIDTH_TILES) + x) % numtiles); } else { graphics.drawtile2(x * 8, (y * 8) - t2, (temp + numtiles + (y * SCREEN_WIDTH_TILES) + x) % numtiles); } } } // Highlight our little block graphics.draw_rect(((ed.direct_mode_tile % SCREEN_WIDTH_TILES) * 8) - 2, 16 - t2 - 2, 12, 12, graphics.getRGB(255 - help.glow, 196, 196)); graphics.draw_rect(((ed.direct_mode_tile % SCREEN_WIDTH_TILES) * 8) - 1, 16 - t2 - 1, 10, 10, graphics.getRGB(0, 0, 0)); } if (ed.direct_mode_drawer > 0 && t2 <= 30) { short labellen = 2 + font::len(0, loc::gettext("Tile:")); font::print(PR_BOR, 2, 45 - t2, loc::gettext("Tile:"), 196, 196, 255 - help.glow); font::print(PR_BOR, labellen + 16, 45 - t2, help.String(ed.direct_mode_tile), 196, 196, 255 - help.glow); graphics.fill_rect(labellen + 2, 44 - t2, 10, 10, graphics.getRGB(255 - help.glow, 196, 196)); graphics.fill_rect(labellen + 3, 45 - t2, 8, 8, graphics.getRGB(0, 0, 0)); if (tileset == 0) { graphics.drawtile(labellen + 3, 45 - t2, ed.direct_mode_tile); } else { graphics.drawtile2(labellen + 3, 45 - t2, ed.direct_mode_tile); } } else { short labellen = 2 + font::len(0, loc::gettext("Tile:")); int y = 2 + font::height(0); y = SDL_max(y, 12); font::print(PR_BOR, 2, y, loc::gettext("Tile:"), 196, 196, 255 - help.glow); font::print(PR_BOR, labellen + 16, y, help.String(ed.direct_mode_tile), 196, 196, 255 - help.glow); graphics.fill_rect(labellen + 2, y - 1, 10, 10, graphics.getRGB(255 - help.glow, 196, 196)); graphics.fill_rect(labellen + 3, y, 8, 8, graphics.getRGB(0, 0, 0)); if (tileset == 0) { graphics.drawtile(labellen + 3, 12, ed.direct_mode_tile); } else { graphics.drawtile2(labellen + 3, 12, ed.direct_mode_tile); } } } static void draw_box_placer() { extern editorclass ed; std::string message; if (ed.box_corner == BoxCorner_FIRST) { switch (ed.box_type) { case BoxType_SCRIPT: message = loc::gettext("SCRIPT BOX: Click on the first corner"); break; case BoxType_ENEMY: message = loc::gettext("ENEMY BOUNDS: Click on the first corner"); break; case BoxType_PLATFORM: message = loc::gettext("PLATFORM BOUNDS: Click on the first corner"); break; default: message = loc::gettext("Click on the first corner"); break; } } else if (ed.box_corner == BoxCorner_LAST) { switch (ed.box_type) { case BoxType_SCRIPT: message = loc::gettext("SCRIPT BOX: Click on the last corner"); break; case BoxType_ENEMY: message = loc::gettext("ENEMY BOUNDS: Click on the last corner"); break; case BoxType_PLATFORM: message = loc::gettext("PLATFORM BOUNDS: Click on the last corner"); break; default: message = loc::gettext("Click on the last corner"); break; } } short lines; message = font::string_wordwrap(0, message, 312, &lines); short textheight = font::height(0) * lines; graphics.fill_rect(0, 238 - textheight, 320, 240, graphics.getRGB(32, 32, 32)); graphics.fill_rect(0, 239 - textheight, 320, 240, graphics.getRGB(0, 0, 0)); font::print_wrap(PR_RTL_XFLIP, 4, 240 - textheight, message.c_str(), 255, 255, 255, 8, 312); } static void draw_note() { extern editorclass ed; if (ed.note_timer > 0 || ed.old_note_timer > 0) { short lines; std::string wrapped = font::string_wordwrap(0, ed.note, 304, &lines); short textheight = 8 + (lines - 1) * SDL_max(10, font::height(0)); short banner_y = 120 - textheight / 2 - 5; float alpha = graphics.lerp(ed.old_note_timer, ed.note_timer); graphics.fill_rect(0, banner_y, 320, 10 + textheight, graphics.getRGB(92, 92, 92)); graphics.fill_rect(0, banner_y + 1, 320, 8 + textheight, graphics.getRGB(0, 0, 0)); font::print_wrap(PR_CEN, -1, banner_y + 5, wrapped.c_str(), 196 - ((45.0f - alpha) * 4), 196 - ((45.0f - alpha) * 4), 196 - ((45.0f - alpha) * 4)); } } static void draw_toolbox(const char* coords) { extern editorclass ed; // Draw the toolbox background graphics.fill_rect(0, 207, 320, 240, graphics.getRGB(32, 32, 32)); graphics.fill_rect(0, 208, 320, 240, graphics.getRGB(0, 0, 0)); // Draw all tools! const int tool_gap = 32; const int page = ed.current_tool / 10; const int max_pages = SDL_ceil(NUM_EditorTools / 10); const int page_tool_count = SDL_min(10, NUM_EditorTools - (page * 10)); for (int i = 0; i < page_tool_count; i++) { const int current_tool_id = i + (page * 10); // First, draw the background graphics.fill_rect(4 + (i * tool_gap), 208, 20, 20, graphics.getRGB(32, 32, 32)); // Draw the actual tool icon ed.draw_tool((EditorTools)current_tool_id, 4 + (i * tool_gap) + 2, 208 + 2); // Draw the tool outline... graphics.draw_rect(4 + (i * tool_gap), 208, 20, 20, (current_tool_id == ed.current_tool) ? graphics.getRGB(200, 200, 200) : graphics.getRGB(96, 96, 96)); // ...and the hotkey const int col = current_tool_id == ed.current_tool ? 255 : 164; font::print(PR_FONT_8X8 | PR_BOR, 22 + i * tool_gap - 4, 224 - 4, ed.tool_key_chars[current_tool_id], col, col, col); } // Draw the page number, limit is 1 digit, so the max is 9 pages char buffer[4]; SDL_snprintf(buffer, sizeof(buffer), "%d/%d", page + 1, max_pages + 1); font::print(PR_CJK_HIGH, 4, 232, buffer, 196, 196, 255 - help.glow); // Draw the button hint text char changetooltext[SCREEN_WIDTH_CHARS + 1]; vformat_buf(changetooltext, sizeof(changetooltext), loc::gettext("{button1} and {button2} keys change tool"), "button1:str, button2:str", ",", "." ); font::print(PR_CJK_HIGH | PR_RIGHT, 320, 232, changetooltext, 196, 196, 255 - help.glow); // Draw the current tool name char toolname_english[SCREEN_WIDTH_CHARS + 1]; SDL_snprintf(toolname_english, sizeof(toolname_english), "%s: %s", ed.tool_key_chars[ed.current_tool], ed.tool_names[ed.current_tool]); const char* toolname = loc::gettext(toolname_english); int bgheight = 2 + font::height(0); int toolnamelen = font::len(0, toolname); graphics.fill_rect(0, 206 - bgheight, toolnamelen + 8, bgheight + 1, graphics.getRGB(32, 32, 32)); graphics.fill_rect(0, 207 - bgheight, toolnamelen + 7, bgheight, graphics.getRGB(0, 0, 0)); font::print(PR_BOR | PR_CJK_HIGH, 2, 198, toolname, 196, 196, 255 - help.glow); // And finally, draw the current room's coordinates int coordslen = font::len(0, coords); graphics.fill_rect(319 - coordslen - 8, 206 - bgheight, coordslen + 8, bgheight + 1, graphics.getRGB(32, 32, 32)); graphics.fill_rect(320 - coordslen - 8, 207 - bgheight, coordslen + 8, bgheight, graphics.getRGB(0, 0, 0)); font::print(PR_BOR | PR_CJK_HIGH | PR_RIGHT, 316, 198, coords, 196, 196, 255 - help.glow); } static void draw_main_ui(void) { extern editorclass ed; const RoomProperty* const room = cl.getroomprop(ed.levx, ed.levy); char coords[8]; SDL_snprintf(coords, sizeof(coords), "(%d,%d)", ed.levx + 1, ed.levy + 1); if (ed.toolbox_open) { draw_toolbox(coords); } else { if (room->roomname != "") { int font_height = font::height(PR_FONT_LEVEL); if (font_height <= 8) { graphics.footerrect.h = font_height + 2; } else { graphics.footerrect.h = font_height + 1; } graphics.footerrect.y = 240 - graphics.footerrect.h + ed.roomnamehide; graphics.set_blendmode(SDL_BLENDMODE_BLEND); graphics.fill_rect(&graphics.footerrect, graphics.getRGBA(0, 0, 0, graphics.translucentroomname ? 127 : 255)); graphics.set_blendmode(SDL_BLENDMODE_NONE); font::print(PR_CEN | PR_BOR | PR_FONT_LEVEL | PR_CJK_LOW, -1, graphics.footerrect.y + 1 + ed.roomnamehide, room->roomname, 196, 196, 255 - help.glow); font::print(PR_BOR | PR_CJK_HIGH, 4, 232 - graphics.footerrect.h, loc::gettext("SPACE ^ SHIFT ^"), 196, 196, 255 - help.glow); font::print(PR_BOR | PR_CJK_HIGH | PR_RIGHT, 316, 232 - graphics.footerrect.h, coords, 196, 196, 255 - help.glow); } else { font::print(PR_BOR | PR_CJK_HIGH, 4, 232, loc::gettext("SPACE ^ SHIFT ^"), 196, 196, 255 - help.glow); font::print(PR_BOR | PR_CJK_HIGH | PR_RIGHT, 316, 232, coords, 196, 196, 255 - help.glow); } } if (ed.help_open) { const char* shiftmenuoptions[] = { loc::gettext("F1: Change Tileset"), loc::gettext("F2: Change Colour"), loc::gettext("F3: Change Enemies"), loc::gettext("F4: Enemy Bounds"), loc::gettext("F5: Platform Bounds"), "", loc::gettext("F9: Reload Resources"), loc::gettext("F10: Direct Mode"), "", loc::gettext("W: Change Warp Dir"), loc::gettext("E: Change Roomname"), }; int menuwidth = 0; for (size_t i = 0; i < SDL_arraysize(shiftmenuoptions); i++) { int len = font::len(0, shiftmenuoptions[i]); if (len > menuwidth) menuwidth = len; } int lineheight = font::height(0); lineheight = SDL_max(10, lineheight); int left_y = 230 - SDL_arraysize(shiftmenuoptions) * lineheight; graphics.draw_rect(0, left_y - 3, menuwidth + 17, 240, graphics.getRGB(64, 64, 64)); graphics.fill_rect(0, left_y - 2, menuwidth + 16, 240, graphics.getRGB(0, 0, 0)); for (size_t i = 0; i < SDL_arraysize(shiftmenuoptions); i++) font::print(0, 4, left_y + i * lineheight, shiftmenuoptions[i], 164, 164, 164); graphics.draw_rect(220, 207, 100, 60, graphics.getRGB(64, 64, 64)); graphics.fill_rect(221, 208, 160, 60, graphics.getRGB(0, 0, 0)); font::print(0, 224, 210, loc::gettext("S: Save Map"), 164, 164, 164); font::print(0, 224, 210 + lineheight, loc::gettext("L: Load Map"), 164, 164, 164); } } void editorclass::draw_tool(EditorTools tool, int x, int y) { switch (tool) { case EditorTool_WALLS: graphics.drawtile(x, y, 83); graphics.drawtile(x + 8, y, 83); graphics.drawtile(x, y + 8, 83); graphics.drawtile(x + 8, y + 8, 83); break; case EditorTool_BACKING: graphics.drawtile(x, y, 680); graphics.drawtile(x + 8, y, 680); graphics.drawtile(x, y + 8, 680); graphics.drawtile(x + 8, y + 8, 680); break; case EditorTool_SPIKES: graphics.drawtile(x + 4, y + 4, 8); break; case EditorTool_TRINKETS: graphics.draw_sprite(x, y, 22, 196, 196, 196); break; case EditorTool_CHECKPOINTS: graphics.draw_sprite(x, y, 21, 196, 196, 196); break; case EditorTool_DISAPPEARING_PLATFORMS: graphics.drawtile(x, y + 4, 3); graphics.drawtile(x + 8, y + 4, 4); break; case EditorTool_CONVEYORS: graphics.drawtile(x, y + 4, 24); graphics.drawtile(x + 8, y + 4, 24); break; case EditorTool_MOVING_PLATFORMS: graphics.drawtile(x, y + 4, 1); graphics.drawtile(x + 8, y + 4, 1); break; case EditorTool_ENEMIES: graphics.draw_sprite(x, y, 78 + entframe, 196, 196, 196); break; case EditorTool_GRAVITY_LINES: graphics.fill_rect(x + 2, y + 8, 12, 1, graphics.getRGB(255, 255, 255)); break; case EditorTool_ROOMTEXT: font::print(PR_FONT_8X8, x + 1, y, "AB", 196, 196, 255 - help.glow); font::print(PR_FONT_8X8, x + 1, y + 9, "CD", 196, 196, 255 - help.glow); break; case EditorTool_TERMINALS: graphics.draw_sprite(x, y, 17, 196, 196, 196); break; case EditorTool_SCRIPTS: graphics.draw_rect(x + 4, y + 4, 8, 8, graphics.getRGB(96, 96, 96)); break; case EditorTool_WARP_TOKENS: graphics.draw_sprite(x, y, 18 + (entframe % 2), 196, 196, 196); break; case EditorTool_WARP_LINES: graphics.fill_rect(x + 6, y + 2, 4, 12, graphics.getRGB(255, 255, 255)); break; case EditorTool_CREWMATES: graphics.draw_sprite(x, y, 186, graphics.col_crewblue); break; case EditorTool_START_POINT: graphics.draw_sprite(x, y, 184, graphics.col_crewcyan); break; default: break; } } void editorrender(void) { extern editorclass ed; const RoomProperty* const room = cl.getroomprop(ed.levx, ed.levy); graphics.clear(); switch (ed.state) { case EditorState_DRAW: // Draw the editor guidelines draw_background_grid(); // Draw the background, if any, over the guidelines draw_background(room->warpdir); graphics.drawmap(); draw_edgeguides(); draw_entities(); draw_ghosts(); draw_bounds(); if (room->directmode == 1) { draw_tile_drawer(room->tileset); } draw_cursor(); switch (ed.substate) { case EditorSubState_MAIN: { draw_main_ui(); // Draw the current tool name char toolname_english[SCREEN_WIDTH_CHARS + 1]; SDL_snprintf(toolname_english, sizeof(toolname_english), "%s: %s", ed.tool_key_chars[ed.current_tool], ed.tool_names[ed.current_tool]); const char* toolname = loc::gettext(toolname_english); font::print(PR_BOR, 2, 2, toolname, 196, 196, 255 - help.glow); break; } case EditorSubState_DRAW_BOX: draw_box_placer(); break; case EditorSubState_DRAW_INPUT: { short lines; std::string wrapped = font::string_wordwrap(0, loc::gettext(ed.current_text_desc.c_str()), 312, &lines); short textheight = font::height(0) * lines + font::height(PR_FONT_LEVEL); graphics.fill_rect(0, 238 - textheight, 320, 240, graphics.getRGB(32, 32, 32)); graphics.fill_rect(0, 239 - textheight, 320, 240, graphics.getRGB(0, 0, 0)); font::print_wrap(PR_RTL_XFLIP, 4, 240 - textheight, wrapped.c_str(), 255, 255, 255, 8, 312); std::string input = key.keybuffer; if (ed.entframe < 2) { input += "_"; } else { input += " "; } font::print(PR_CEN | PR_FONT_LEVEL | PR_CJK_HIGH, -1, 232, input, 196, 196, 255 - help.glow); break; } case EditorSubState_DRAW_WARPTOKEN: { // Placing warp token int textheight = font::height(0); graphics.fill_rect(0, 237 - textheight * 2, 320, 240, graphics.getRGB(32, 32, 32)); graphics.fill_rect(0, 238 - textheight * 2, 320, 240, graphics.getRGB(0, 0, 0)); font::print(PR_CJK_LOW | PR_RTL_XFLIP, 4, 240 - textheight * 2, loc::gettext("Left click to place warp destination"), 196, 196, 255 - help.glow); font::print(PR_CJK_LOW | PR_RTL_XFLIP, 4, 240 - textheight, loc::gettext("Right click to cancel"), 196, 196, 255 - help.glow); break; } default: break; } break; case EditorState_SCRIPTS: // Intended to look like Commodore 64's UI graphics.fill_rect(0, 0, 320, 240, graphics.getRGB(123, 111, 218)); graphics.fill_rect(14, 16, 292, 208, graphics.getRGB(61, 48, 162)); switch (ed.substate) { case EditorSubState_MAIN: font::print(PR_CEN, -1, 28, loc::gettext("**** VVVVVV SCRIPT EDITOR ****"), 123, 111, 218); font::print(PR_CEN, -1, 44, loc::gettext("PRESS ESC TO RETURN TO MENU"), 123, 111, 218); if (script.customscripts.empty()) { font::print(PR_CEN, -1, 110, loc::gettext("NO SCRIPT IDS FOUND"), 123, 111, 218); font::print_wrap(PR_CEN, -1, 130, loc::gettext("CREATE A SCRIPT WITH EITHER THE TERMINAL OR SCRIPT BOX TOOLS"), 123, 111, 218, 10, 288); break; } for (int i = 0; i < 9; i++) { const int offset = ed.script_list_offset + i; const bool draw = offset < (int) script.customscripts.size(); if (!draw) { continue; } if (offset == ed.selected_script) { std::string text_upper(loc::toupper(script.customscripts[script.customscripts.size() - 1 - offset].name)); char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select.c_str(), "label:str", text_upper.c_str()); font::print(PR_CEN, -1, 68 + (i * 16), buffer, 123, 111, 218); } else { font::print(PR_CEN, -1, 68 + (i * 16), script.customscripts[script.customscripts.size() - 1 - offset].name, 123, 111, 218); } } break; case EditorSubState_SCRIPTS_EDIT: { // Draw the current script's name graphics.fill_rect(14, 226, 292, 12, graphics.getRGB(61, 48, 162)); char namebuffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( namebuffer, sizeof(namebuffer), loc::gettext("CURRENT SCRIPT: {name}"), "name:str", ed.current_script.c_str() ); font::print(PR_CEN, -1, 228, namebuffer, 123, 111, 218); // Draw text int font_height = font::height(PR_FONT_LEVEL); for (int i = 0; i < ed.lines_visible; i++) { if (i + ed.script_offset < (int) ed.script_buffer.size()) { font::print(PR_FONT_LEVEL | PR_CJK_LOW, 16, 20 + (i * font_height), ed.script_buffer[i + ed.script_offset], 123, 111, 218); } } // Draw cursor if (ed.entframe < 2) { font::print(PR_FONT_LEVEL | PR_CJK_LOW, 16 + font::len(PR_FONT_LEVEL, ed.script_buffer[ed.script_cursor_y].c_str()), 20 + ((ed.script_cursor_y - ed.script_offset) * font_height), "_", 123, 111, 218); } break; } default: break; } break; case EditorState_MENU: { if (!game.colourblindmode) { graphics.drawtowerbackground(graphics.titlebg); } else { graphics.clear(); } int tr = SDL_clamp(graphics.titlebg.r - (help.glow / 4) - int(fRandom() * 4), 0, 255); int tg = SDL_clamp(graphics.titlebg.g - (help.glow / 4) - int(fRandom() * 4), 0, 255); int tb = SDL_clamp(graphics.titlebg.b - (help.glow / 4) - int(fRandom() * 4), 0, 255); editormenurender(tr, tg, tb); graphics.drawmenu(tr, tg, tb, game.currentmenuname); break; } default: break; } draw_note(); graphics.drawfade(); graphics.render(); } void editorrenderfixed(void) { extern editorclass ed; const RoomProperty* const room = cl.getroomprop(ed.levx, ed.levy); graphics.updatetitlecolours(); graphics.trinketcolset = false; game.customcol = cl.getlevelcol(room->tileset, room->tilecol) + 1; ed.entcol = cl.getenemycol(game.customcol); ed.entcolreal = graphics.getcol(ed.entcol); if (game.ghostsenabled) { for (size_t i = 0; i < ed.ghosts.size(); i++) { GhostInfo* ghost = &ed.ghosts[i]; if ((int) i > ed.current_ghosts || ghost->rx != ed.levx || ghost->ry != ed.levy) { continue; } ghost->realcol = graphics.getcol(ghost->col); } ed.current_ghosts++; if (ed.z_modifier) { ed.current_ghosts++; } ed.current_ghosts = SDL_min(ed.current_ghosts, ed.ghosts.size()); } switch (ed.state) { case EditorState_DRAW: switch (room->warpdir) { case 1: graphics.rcol = cl.getwarpbackground(ed.levx, ed.levy); graphics.updatebackground(3); break; case 2: graphics.rcol = cl.getwarpbackground(ed.levx, ed.levy); graphics.updatebackground(4); break; case 3: graphics.rcol = cl.getwarpbackground(ed.levx, ed.levy); graphics.updatebackground(5); break; default: break; } break; case EditorState_MENU: graphics.titlebg.bypos -= 2; graphics.titlebg.bscroll = -2; graphics.updatetowerbackground(graphics.titlebg); break; default: break; } if (cl.getroomprop(ed.levx, ed.levy)->directmode == 1) { if (ed.direct_mode_drawer > 0) { ed.direct_mode_drawer--; } } else { ed.direct_mode_drawer = 0; } if (cl.getroomprop(ed.levx, ed.levy)->roomname != "") { if (ed.tiley < 28) { if (ed.roomnamehide > 0) { ed.roomnamehide--; } } else { if (ed.roomnamehide < 14) { ed.roomnamehide++; } } } else { if (ed.tiley < 28) { ed.roomnamehide = 0; } else { ed.roomnamehide = 14; } } } static void input_submitted(void) { extern editorclass ed; *ed.current_text_ptr = key.keybuffer; ed.help_open = false; ed.shiftkey = false; bool reset_text_mode = true; key.disabletextentry(); ed.substate = EditorSubState_MAIN; switch (ed.current_text_mode) { case TEXT_GOTOROOM: { char coord_x[16]; char coord_y[16]; const char* comma = SDL_strchr(key.keybuffer.c_str(), ','); bool valid_input = comma != NULL; if (valid_input) { SDL_strlcpy( coord_x, key.keybuffer.c_str(), SDL_min((size_t) (comma - key.keybuffer.c_str() + 1), sizeof(coord_x)) ); SDL_strlcpy(coord_y, &comma[1], sizeof(coord_y)); valid_input = is_number(coord_x) && is_number(coord_y); } if (!valid_input) { ed.show_note(loc::gettext("ERROR: Invalid format")); break; } ed.levx = SDL_clamp(help.Int(coord_x) - 1, 0, cl.mapwidth - 1); ed.levy = SDL_clamp(help.Int(coord_y) - 1, 0, cl.mapheight - 1); graphics.foregrounddrawn = false; graphics.backgrounddrawn = false; break; } case TEXT_LOAD: { std::string loadstring = ed.filename + ".vvvvvv"; if (cl.load(loadstring)) { // don't use filename, it has the full path char buffer[3 * SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::gettext("Loaded map: {filename}.vvvvvv"), "filename:str", ed.filename.c_str()); ed.show_note(buffer); } else { ed.show_note(loc::gettext("ERROR: Could not load level")); } graphics.foregrounddrawn = false; graphics.backgrounddrawn = false; ed.substate = EditorSubState_MAIN; break; } case TEXT_SAVE: { std::string savestring = ed.filename + ".vvvvvv"; if (cl.save(savestring)) { char buffer[3 * SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::gettext("Saved map: {filename}.vvvvvv"), "filename:str", ed.filename.c_str()); ed.show_note(buffer); } else { ed.show_note(loc::gettext("ERROR: Could not save level!")); ed.saveandquit = false; } ed.note_timer = 45; if (ed.saveandquit) { graphics.fademode = FADE_START_FADEOUT; /* quit editor */ } break; } case TEXT_SCRIPT: ed.clear_script_buffer(); if (!ed.script_exists(key.keybuffer)) { ed.create_script(key.keybuffer); } break; case TEXT_TITLE: cl.title = key.keybuffer; if (cl.title == "") { cl.title = "Untitled Level"; } break; case TEXT_CREATOR: cl.creator = key.keybuffer; if (cl.creator == "") { cl.creator = "Unknown"; } break; case TEXT_WEBSITE: cl.website = key.keybuffer; break; case TEXT_DESC1: cl.Desc1 = key.keybuffer; ed.current_text_mode = TEXT_DESC2; ed.substate = EditorSubState_MENU_INPUT; reset_text_mode = false; key.enabletextentry(); ed.current_text_ptr = &(key.keybuffer); key.keybuffer = cl.Desc2; break; case TEXT_DESC2: cl.Desc2 = key.keybuffer; if (font::height(PR_FONT_LEVEL) <= 10) { ed.current_text_mode = TEXT_DESC3; key.enabletextentry(); ed.substate = EditorSubState_MENU_INPUT; reset_text_mode = false; ed.current_text_ptr = &(key.keybuffer); key.keybuffer = cl.Desc3; } else { cl.Desc3 = ""; } break; case TEXT_DESC3: cl.Desc3 = key.keybuffer; break; default: break; } if (reset_text_mode) { ed.current_text_mode = TEXT_NONE; } } void editorlogic(void) { extern editorclass ed; //Misc help.updateglow(); ed.entframedelay--; if (ed.entframedelay <= 0) { ed.entframe = (ed.entframe + 1) % 4; ed.entframedelay = 8; } ed.old_note_timer = ed.note_timer; ed.note_timer = SDL_max(ed.note_timer - 1, 0); update_entities(); if (graphics.fademode == FADE_FULLY_BLACK) { //Return to game graphics.titlebg.colstate = 10; map.nexttowercolour(); game.quittomenu(); music.play(Music_PRESENTINGVVVVVV); // should be before game.quittomenu() } } void editorclass::add_entity(int rx, int ry, int xp, int yp, int tp, int p1, int p2, int p3, int p4, int p5, int p6) { CustomEntity entity; entity.rx = rx; entity.ry = ry; entity.x = xp; entity.y = yp; entity.t = tp; entity.p1 = p1; entity.p2 = p2; entity.p3 = p3; entity.p4 = p4; entity.p5 = p5; entity.p6 = p6; entity.scriptname = ""; customentities.push_back(entity); } void editorclass::remove_entity(int t) { customentities.erase(customentities.begin() + t); } int editorclass::get_entity_at(int rx, int ry, int xp, int yp) { for (size_t i = 0; i < customentities.size(); i++) { const CustomEntity* entity = &customentities[i]; if (entity->rx == rx && entity->ry == ry && entity->x == xp && entity->y == yp) { return i; } } return -1; } static void set_tile_interpolated(const int x1, const int x2, const int y1, const int y2, const int tile) { extern editorclass ed; // draw a line between (x1, y1) and (x2, y2) const int dx = x2 - x1; const int dy = y2 - y1; const int steps = SDL_max(SDL_abs(dx), SDL_abs(dy)); if (steps == 0) { ed.set_tile(x1, y1, tile); return; } for (int i = 0; i <= steps; i++) { const int x = x1 + (dx * i) / steps; const int y = y1 + (dy * i) / steps; ed.set_tile(x, y, tile); } } void editorclass::get_tile_fill(int tilex, int tiley, int tile, bool connected[SCREEN_HEIGHT_TILES][SCREEN_WIDTH_TILES]) { if (tilex < 0 || tilex >= SCREEN_WIDTH_TILES || tiley < 0 || tiley >= SCREEN_HEIGHT_TILES) { // It's out of bounds return; } if (connected[tiley][tilex]) { // We've already visited this tile return; } if (cl.gettile(levx, levy, tilex, tiley) != tile) { // It's not the same tile return; } // Yep, this is connected! connected[tiley][tilex] = true; // Check surrounding 4 tiles get_tile_fill(tilex - 1, tiley, tile, connected); get_tile_fill(tilex + 1, tiley, tile, connected); get_tile_fill(tilex, tiley - 1, tile, connected); get_tile_fill(tilex, tiley + 1, tile, connected); } void editorclass::handle_tile_placement(const int tile) { int range = 1; if (f_modifier) { bool connected[SCREEN_HEIGHT_TILES][SCREEN_WIDTH_TILES]; SDL_zeroa(connected); get_tile_fill(tilex, tiley, cl.gettile(levx, levy, tilex, tiley), connected); for (int i = 0; i < SCREEN_WIDTH_TILES * SCREEN_HEIGHT_TILES; i++) { const int x = i % SCREEN_WIDTH_TILES; const int y = i / SCREEN_WIDTH_TILES; if (connected[y][x]) { set_tile(x, y, tile); } } return; } else if (b_modifier) { // Vertical line for (int i = 0; i < SCREEN_HEIGHT_TILES; i++) { set_tile_interpolated(old_tilex, tilex, i, i, tile); } return; } else if (h_modifier) { // Horizontal line for (int i = 0; i < SCREEN_WIDTH_TILES; i++) { set_tile_interpolated(i, i, old_tiley, tiley, tile); } return; } else if (v_modifier) { range = 4; } else if (c_modifier) { range = 3; } else if (x_modifier) { range = 2; } else if (z_modifier) { range = 1; } else { set_tile_interpolated(old_tilex, tilex, old_tiley, tiley, tile); return; } for (int i = -range; i <= range; i++) { for (int j = -range; j <= range; j++) { set_tile_interpolated(old_tilex + i, tilex + i, old_tiley + j, tiley + j, tile); } } } void editorclass::tool_remove() { switch (current_tool) { case EditorTool_WALLS: case EditorTool_BACKING: handle_tile_placement(0); break; case EditorTool_SPIKES: set_tile_interpolated(old_tilex, tilex, old_tiley, tiley, 0); break; default: break; } for (size_t i = 0; i < customentities.size(); i++) { const CustomEntity* entity = &customentities[i]; if (entity->rx == levx && entity->ry == levy && entity->x == tilex && entity->y == tiley) { remove_entity(i); } } } void editorclass::entity_clicked(const int index) { CustomEntity* entity = &customentities[index]; lclickdelay = 1; switch (entity->t) { case 1: // Enemies entity->p1 = (entity->p1 + 1) % 4; break; case 2: { // Moving Platforms and Conveyors const bool conveyor = entity->p1 >= 5; entity->p1++; if (conveyor) { entity->p1 = (entity->p1 - 5) % 4 + 5; } else { entity->p1 %= 4; } break; } case 10: // Checkpoints // If it's not textured as a checkpoint, then just leave it be if (entity->p1 == 0 || entity->p1 == 1) { entity->p1 = (entity->p1 + 1) % 2; } break; case 11: case 16: // Gravity Lines, Start Point entity->p1 = (entity->p1 + 1) % 2; break; case 15: // Crewmates entity->p1 = (entity->p1 + 1) % 6; break; case 17: // Roomtext get_input_line(TEXT_ROOMTEXT, "Enter roomtext:", &entity->scriptname); text_entity = index; break; case 18: // Terminals if (entity->p1 == 0 || entity->p1 == 1) { // Flip the terminal, but if it's not textured as a terminal leave it alone entity->p1 = (entity->p1 + 1) % 2; } SDL_FALLTHROUGH; case 19: // Script Boxes (and terminals) get_input_line(TEXT_SCRIPT, "Enter script name:", &entity->scriptname); text_entity = index; break; } } void editorclass::tool_place() { const int entity = get_entity_at(levx, levy, tilex, tiley); if (entity != -1) { entity_clicked(entity); return; } switch (current_tool) { case EditorTool_WALLS: case EditorTool_BACKING: { int tile = 0; if (cl.getroomprop(levx, levy)->directmode >= 1) { tile = direct_mode_tile; } else if (current_tool == EditorTool_WALLS) { tile = 1; } else if (current_tool == EditorTool_BACKING) { tile = 2; } handle_tile_placement(tile); break; } case EditorTool_SPIKES: set_tile_interpolated(old_tilex, tilex, old_tiley, tiley, 8); break; case EditorTool_TRINKETS: if (cl.numtrinkets() < 100) { add_entity(levx, levy, tilex, tiley, 9); lclickdelay = 1; } else { show_note(loc::gettext("ERROR: Max number of trinkets is 100")); } break; case EditorTool_CHECKPOINTS: add_entity(levx, levy, tilex, tiley, 10, 1); lclickdelay = 1; break; case EditorTool_DISAPPEARING_PLATFORMS: add_entity(levx, levy, tilex, tiley, 3); lclickdelay = 1; break; case EditorTool_CONVEYORS: add_entity(levx, levy, tilex, tiley, 2, 5); lclickdelay = 1; break; case EditorTool_MOVING_PLATFORMS: add_entity(levx, levy, tilex, tiley, 2, 0); lclickdelay = 1; break; case EditorTool_ENEMIES: add_entity(levx, levy, tilex, tiley, 1, 0); lclickdelay = 1; break; case EditorTool_GRAVITY_LINES: add_entity(levx, levy, tilex, tiley, 11, 0); lclickdelay = 1; break; case EditorTool_ROOMTEXT: lclickdelay = 1; text_entity = customentities.size(); add_entity(levx, levy, tilex, tiley, 17, cl.rtl ? 1 : 0); get_input_line(TEXT_ROOMTEXT, "Enter roomtext:", &(customentities[text_entity].scriptname)); break; case EditorTool_TERMINALS: lclickdelay = 1; text_entity = customentities.size(); add_entity(levx, levy, tilex, tiley, 18, 0); get_input_line(TEXT_SCRIPT, "Enter script name:", &(customentities[text_entity].scriptname)); break; case EditorTool_SCRIPTS: substate = EditorSubState_DRAW_BOX; box_corner = BoxCorner_LAST; box_type = BoxType_SCRIPT; box_point.x = tilex * 8; box_point.y = tiley * 8; lclickdelay = 1; break; case EditorTool_WARP_TOKENS: substate = EditorSubState_DRAW_WARPTOKEN; warp_token_entity = customentities.size(); add_entity(levx, levy, tilex, tiley, 13); lclickdelay = 1; break; case EditorTool_WARP_LINES: //Warp lines if (tilex == 0) { add_entity(levx, levy, tilex, tiley, 50, 0); } else if (tilex == 39) { add_entity(levx, levy, tilex, tiley, 50, 1); } else if (tiley == 0) { add_entity(levx, levy, tilex, tiley, 50, 2); } else if (tiley == 29) { add_entity(levx, levy, tilex, tiley, 50, 3); } else { show_note(loc::gettext("ERROR: Warp lines must be on edges")); } lclickdelay = 1; break; case EditorTool_CREWMATES: if (cl.numcrewmates() < 100) { add_entity(levx, levy, tilex, tiley, 15, int(fRandom() * 6)); lclickdelay = 1; } else { show_note(loc::gettext("ERROR: Max number of crewmates is 100")); } break; case EditorTool_START_POINT: //If there is another start point, destroy it for (size_t i = 0; i < customentities.size(); i++) { if (customentities[i].t == 16) { remove_entity(i); i--; } } add_entity(levx, levy, tilex, tiley, 16, 0); lclickdelay = 1; break; default: break; } } static void creategameoptions(void) { game.createmenu(Menu::options); } static void nextbgcolor(void) { map.nexttowercolour(); } static void editormenuactionpress(void) { extern editorclass ed; switch (game.currentmenuname) { case Menu::ed_desc: switch (game.currentmenuoption) { case 0: { const bool title_is_gettext = translate_title(cl.title); ed.current_text_mode = TEXT_TITLE; ed.substate = EditorSubState_MENU_INPUT; key.enabletextentry(); ed.current_text_ptr = &(key.keybuffer); if (title_is_gettext) { key.keybuffer = ""; } else { key.keybuffer = cl.title; } break; } case 1: { const bool creator_is_gettext = translate_creator(cl.creator); ed.current_text_mode = TEXT_CREATOR; ed.substate = EditorSubState_MENU_INPUT; key.enabletextentry(); ed.current_text_ptr = &(key.keybuffer); if (creator_is_gettext) { key.keybuffer = ""; } else { key.keybuffer = cl.creator; } break; } case 2: ed.current_text_mode = TEXT_DESC1; ed.substate = EditorSubState_MENU_INPUT; key.enabletextentry(); ed.current_text_ptr = &(key.keybuffer); key.keybuffer = cl.Desc1; break; case 3: ed.current_text_mode = TEXT_WEBSITE; ed.substate = EditorSubState_MENU_INPUT; key.enabletextentry(); ed.current_text_ptr = &(key.keybuffer); key.keybuffer=cl.website; break; case 4: game.createmenu(Menu::ed_font); map.nexttowercolour(); break; case 5: game.returnmenu(); map.nexttowercolour(); break; } music.playef(Sound_VIRIDIAN); break; case Menu::ed_settings: switch (game.currentmenuoption) { case 0: //Change level description stuff music.playef(Sound_VIRIDIAN); game.createmenu(Menu::ed_desc); map.nexttowercolour(); break; case 1: //Enter script editormode music.playef(Sound_VIRIDIAN); ed.state = EditorState_SCRIPTS; ed.substate = EditorSubState_MAIN; ed.clear_script_buffer(); key.keybuffer = ""; ed.script_list_offset = 0; ed.selected_script = 0; ed.script_cursor_y = 0; ed.script_cursor_x = 0; ed.script_offset = 0; ed.lines_visible = 200 / font::height(PR_FONT_LEVEL); break; case 2: music.playef(Sound_VIRIDIAN); game.createmenu(Menu::ed_music); map.nexttowercolour(); if(cl.levmusic>0) music.play(cl.levmusic); break; case 3: music.playef(Sound_VIRIDIAN); game.ghostsenabled = !game.ghostsenabled; break; case 4: //Load level map.nexttowercolour(); ed.keydelay = 6; ed.get_input_line(TEXT_LOAD, "Enter map filename to load:", &(ed.filename)); game.mapheld = true; graphics.backgrounddrawn = false; break; case 5: //Save level map.nexttowercolour(); ed.keydelay = 6; ed.get_input_line(TEXT_SAVE, "Enter map filename to save as:", &(ed.filename)); game.mapheld = true; graphics.backgrounddrawn = false; break; case 6: /* Game options */ music.playef(Sound_VIRIDIAN); game.gamestate = TITLEMODE; game.ingame_titlemode = true; game.ingame_editormode = true; DEFER_CALLBACK(creategameoptions); DEFER_CALLBACK(nextbgcolor); break; default: music.playef(Sound_VIRIDIAN); game.createmenu(Menu::ed_quit); map.nexttowercolour(); break; } break; case Menu::ed_music: switch (game.currentmenuoption) { case 0: case 1: switch (game.currentmenuoption) { case 0: cl.levmusic++; break; case 1: cl.levmusic--; break; } cl.levmusic = POS_MOD(cl.levmusic, 16); if (cl.levmusic > 0) { music.play(cl.levmusic); } else { music.haltdasmusik(); } music.playef(Sound_VIRIDIAN); break; case 2: music.playef(Sound_VIRIDIAN); music.fadeout(); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::ed_quit: switch (game.currentmenuoption) { case 0: //Saving and quit ed.saveandquit = true; map.nexttowercolour(); ed.keydelay = 6; ed.get_input_line(TEXT_SAVE, "Enter map filename to save as:", &(ed.filename)); game.mapheld = true; graphics.backgrounddrawn = false; break; case 1: //Quit without saving music.playef(Sound_VIRIDIAN); music.fadeout(); graphics.fademode = FADE_START_FADEOUT; graphics.backgrounddrawn = false; break; case 2: //Go back to editor music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::ed_font: { uint8_t idx_selected = font::font_idx_options[game.currentmenuoption]; cl.level_font_name = font::get_main_font_name(idx_selected); if (idx_selected == loc::get_langmeta()->font_idx) { loc::new_level_font = ""; } else { loc::new_level_font = cl.level_font_name; } font::set_level_font(cl.level_font_name.c_str()); music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; } default: break; } } static void start_at_checkpoint(void) { extern editorclass ed; // Scan the room for a start point or a checkpoint, the start point taking priority int testeditor = -1; bool startpoint = false; for (size_t i = 0; i < customentities.size(); i++) { startpoint = customentities[i].t == 16; const bool is_startpoint_or_checkpoint = startpoint || customentities[i].t == 10; if (!is_startpoint_or_checkpoint) { continue; } const bool in_room = customentities[i].rx == ed.levx && customentities[i].ry == ed.levy; if (!in_room) { continue; } if (startpoint) { // Oh, there's a start point! Let's use this. testeditor = i; break; } else if (testeditor == -1) { // This is the first thing we found, so let's use it (unless we find a start point later) testeditor = i; } } if (testeditor == -1) { ed.show_note(loc::gettext("ERROR: No checkpoint to spawn at")); } else { ed.current_ghosts = 0; game.edsavex = (customentities[testeditor].x) * 8 - 4; game.edsavey = customentities[testeditor].y * 8; game.edsaverx = 100 + customentities[testeditor].rx; game.edsavery = 100 + customentities[testeditor].ry; if (!startpoint) { // Checkpoint spawn if (customentities[testeditor].p1 == 0) // NOT a bool check! { game.edsavegc = 1; game.edsavey -= 2; } else { game.edsavegc = 0; game.edsavey -= 7; } game.edsavedir = 0; } else { // Start point spawn game.edsavegc = 0; game.edsavey++; game.edsavedir = 1 - customentities[testeditor].p1; } music.haltdasmusik(); ed.return_message_timer = 1000; // Let's start it higher than 255 since it gets clamped ed.old_return_message_timer = 1000; script.startgamemode(Start_EDITORPLAYTESTING); } } static void handle_draw_input() { extern editorclass ed; bool shift_down = key.keymap[SDLK_LSHIFT] || key.keymap[SDLK_RSHIFT]; if (shift_down && !ed.shiftkey) { ed.shiftkey = true; ed.help_open = !ed.help_open; } else if (!shift_down) { ed.shiftkey = false; } if (ed.keydelay > 0) { ed.keydelay--; } else { if (key.keymap[SDLK_F1]) { ed.switch_tileset(shift_down); ed.keydelay = 6; } if (key.keymap[SDLK_F2]) { ed.switch_tilecol(shift_down); ed.keydelay = 6; } if (key.keymap[SDLK_F3]) { ed.switch_enemy(shift_down); ed.keydelay = 6; } if (key.keymap[SDLK_F4]) { ed.keydelay = 6; ed.substate = EditorSubState_DRAW_BOX; ed.box_corner = BoxCorner_FIRST; ed.box_type = BoxType_ENEMY; } if (key.keymap[SDLK_F5]) { ed.keydelay = 6; ed.substate = EditorSubState_DRAW_BOX; ed.box_corner = BoxCorner_FIRST; ed.box_type = BoxType_PLATFORM; } if (key.keymap[SDLK_F10]) { if (cl.getroomprop(ed.levx, ed.levy)->directmode == 1) { cl.setroomdirectmode(ed.levx, ed.levy, 0); ed.show_note(loc::gettext("Direct Mode Disabled")); ed.clamp_tilecol(ed.levx, ed.levy, true); } else { cl.setroomdirectmode(ed.levx, ed.levy, 1); ed.show_note(loc::gettext("Direct Mode Enabled")); } graphics.backgrounddrawn = false; ed.updatetiles = true; ed.keydelay = 6; } for (int i = 0; i < NUM_EditorTools; i++) { if (key.keymap[ed.tool_keys[i]] && ((shift_down && ed.tool_requires_shift[i]) || (!shift_down && !ed.tool_requires_shift[i]))) { ed.current_tool = (EditorTools) i; } } if (key.keymap[SDLK_w]) { ed.switch_warpdir(shift_down); ed.keydelay = 6; } if (key.keymap[SDLK_e]) { ed.keydelay = 6; ed.get_input_line(TEXT_ROOMNAME, "Enter new room name:", const_cast(&(cl.getroomprop(ed.levx, ed.levy)->roomname))); game.mapheld = true; } if (key.keymap[SDLK_g]) { ed.keydelay = 6; ed.get_input_line(TEXT_GOTOROOM, "Enter room coordinates x,y:", NULL); game.mapheld = true; } //Save and load if (key.keymap[SDLK_s]) { ed.keydelay = 6; ed.get_input_line(TEXT_SAVE, "Enter map filename to save as:", &(ed.filename)); game.mapheld = true; } if (key.keymap[SDLK_l]) { ed.keydelay = 6; ed.get_input_line(TEXT_LOAD, "Enter map filename to load:", &(ed.filename)); game.mapheld = true; } ed.f_modifier = key.keymap[SDLK_f]; ed.h_modifier = key.keymap[SDLK_h]; ed.v_modifier = key.keymap[SDLK_v]; ed.b_modifier = key.keymap[SDLK_b]; ed.c_modifier = key.keymap[SDLK_c]; ed.x_modifier = key.keymap[SDLK_x]; ed.z_modifier = key.keymap[SDLK_z]; const int room = ed.levx + ed.levy * cl.maxwidth; const int plat_speed = cl.roomproperties[room].platv; const int enemy_speed = cl.roomproperties[room].enemyv; const bool ctrl = key.keymap[SDLK_LCTRL] || key.keymap[SDLK_RCTRL]; const bool shift = key.keymap[SDLK_LSHIFT] || key.keymap[SDLK_RSHIFT]; if (key.keymap[SDLK_COMMA]) { if (ctrl) { if (shift) { cl.roomproperties[room].enemyv = enemy_speed - 1; } else { cl.roomproperties[room].platv = plat_speed - 1; } } else { ed.current_tool = (EditorTools) POS_MOD(ed.current_tool - 1, NUM_EditorTools); } ed.keydelay = 6; } else if (key.keymap[SDLK_PERIOD]) { if (ctrl) { if (shift) { cl.roomproperties[room].enemyv = enemy_speed + 1; } else { cl.roomproperties[room].platv = plat_speed + 1; } } else { ed.current_tool = (EditorTools) POS_MOD(ed.current_tool + 1, NUM_EditorTools); } ed.keydelay = 6; } if (plat_speed != cl.roomproperties[room].platv) { char buffer[3 * SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Platform speed is now {speed}"), "speed:int", cl.roomproperties[room].platv ); ed.show_note(buffer); } if (enemy_speed != cl.roomproperties[room].enemyv) { char buffer[3 * SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Enemy speed is now {speed}"), "speed:int", cl.roomproperties[room].enemyv + 4 ); ed.show_note(buffer); } if (key.keymap[SDLK_SPACE]) { ed.toolbox_open = !ed.toolbox_open; ed.keydelay = 6; } } } void editorclass::get_input_line(const enum TextMode mode, const std::string& prompt, std::string* ptr) { state = EditorState_DRAW; substate = EditorSubState_DRAW_INPUT; current_text_mode = mode; current_text_ptr = ptr; current_text_desc = prompt; key.enabletextentry(); if (ptr) { key.keybuffer = *ptr; } else { key.keybuffer = ""; current_text_ptr = &(key.keybuffer); } old_entity_text = key.keybuffer; } void editorinput(void) { extern editorclass ed; if (graphics.fademode == FADE_FADING_OUT) { return; } ed.old_tilex = ed.tilex; ed.old_tiley = ed.tiley; ed.tilex = key.mousex / 8; ed.tiley = key.mousey / 8; bool up_pressed = key.isDown(SDLK_UP) || key.isDown(SDL_CONTROLLER_BUTTON_DPAD_UP); bool down_pressed = key.isDown(SDLK_DOWN) || key.isDown(SDL_CONTROLLER_BUTTON_DPAD_DOWN); bool left_pressed = key.isDown(SDLK_LEFT) || key.isDown(SDL_CONTROLLER_BUTTON_DPAD_LEFT); bool right_pressed = key.isDown(SDLK_RIGHT) || key.isDown(SDL_CONTROLLER_BUTTON_DPAD_RIGHT); game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; game.press_interact = false; 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(game.controllerButton_flip)) { game.press_action = true; }; if (key.keymap[SDLK_F9] && (ed.keydelay == 0)) { ed.keydelay = 30; ed.show_note(loc::gettext("Reloaded resources")); graphics.reloadresources(); } // Was escape just pressed? bool escape_pressed = false; if (key.isDown(27) && !ed.settingskey) { ed.settingskey = true; escape_pressed = true; } else if (!key.isDown(27)) { ed.settingskey = false; } // What about enter? bool enter_pressed = false; if (key.isDown(KEYBOARD_ENTER) && !game.mapheld) { game.mapheld = true; enter_pressed = true; } else if (!key.isDown(KEYBOARD_ENTER)) { game.mapheld = false; } bool shift_down = key.keymap[SDLK_LSHIFT] || key.keymap[SDLK_RSHIFT]; bool ctrl_down = key.keymap[SDLK_LCTRL] || key.keymap[SDLK_RCTRL]; // Do different things depending on the current state (and substate) switch (ed.state) { // Draw mode, aka placing tiles and entities down case EditorState_DRAW: switch (ed.substate) { case EditorSubState_MAIN: if (escape_pressed) { // We're just in draw mode, so go to the settings menu music.playef(Sound_VIRIDIAN); ed.state = EditorState_MENU; ed.substate = EditorSubState_MAIN; game.createmenu(Menu::ed_settings); } if (ctrl_down) { // Holding ctrl, show the direct mode tile drawer ed.direct_mode_drawer = 10; } if (ed.keydelay > 0) { ed.keydelay--; } else if (up_pressed || down_pressed || left_pressed || right_pressed) { ed.keydelay = 6; if (ctrl_down) { // The direct mode drawer is open, so arrow keys should change what tile you have selected // Also let's make it a little faster ed.keydelay = 3; int texturewidth; int textureheight; bool tiles1 = (cl.getroomprop(ed.levx, ed.levy)->tileset == 0); if (graphics.query_texture(tiles1 ? graphics.grphx.im_tiles : graphics.grphx.im_tiles2, NULL, NULL, &texturewidth, &textureheight) != 0) return; const int numtiles = (int)(texturewidth / 8) * (textureheight / 8); if (left_pressed) ed.direct_mode_tile--; if (right_pressed) ed.direct_mode_tile++; if (up_pressed) ed.direct_mode_tile -= 40; if (down_pressed) ed.direct_mode_tile += 40; ed.direct_mode_tile = POS_MOD(ed.direct_mode_tile, numtiles); } else if (shift_down) { if (up_pressed) cl.mapheight--; if (down_pressed) cl.mapheight++; if (left_pressed) cl.mapwidth--; if (right_pressed) cl.mapwidth++; cl.mapwidth = SDL_clamp(cl.mapwidth, 1, cl.maxwidth); cl.mapheight = SDL_clamp(cl.mapheight, 1, cl.maxheight); ed.updatetiles = true; ed.changeroom = true; graphics.backgrounddrawn = false; graphics.foregrounddrawn = false; ed.levx = POS_MOD(ed.levx, cl.mapwidth); ed.levy = POS_MOD(ed.levy, cl.mapheight); char buffer[3 * SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Mapsize is now [{width},{height}]"), "width:int, height:int", cl.mapwidth, cl.mapheight ); ed.show_note(buffer); } else { ed.updatetiles = true; ed.changeroom = true; graphics.backgrounddrawn = false; graphics.foregrounddrawn = false; if (up_pressed) ed.levy--; if (down_pressed) ed.levy++; if (left_pressed) ed.levx--; if (right_pressed) ed.levx++; ed.levx = POS_MOD(ed.levx, cl.mapwidth); ed.levy = POS_MOD(ed.levy, cl.mapheight); } } else { handle_draw_input(); } // Mouse input if (key.leftbutton && ed.lclickdelay == 0) { ed.tool_place(); } else if (!key.leftbutton) { ed.lclickdelay = 0; } if (key.rightbutton) { ed.tool_remove(); } if (key.middlebutton) { ed.direct_mode_tile = cl.gettile(ed.levx, ed.levy, ed.tilex, ed.tiley); } if (enter_pressed) { start_at_checkpoint(); } break; case EditorSubState_DRAW_BOX: if (escape_pressed) { // Cancel box placement ed.substate = EditorSubState_MAIN; } if (key.leftbutton && ed.lclickdelay == 0) { if (ed.box_corner == BoxCorner_FIRST) { ed.lclickdelay = 1; ed.box_point.x = ed.tilex * 8; ed.box_point.y = ed.tiley * 8; ed.box_corner = BoxCorner_LAST; } else if (ed.box_corner == BoxCorner_LAST) { int left; int right; int top; int bottom; adjust_box_coordinates(ed.box_point.x, ed.box_point.y, ed.tilex * 8, ed.tiley * 8, &left, &right, &top, &bottom); ed.lclickdelay = 1; ed.substate = EditorSubState_MAIN; switch (ed.box_type) { case BoxType_SCRIPT: ed.text_entity = customentities.size(); ed.add_entity(ed.levx, ed.levy, left / 8, top / 8, 19, (right - left) / 8, (bottom - top) / 8); ed.get_input_line(TEXT_SCRIPT, "Enter script name:", &(customentities[ed.text_entity].scriptname)); break; case BoxType_ENEMY: cl.setroomenemyx1(ed.levx, ed.levy, left); cl.setroomenemyy1(ed.levx, ed.levy, top); cl.setroomenemyx2(ed.levx, ed.levy, right); cl.setroomenemyy2(ed.levx, ed.levy, bottom); break; case BoxType_PLATFORM: cl.setroomplatx1(ed.levx, ed.levy, left); cl.setroomplaty1(ed.levx, ed.levy, top); cl.setroomplatx2(ed.levx, ed.levy, right); cl.setroomplaty2(ed.levx, ed.levy, bottom); break; case BoxType_COPY: // Unused break; } } } else if (!key.leftbutton) { ed.lclickdelay = 0; } if (key.rightbutton) { ed.substate = EditorSubState_MAIN; } break; case EditorSubState_DRAW_WARPTOKEN: if (escape_pressed || key.rightbutton) { // Cancel warp token placement ed.substate = EditorSubState_MAIN; ed.remove_entity(ed.warp_token_entity); ed.warp_token_entity = -1; } // Allow the user to change rooms while placing a warp token if (ed.keydelay > 0) { ed.keydelay--; } else if (up_pressed || down_pressed || left_pressed || right_pressed) { ed.keydelay = 6; ed.updatetiles = true; ed.changeroom = true; graphics.backgrounddrawn = false; graphics.foregrounddrawn = false; if (up_pressed) ed.levy--; if (down_pressed) ed.levy++; if (left_pressed) ed.levx--; if (right_pressed) ed.levx++; ed.levx = POS_MOD(ed.levx, cl.mapwidth); ed.levy = POS_MOD(ed.levy, cl.mapheight); } // Left click means place! if (key.leftbutton) { if (ed.lclickdelay == 0) { customentities[ed.warp_token_entity].p1 = ed.tilex + (ed.levx * 40); customentities[ed.warp_token_entity].p2 = ed.tiley + (ed.levy * 30); ed.substate = EditorSubState_MAIN; ed.warp_token_entity = -1; ed.lclickdelay = 1; } } else { ed.lclickdelay = 0; } break; case EditorSubState_DRAW_INPUT: // We're taking input! if (ed.current_text_mode == TEXT_SCRIPT) { // This is editing an entity's text field, currently only used as a script name. // Remove all pipes, they are the line separator in the XML. // When this loop reaches the end, it wraps to SIZE_MAX; SIZE_MAX + 1 is 0 for (size_t i = key.keybuffer.length() - 1; i + 1 > 0; i--) { if (key.keybuffer[i] == '|') { key.keybuffer.erase(key.keybuffer.begin() + i); } } } if (escape_pressed) { // Cancel it, and remove the enemy it's tied to if necessary key.disabletextentry(); if (ed.current_text_mode >= FIRST_ENTTEXT && ed.current_text_mode <= LAST_ENTTEXT) { *ed.current_text_ptr = ed.old_entity_text; if (ed.old_entity_text == "") { ed.remove_entity(ed.text_entity); } } ed.current_text_mode = TEXT_NONE; ed.help_open = false; ed.substate = EditorSubState_MAIN; } if (enter_pressed) { input_submitted(); } break; default: break; } break; // We're in the menu! case EditorState_MENU: up_pressed |= key.isDown(KEYBOARD_w); down_pressed |= key.isDown(KEYBOARD_s); switch (ed.substate) { case EditorSubState_MAIN: if (!game.press_action && !game.press_left && !game.press_right && !up_pressed && !down_pressed) { game.jumpheld = false; } if (!game.jumpheld) { if (game.press_action || game.press_left || game.press_right || game.press_map || up_pressed || down_pressed) { game.jumpheld = true; } if (game.menustart) { bool left, right; if (!font::is_rtl(PR_FONT_INTERFACE)) { left = game.press_left; right = game.press_right; } else { left = game.press_right; right = game.press_left; } if (left || up_pressed) { game.currentmenuoption--; } else if (right || down_pressed) { game.currentmenuoption++; } } game.currentmenuoption = POS_MOD(game.currentmenuoption, (int)game.menuoptions.size()); if (game.press_action) { editormenuactionpress(); } } // Was escape pressed? if (escape_pressed) { bool esc_from_font = false; music.playef(Sound_VIRIDIAN); if (game.currentmenuname == Menu::ed_settings) { ed.state = EditorState_DRAW; gameScreen.recacheTextures(); } else { // Avoid double return esc_from_font = game.currentmenuname == Menu::ed_font; game.returnmenu(); map.nexttowercolour(); } if (ed.state == EditorState_MENU && !esc_from_font) { bool edsettings_in_stack = game.currentmenuname == Menu::ed_settings; if (!edsettings_in_stack) { size_t i; for (i = 0; i < game.menustack.size(); ++i) { if (game.menustack[i].name == Menu::ed_settings) { edsettings_in_stack = true; break; } } } if (edsettings_in_stack) { game.returntomenu(Menu::ed_settings); } else { game.createmenu(Menu::ed_settings); } map.nexttowercolour(); } } break; case EditorSubState_MENU_INPUT: if (escape_pressed && key.textentry()) { ed.substate = EditorSubState_MAIN; key.disabletextentry(); ed.current_text_mode = TEXT_NONE; music.playef(Sound_VIRIDIAN); } if (enter_pressed) { input_submitted(); } break; default: break; } break; case EditorState_SCRIPTS: { switch (ed.substate) { case EditorSubState_MAIN: { up_pressed |= key.isDown(KEYBOARD_w); down_pressed |= key.isDown(KEYBOARD_s); if (escape_pressed) { music.playef(Sound_VIRIDIAN); ed.state = EditorState_MENU; ed.substate = EditorSubState_MAIN; } if (ed.keydelay > 0) ed.keydelay--; if (up_pressed && ed.keydelay <= 0) { ed.keydelay = 3; ed.selected_script--; } if (down_pressed && ed.keydelay <= 0) { ed.keydelay = 3; ed.selected_script++; } ed.selected_script = SDL_clamp(ed.selected_script, 0, (int) script.customscripts.size() - 1); if (ed.selected_script < ed.script_list_offset) { ed.script_list_offset = ed.selected_script; } if (ed.selected_script >= ed.script_list_offset + 9) { ed.script_list_offset = ed.selected_script - 8; } if (!key.keymap[SDLK_BACKSPACE]) { ed.backspace_held = false; } if (key.keymap[SDLK_BACKSPACE] && !ed.backspace_held && !script.customscripts.empty()) { ed.backspace_held = true; music.playef(Sound_CRY); ed.remove_script(script.customscripts[(script.customscripts.size() - 1) - ed.selected_script].name); } if (!game.press_action && !game.press_left && !game.press_right && !up_pressed && !down_pressed && !key.isDown(27)) { game.jumpheld = false; } if (!game.jumpheld) { if (game.press_action || game.press_left || game.press_right || game.press_map || up_pressed || down_pressed || key.isDown(27)) { game.jumpheld = true; } if ((game.press_action || game.press_map) && !script.customscripts.empty()) { game.mapheld = true; ed.substate = EditorSubState_SCRIPTS_EDIT; key.enabletextentry(); key.keybuffer = ""; ed.current_text_ptr = &(key.keybuffer); ed.current_script = script.customscripts[(script.customscripts.size() - 1) - ed.selected_script].name; ed.load_script_in_editor(ed.current_script); ed.script_cursor_y = ed.script_buffer.size() - 1; ed.script_offset = SDL_max(ed.script_cursor_y - (ed.lines_visible - SCRIPT_LINE_PADDING), 0); key.keybuffer = ed.script_buffer[ed.script_cursor_y]; ed.script_cursor_x = UTF8_total_codepoints(ed.script_buffer[ed.script_cursor_y].c_str()); music.playef(Sound_VIRIDIAN); } } break; } case EditorSubState_SCRIPTS_EDIT: { // Script editor! if (escape_pressed) { music.playef(Sound_VIRIDIAN); ed.substate = EditorSubState_MAIN; // Alright, now re-add the script. ed.create_script(ed.current_script, ed.script_buffer); key.disabletextentry(); } if (ed.keydelay > 0) ed.keydelay--; if (up_pressed && ed.keydelay <= 0) { ed.keydelay = 3; ed.script_cursor_y = SDL_max(0, ed.script_cursor_y - 1); key.keybuffer = ed.script_buffer[ed.script_cursor_y]; } if (down_pressed && ed.keydelay <= 0) { ed.keydelay = 3; ed.script_cursor_y = SDL_min((int) ed.script_buffer.size() - 1, ed.script_cursor_y + 1); key.keybuffer = ed.script_buffer[ed.script_cursor_y]; } if (key.linealreadyemptykludge) { ed.keydelay = 6; key.linealreadyemptykludge = false; } if (key.pressedbackspace && ed.script_buffer[ed.script_cursor_y] == "" && ed.keydelay <= 0) { //Remove this line completely ed.remove_line(ed.script_cursor_y); ed.script_cursor_y = SDL_max(0, ed.script_cursor_y - 1); key.keybuffer = ed.script_buffer[ed.script_cursor_y]; ed.keydelay = 6; } /* Remove all pipes, they are the line separator in the XML * When this loop reaches the end, it wraps to SIZE_MAX; SIZE_MAX + 1 is 0 */ {size_t i; for (i = key.keybuffer.length() - 1; i + 1 > 0; --i) { if (key.keybuffer[i] == '|') { key.keybuffer.erase(key.keybuffer.begin() + i); } }} ed.script_buffer[ed.script_cursor_y] = key.keybuffer; ed.script_cursor_x = UTF8_total_codepoints(ed.script_buffer[ed.script_cursor_y].c_str()); if (enter_pressed) { //Continue to next line if (ed.script_cursor_y >= (int)ed.script_buffer.size()) //we're on the last line { ed.script_cursor_y++; key.keybuffer = ed.script_buffer[ed.script_cursor_y]; ed.script_cursor_x = UTF8_total_codepoints(ed.script_buffer[ed.script_cursor_y].c_str()); } else { //We're not, insert a line instead ed.script_cursor_y++; ed.insert_line(ed.script_cursor_y); key.keybuffer = ""; ed.script_cursor_x = 0; } } if (ed.script_cursor_y < ed.script_offset + SCRIPT_LINE_PADDING) { ed.script_offset = SDL_max(0, ed.script_cursor_y - SCRIPT_LINE_PADDING); } if (ed.script_cursor_y > ed.script_offset + ed.lines_visible - SCRIPT_LINE_PADDING) { ed.script_offset = SDL_min((int) ed.script_buffer.size() - ed.lines_visible + SCRIPT_LINE_PADDING, ed.script_cursor_y - ed.lines_visible + SCRIPT_LINE_PADDING); } break; } default: break; } break; } } if (ed.updatetiles && cl.getroomprop(ed.levx, ed.levy)->directmode == 0) { for (int i = 0; i < SCREEN_WIDTH_TILES * SCREEN_HEIGHT_TILES; i++) { int tile_x = i % SCREEN_WIDTH_TILES; int tile_y = i / SCREEN_WIDTH_TILES; ed.set_tile(tile_x, tile_y, ed.autotile(tile_x, tile_y)); } ed.updatetiles = false; graphics.foregrounddrawn = false; } } bool editorclass::is_warp_zone_background(int tile) { if (cl.getroomprop(levx, levy)->tileset == EditorTileset_SPACE_STATION) { return false; } return (tile == 120 || tile == 123 || tile == 126 || tile == 129 || tile == 132 || tile == 135 || tile == 138); } int editorclass::autotile(const int x, const int y) { int tile = get_tile(x, y); TileTypes type = get_tile_type(x, y, false); if (tile == 0) { return 0; } if (type == TileType_SPIKE) { bool tile_up = get_tile_type(x, y - 1, false) == TileType_SOLID; bool tile_down = get_tile_type(x, y + 1, false) == TileType_SOLID; bool tile_left = get_tile_type(x - 1, y, false) == TileType_SOLID; bool tile_right = get_tile_type(x + 1, y, false) == TileType_SOLID; if (cl.getroomprop(levx, levy)->tileset == EditorTileset_LAB) { // If this is the lab, use the colourful lab spikes! int mult = cl.getroomprop(levx, levy)->tilecol; if (tile_down) return 63 + mult * 2; if (tile_up) return 64 + mult * 2; if (tile_left) return 51 + mult * 2; if (tile_right) return 52 + mult * 2; return 63 + mult * 2; } // Not in the lab, so use the boring normal spikes if (tile_down) return 8; if (tile_up) return 9; if (tile_left) return 49; if (tile_right) return 50; return 8; } bool tile_up = autotile_connector(x, y - 1, type); bool tile_down = autotile_connector(x, y + 1, type); bool tile_left = autotile_connector(x - 1, y, type); bool tile_right = autotile_connector(x + 1, y, type); bool tile_up_left = autotile_connector(x - 1, y - 1, type); bool tile_up_right = autotile_connector(x + 1, y - 1, type); bool tile_down_left = autotile_connector(x - 1, y + 1, type); bool tile_down_right = autotile_connector(x + 1, y + 1, type); int tile_value = 0; if (tile_up) tile_value += 1; if (tile_up_right) tile_value += 2; if (tile_right) tile_value += 4; if (tile_down_right) tile_value += 8; if (tile_down) tile_value += 16; if (tile_down_left) tile_value += 32; if (tile_left) tile_value += 64; if (tile_up_left) tile_value += 128; bool background = (type == TileType_NONSOLID || is_warp_zone_background(tile)); EditorTilecolInfo data = get_tilecol_data(); int base = background ? data.background_base : data.foreground_base; return base + autotile_types[background ? data.background_type : data.foreground_type][tile_value]; } EditorTilecolInfo editorclass::get_tilecol_data(void) { EditorTilesets tileset = (EditorTilesets) cl.getroomprop(levx, levy)->tileset; int tilecol = cl.getroomprop(levx, levy)->tilecol; return tileset_colors[tileset][tilecol]; } bool editorclass::autotile_connector(int x, int y, TileTypes original_type) { if (x < 0 || x >= SCREEN_WIDTH_TILES || y < 0 || y >= SCREEN_HEIGHT_TILES) { return true; } int tile = get_tile(x, y); TileTypes new_type = get_tile_type(x, y, false); if (tile == 0) { return false; } EditorTilecolInfo data = get_tilecol_data(); if (original_type == TileType_NONSOLID) { if (data.bg_ignores_walls) { return new_type == TileType_NONSOLID || is_warp_zone_background(tile); } return true; } if (new_type == TileType_SOLID && !is_warp_zone_background(tile)) { return true; } return false; } int editorclass::get_enemy_tile(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; } } void editorclass::set_tile(int x, int y, int t) { if (x >= 0 && y >= 0 && x < SCREEN_WIDTH_TILES && y < SCREEN_HEIGHT_TILES) { cl.settile(levx, levy, x, y, t); } graphics.foregrounddrawn = false; updatetiles = true; } int editorclass::get_tile(const int x, const int y) { if (x >= 0 && y >= 0 && x < SCREEN_WIDTH_TILES && y < SCREEN_HEIGHT_TILES) { return cl.gettile(levx, levy, x, y); } return 0; } TileTypes editorclass::get_abs_tile_type(int x, int y, const bool wrap) { if (wrap) { x = POS_MOD(x, cl.mapwidth * 40); y = POS_MOD(y, cl.mapheight * 30); } else { x = SDL_clamp(x, 0, cl.mapwidth * 40 - 1); y = SDL_clamp(y, 0, cl.mapheight * 30 - 1); } const RoomProperty* const room = cl.getroomprop(x / 40, y / 30); int tile = cl.getabstile(x, y); if (tile == 1 || (tile >= 80 && tile <= 679)) { // It's solid. return TileType_SOLID; } if ((tile >= 6 && tile <= 9) || tile == 49 || tile == 50) { // It's a spike! return TileType_SPIKE; } if (room->tileset != 0) { // tiles2.png is slightly different. if (tile >= 51 && tile <= 74) { // It has more spikes! return TileType_SPIKE; } if (tile == 740) { // And a stray solid. return TileType_SOLID; } } return TileType_NONSOLID; } TileTypes editorclass::get_tile_type(int x, int y, bool wrap) { if (wrap) { x = POS_MOD(x, 40); y = POS_MOD(y, 30); } else { x = SDL_clamp(x, 0, 39); y = SDL_clamp(y, 0, 29); } return get_abs_tile_type(levx * 40 + x, levy * 30 + y, false); } bool editorclass::lines_can_pass(int x, int y) { const int tile = cl.gettile(levx, levy, x, y); if (x >= 0 && y >= 0 && x < SCREEN_WIDTH_TILES && y < SCREEN_HEIGHT_TILES) { return tile == 0 || tile >= 680; } if (x == -1 || y == -1 || x == SCREEN_WIDTH_TILES || y == SCREEN_HEIGHT_TILES) { // If lines go offscreen, they stick out one tile return true; } return false; } void editorclass::make_autotiling_base(void) { if (cl.getroomprop(levx, levy)->directmode == 1) { return; } for (int i = 0; i < SCREEN_WIDTH_TILES * SCREEN_HEIGHT_TILES; i++) { int tile_x = i % SCREEN_WIDTH_TILES; int tile_y = i / SCREEN_WIDTH_TILES; int tile = get_tile(tile_x, tile_y); if (tile == 0) { continue; } TileTypes type = get_tile_type(tile_x, tile_y, false); switch (type) { case TileType_NONSOLID: set_tile(tile_x, tile_y, 2); break; case TileType_SOLID: if (is_warp_zone_background(tile)) { set_tile(tile_x, tile_y, 2); } else { set_tile(tile_x, tile_y, 1); } break; case TileType_SPIKE: set_tile(tile_x, tile_y, 6); break; } } } void editorclass::switch_tileset(const bool reversed) { make_autotiling_base(); int tiles = cl.getroomprop(levx, levy)->tileset; if (reversed) { tiles--; } else { tiles++; } tiles = POS_MOD(tiles, NUM_EditorTilesets); cl.setroomtileset(levx, levy, tiles); clamp_tilecol(levx, levy, false); char buffer[3*SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Now using {area} Tileset"), "area:str", loc::gettext(tileset_names[tiles]) ); show_note(buffer); updatetiles = true; graphics.backgrounddrawn = false; } void editorclass::switch_tilecol(const bool reversed) { make_autotiling_base(); int tilecol = cl.getroomprop(levx, levy)->tilecol; if (reversed) { tilecol--; } else { tilecol++; } cl.setroomtilecol(levx, levy, tilecol); clamp_tilecol(levx, levy, true); show_note(loc::gettext("Tileset Colour Changed")); updatetiles = true; graphics.backgrounddrawn = false; } void editorclass::clamp_tilecol(const int rx, const int ry, const bool wrap) { const RoomProperty* const room = cl.getroomprop(rx, ry); const int tileset = room->tileset; int tilecol = room->tilecol; int mincol = (room->directmode ? tileset_min_colour_direct : tileset_min_colour)[tileset]; int maxcol = (room->directmode ? tileset_max_colour_direct : tileset_max_colour)[tileset]; // If wrap is true, wrap-around, otherwise just cap if (tilecol > maxcol) { tilecol = (wrap ? mincol : maxcol); } if (tilecol < mincol) { tilecol = (wrap ? maxcol : mincol); } cl.setroomtilecol(rx, ry, tilecol); } void editorclass::switch_enemy(const bool reversed) { const RoomProperty* const room = cl.getroomprop(levx, levy); int enemy = room->enemytype; if (reversed) { enemy--; } else { enemy++; } const int modulus = 10; enemy = POS_MOD(enemy, modulus); cl.setroomenemytype(levx, levy, enemy); show_note(loc::gettext("Enemy Type Changed")); } void editorclass::switch_warpdir(const bool reversed) { static const int modulus = 4; const RoomProperty* const room = cl.getroomprop(levx, levy); int warpdir = room->warpdir; if (reversed) { --warpdir; } else { ++warpdir; } warpdir = POS_MOD(warpdir, modulus); cl.setroomwarpdir(levx, levy, warpdir); switch (warpdir) { default: show_note(loc::gettext("Room warping disabled")); break; case 1: show_note(loc::gettext("Room warps horizontally")); break; case 2: show_note(loc::gettext("Room warps vertically")); break; case 3: show_note(loc::gettext("Room warps in all directions")); break; } graphics.backgrounddrawn = false; } ================================================ FILE: desktop_version/src/Editor.h ================================================ #ifndef EDITOR_H #define EDITOR_H #include "Constants.h" #include "CustomLevels.h" #include #include #include #include enum EditorTilesets { EditorTileset_SPACE_STATION = 0, EditorTileset_OUTSIDE = 1, EditorTileset_LAB = 2, EditorTileset_WARP_ZONE = 3, EditorTileset_SHIP = 4, NUM_EditorTilesets }; struct EditorTilecolInfo { const char* foreground_type; int foreground_base; const char* background_type; int background_base; bool direct_mode; bool bg_ignores_walls; }; enum EditorTools { EditorTool_WALLS, EditorTool_BACKING, EditorTool_SPIKES, EditorTool_TRINKETS, EditorTool_CHECKPOINTS, EditorTool_DISAPPEARING_PLATFORMS, EditorTool_CONVEYORS, EditorTool_MOVING_PLATFORMS, EditorTool_ENEMIES, EditorTool_GRAVITY_LINES, EditorTool_ROOMTEXT, EditorTool_TERMINALS, EditorTool_SCRIPTS, EditorTool_WARP_TOKENS, EditorTool_WARP_LINES, EditorTool_CREWMATES, EditorTool_START_POINT, NUM_EditorTools }; enum EditorStates { EditorState_DRAW, EditorState_SCRIPTS, EditorState_MENU }; enum EditorSubStates { EditorSubState_MAIN, EditorSubState_DRAW_INPUT, EditorSubState_DRAW_BOX, EditorSubState_DRAW_WARPTOKEN, EditorSubState_SCRIPTS_EDIT, EditorSubState_MENU_INPUT }; enum TileTypes { TileType_NONSOLID, TileType_SOLID, TileType_SPIKE }; enum BoxTypes { BoxType_SCRIPT, BoxType_ENEMY, BoxType_PLATFORM, BoxType_COPY }; enum BoxCorner { BoxCorner_FIRST, BoxCorner_LAST }; // Text entry field type enum TextMode { TEXT_NONE, // In-editor text fields TEXT_LOAD, TEXT_SAVE, TEXT_ROOMNAME, TEXT_SCRIPT, TEXT_ROOMTEXT, TEXT_GOTOROOM, LAST_EDTEXT = TEXT_GOTOROOM, // Settings-mode text fields TEXT_TITLE, TEXT_DESC1, TEXT_DESC2, TEXT_DESC3, TEXT_WEBSITE, TEXT_CREATOR, NUM_TEXTMODES, // Text modes with an entity FIRST_ENTTEXT = TEXT_SCRIPT, LAST_ENTTEXT = TEXT_ROOMTEXT }; struct GhostInfo { int rx; // game.roomx-100 int ry; // game.roomy-100 int x; // .xp int y; // .yp int col; // .colour SDL_Color realcol; int frame; // .drawframe }; class editorclass { public: editorclass(void); void reset(void); void register_tileset(EditorTilesets tileset, const char* name); void register_tilecol(EditorTilesets tileset, int index, const char* foreground_type, int foreground_base, const char* background_type, int background_base, bool direct, bool bg_ignores_walls); void register_tilecol(EditorTilesets tileset, int index, const char* foreground_type, int foreground_base, const char* background_type, int background_base, bool direct); void register_tilecol(EditorTilesets tileset, int index, const char* foreground_type, int foreground_base, const char* background_type, int background_base); void register_tool(EditorTools tool, const char* name, const char* keychar, SDL_KeyCode key, bool shift); void draw_tool(EditorTools tool, int x, int y); void get_tile_fill(int tilex, int tiley, int tile, bool connected[SCREEN_HEIGHT_TILES][SCREEN_WIDTH_TILES]); void handle_tile_placement(int tile); void tool_remove(); void entity_clicked(int index); void tool_place(); void get_input_line(enum TextMode mode, const std::string& prompt, std::string* ptr); void show_note(const char* text); void add_entity(int rx, int ry, 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 remove_entity(int t); int get_entity_at(int rx, int ry, int xp, int yp); void set_tile(int x, int y, int t); int get_tile(int x, int y); bool is_warp_zone_background(int tile); int autotile(int tile_x, int tile_y); bool autotile_connector(int x, int y, TileTypes original_type); EditorTilecolInfo get_tilecol_data(void); TileTypes get_abs_tile_type(int x, int y, bool wrap); TileTypes get_tile_type(int x, int y, bool wrap); bool lines_can_pass(int x, int y); void make_autotiling_base(void); int get_enemy_tile(int t); void switch_tileset(const bool reversed); void switch_tilecol(const bool reversed); void clamp_tilecol(const int rx, const int ry, const bool wrap); void switch_enemy(const bool reversed); void switch_warpdir(const bool reversed); EditorStates state; EditorSubStates substate; std::map > autotile_types; std::map > tileset_colors; const char* tileset_names[NUM_EditorTilesets]; int tileset_min_colour[NUM_EditorTilesets]; int tileset_max_colour[NUM_EditorTilesets]; int tileset_min_colour_direct[NUM_EditorTilesets]; int tileset_max_colour_direct[NUM_EditorTilesets]; const char* tool_names[NUM_EditorTools]; const char* tool_key_chars[NUM_EditorTools]; SDL_KeyCode tool_keys[NUM_EditorTools]; bool tool_requires_shift[NUM_EditorTools]; EditorTools current_tool; BoxTypes box_type; BoxCorner box_corner; SDL_Point box_point; int entcol; SDL_Color entcolreal; int kludgewarpdir[customlevelclass::numrooms]; int note_timer; int old_note_timer; std::string note; std::string keybuffer; std::string filename; std::string loaded_filepath; int old_tilex, old_tiley; int tilex, tiley; int keydelay, lclickdelay; bool savekey, loadkey; int levx, levy; int entframe, entframedelay; int scripttexttype; std::string old_entity_text; enum TextMode current_text_mode; // In text entry std::string* current_text_ptr; // Pointer to text we're changing std::string current_text_desc; // Description (for editor mode text fields) union { int desc; // Which description row we're changing int text_entity; // Entity ID for text prompt }; bool x_modifier, z_modifier, c_modifier, v_modifier, b_modifier, h_modifier, f_modifier, toolbox_open; int roomnamehide; bool saveandquit; bool help_open, shiftkey; bool settingskey; int warp_token_entity; bool updatetiles, changeroom; bool backspace_held; //Script editor stuff void remove_line(int t); void insert_line(int t); std::vector script_buffer; std::string current_script; int script_cursor_x, script_cursor_y; int script_offset; int lines_visible; //Functions for interfacing with the script: void create_script(const std::string& name, const std::vector& contents); void create_script(const std::string& name); void remove_script(const std::string& name); void load_script_in_editor(const std::string& name); void clear_script_buffer(void); bool script_exists(const std::string& name); int script_list_offset, selected_script; //Direct Mode variables int direct_mode_tile; int direct_mode_drawer; int return_message_timer; int old_return_message_timer; std::vector ghosts; int current_ghosts; }; void editorrender(void); void editorrenderfixed(void); void editorlogic(void); void editorinput(void); #ifndef ED_DEFINITION extern editorclass ed; #endif #endif /* EDITOR_H */ ================================================ FILE: desktop_version/src/Ent.cpp ================================================ #include "Ent.h" #include "Game.h" #include "Graphics.h" entclass::entclass(void) { clear(); } void entclass::clear(void) { invis = false; type = EntityType_PLAYER; size = 0; tile = 0; rule = 0; state = 0; statedelay = 0; life = 0; colour = EntityColour_CREW_CYAN; 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; oldxp = 0; oldyp = 0; x1 = 0; y1 = 0; x2 = 320; y2 = 240; gravity = false; onground = 0; onroof = 0; collisionframedelay = 0; collisiondrawframe = 0; collisionwalkingframe = 0; visualonground = 0; visualonroof = 0; onentity = 0; harmful = false; onwall = 0; onxwall = 0; onywall = 0; isplatform = false; framedelay = 0; drawframe = 0; walkingframe = 0; dir = 0; actionframe = 0; SDL_zero(realcol); lerpoldxp = 0; lerpoldyp = 0; } bool entclass::outside(void) { // 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; } void entclass::setenemy( int t ) { switch(t) { case 0: //lies emitter switch ((int) para) { case 0: tile = 60; animate = 2; colour = EntityColour_ENEMY_RED; behave = 10; w = 32; h = 32; x1 = -200; break; case 1: yp += 10; lerpoldyp += 10; tile = 63; animate = 100; //LIES colour = EntityColour_ENEMY_RED; behave = 11; para = 9; //destroyed when outside x1 = -200; x2 = 400; w = 26; h = 10; cx = 1; cy = 1; break; case 2: tile = 62; animate = 100; colour = EntityColour_ENEMY_RED; behave = -1; w = 32; h = 32; break; } break; case 1: //FACTORY emitter switch ((int) para) { case 0: tile = 72; animate = 3; size = 9; colour = EntityColour_ENEMY_RED; behave = 12; w = 64; h = 40; cx = 0; cy = 24; break; case 1: xp += 4; lerpoldxp += 4; yp -= 4; lerpoldyp -= 4; tile = 76; animate = 100; // Clouds colour = EntityColour_ENEMY_RED; behave = 13; para = -6; //destroyed when outside x2 = 400; w = 32; h = 12; cx = 0; cy = 6; break; case 2: tile = 77; animate = 100; colour = EntityColour_ENEMY_RED; behave = -1; w = 32; h = 16; break; } break; default: break; } } void entclass::setenemyroom( int rx, int ry ) { //Simple function to initilise simple enemies rx -= 100; ry -= 100; switch(rn(rx, ry)) { //Space Station 1 case rn(12, 3): //Security Drone tile = 36; colour = EntityColour_ENEMY_PINK; animate = 1; break; case rn(13, 3): //Wavelengths tile = 32; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 32; break; case rn(15, 3): //Traffic tile = 28; colour = EntityColour_ENEMY_RED; animate = 1; w = 22; h = 32; break; case rn(12, 5): //The Yes Men tile = 40; colour = EntityColour_ENEMY_YELLOW; animate = 1; w = 20; h = 20; break; case rn(13, 6): //Hunchbacked Guards tile = 44; colour = EntityColour_ENEMY_PINK; animate = 1; w = 16; h = 20; break; case rn(13, 4): //Communication Station harmful = false; if (xp == 256) { //transmittor tile = 104; colour = EntityColour_INACTIVE_ENTITY; animate = 7; w = 16; h = 16; xp -= 24; lerpoldxp -= 24; yp -= 16; lerpoldyp -= 16; } else { //radar dish tile =124; colour = EntityColour_INACTIVE_ENTITY; animate = 6; w = 32; h = 32; cx = 4; size = 9; xp -= 4; lerpoldxp -= 4; yp -= 32; lerpoldyp -= 32; } break; //The Lab case rn(4, 0): tile = 78; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 16; h = 16; break; case rn(2, 0): tile = 88; colour = EntityColour_ENEMY_CYAN; animate = 1; w = 16; h = 16; break; //Space Station 2 case rn(14, 11): colour = EntityColour_ENEMY_ORANGE; break; //Lies case rn(16, 11): colour = EntityColour_ENEMY_PINK; break; //Lies case rn(13, 10): colour = EntityColour_ENEMY_CYAN; break; //Factory case rn(13, 9): colour = EntityColour_ENEMY_YELLOW; break; //Factory case rn(13, 8): colour = EntityColour_ENEMY_PINK; break; //Factory case rn(11, 13): //Truth tile = 64; colour = EntityColour_ENEMY_GREEN; animate = 100; w = 44; h = 10; size = 10; break; case rn(17, 7): //Brass sent us under the top tile =82; colour = EntityColour_ENEMY_PINK; animate = 5; w = 28; h = 32; cx = 4; break; case rn(10, 7): // (deception) tile = 92; colour = EntityColour_ENEMY_RED; animate = 1; w = 16; h = 16; break; case rn(14, 13): // (chose poorly) tile = 56; colour = EntityColour_ENEMY_RED; animate = 1; w = 15; h = 24; break; case rn(13, 12): // (backsliders) tile = 164; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 16; h = 16; break; case rn(14, 8): // (wheel of fortune room) tile = 116; colour = EntityColour_ENEMY_BLUE; animate = 1; w = 32; h = 32; break; case rn(16, 9): // (seeing dollar signs) tile = 68; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 16; h = 16; break; case rn(16, 7): // (tomb of mad carew) tile = 106; colour = EntityColour_ENEMY_GREEN; animate = 2; w = 24; h = 25; break; //Warp Zone case rn(15, 2): // (numbers) tile = 100; colour = EntityColour_ENEMY_RED; animate = 1; w = 32; h = 14; yp += 1; lerpoldyp += 1; break; case rn(16, 2): // (Manequins) tile = 52; colour = EntityColour_ENEMY_GREEN; animate = 5; w = 16; h = 25; yp -= 4; lerpoldyp -= 4; break; case rn(18, 0): // (Obey) tile = 51; colour = EntityColour_ENEMY_CYAN; animate = 100; w = 30; h = 14; break; case rn(19, 1): // Ascending and Descending tile = 48; colour = EntityColour_ENEMY_YELLOW; animate = 5; w = 16; h = 16; break; case rn(19, 2): // Shockwave Rider tile = 176; colour = EntityColour_ENEMY_RED; animate = 1; w = 16; h = 16; break; case rn(18, 3): // Mind the gap tile = 168; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 16; h = 16; break; case rn(17, 3): // Edge Games if (yp ==96) { tile = 160; colour = EntityColour_ENEMY_PINK; animate = 1; w = 16; h = 16; } else { tile = 156; colour = EntityColour_ENEMY_PINK; animate = 1; w = 16; h = 16; } break; case rn(16, 0): // I love you tile = 112; colour = EntityColour_ENEMY_PINK; animate = 5; w = 16; h = 16; break; case rn(14, 2): // That's why I have to kill you tile = 114; colour = EntityColour_ENEMY_RED; animate = 5; w = 16; h = 16; break; case rn(18, 2): // Thinking with Portals //depends on direction if (xp ==88) { tile = 54+12; colour = EntityColour_ENEMY_BLUE; animate = 100; w = 60; h = 16; size = 10; } else { tile = 54; colour = EntityColour_ENEMY_BLUE; animate = 100; w = 60; h = 16; size = 10; } break; //Final level case rn(50-100, 53-100): //The Yes Men tile = 40; colour = EntityColour_ENEMY_YELLOW; animate = 1; w = 20; h = 20; break; case rn(48-100, 51-100): //Wavelengths tile = 32; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 32; break; case rn(43-100,52-100): // Ascending and Descending tile = 48; colour = EntityColour_ENEMY_YELLOW; animate = 5; w = 16; h = 16; break; case rn(46-100,51-100): //kids his age tile = 88; colour = EntityColour_ENEMY_CYAN; animate = 1; w = 16; h = 16; break; case rn(43-100,51-100): // Mind the gap tile = 168; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 16; h = 16; break; case rn(44-100,51-100): // vertigo? tile = 172; colour = EntityColour_ENEMY_GREEN; animate = 100; w = 32; h = 32; break; case rn(44-100,52-100): // (backsliders) tile = 164; colour = EntityColour_ENEMY_GREEN; animate = 1; w = 16; h = 16; break; case rn(43-100, 56-100): //Intermission 1 tile = 88; colour = EntityColour_ENEMY_GRAVITRON; animate = 1; w = 16; h = 16; break; case rn(45-100, 56-100): //Intermission 1 tile = 88; colour = EntityColour_ENEMY_GRAVITRON; animate = 1; w = 16; h = 16; break; //The elephant case rn(11, 9): case rn(12, 9): case rn(11, 8): case rn(12, 8): tile = 0; colour = EntityColour_TELEPORTER_FLASHING; animate = 0; w = 464; h = 320; size = 11; harmful = false; break; } } void entclass::settreadmillcolour( int rx, int ry ) { rx -= 100; ry -= 100; rx += 50 - 12; ry += 50 - 14; //Space Station tile = 20; //default as blue switch(rn(rx, ry)) { case rn(52, 48): tile = 791; break; //Cyan case rn(49, 47): tile = 24; break; //Yellow case rn(56, 44): tile = 24; break; //Yellow case rn(54, 49): tile = 24; break; //Yellow case rn(49, 49): tile = 36; break; //Green case rn(55, 44): tile = 36; break; //Green case rn(54, 43): tile = 36; break; //Green case rn(53, 49): tile = 36; break; //Green case rn(54, 45): tile = 711; break; //Green (special) case rn(51, 48): tile = 711; break; //Green (special) case rn(50, 49): tile = 28; break; //Purple case rn(54, 44): tile = 28; break; //Purple case rn(49, 42): tile = 28; break; //Purple case rn(55, 43): tile = 28; break; //Purple case rn(54, 47): tile = 28; break; //Purple case rn(53, 48): tile = 28; break; //Purple case rn(51, 47): tile = 32; break; //Red case rn(52, 49): tile = 32; break; //Red case rn(48, 43): tile = 32; break; //Red case rn(55, 47): tile = 32; break; //Red case rn(54, 48): tile = 32; break; //Red default: return; break; } } void entclass::updatecolour(void) { switch (size) { case 0: // Sprites case 3: // Big chunky pixels! case 4: // Small pickups case 7: // Teleporter case 9: // Really Big Sprite! (2x2) case 10: // 2x1 Sprite case 13: // Special for epilogue: huge hero! realcol = graphics.getcol(colour); break; case 5: // Horizontal gravity line case 6: // Vertical gravity line if (life == 0) { realcol = graphics.getcol(colour); } else { realcol = graphics.getcol(24); } break; case 11: // The fucking elephant if (game.noflashingmode) { realcol = graphics.getcol(22); } else { realcol = graphics.getcol(colour); } break; case 12: // Regular sprites that don't wrap // if we're outside the screen, we need to draw indicators if ((xp < -20 && vx > 0) || (xp > 340 && vx < 0)) { realcol = graphics.getcol(23); } else { realcol = graphics.getcol(colour); } } } bool entclass::ishumanoid(void) { return type == EntityType_PLAYER || type == EntityType_CREWMATE || type == EntityType_SUPERCREWMATE || type == EntityType_COLLECTABLE_CREWMATE; } ================================================ FILE: desktop_version/src/Ent.h ================================================ #ifndef ENT_H #define ENT_H #include #define rn( rx, ry) ((rx) + ((ry) * 100)) enum EntityType { EntityType_INVALID = -1, EntityType_PLAYER, EntityType_MOVING, EntityType_DISAPPEARING_PLATFORM, EntityType_QUICKSAND, EntityType_GRAVITY_TOKEN, EntityType_PARTICLE, EntityType_COIN, EntityType_TRINKET, EntityType_CHECKPOINT, EntityType_HORIZONTAL_GRAVITY_LINE, EntityType_VERTICAL_GRAVITY_LINE, EntityType_WARP_TOKEN, EntityType_CREWMATE, EntityType_TERMINAL, EntityType_SUPERCREWMATE, EntityType_TROPHY, EntityType_GRAVITRON_ENEMY = 23, EntityType_WARP_LINE_LEFT = 51, EntityType_WARP_LINE_RIGHT = 52, EntityType_WARP_LINE_TOP = 53, EntityType_WARP_LINE_BOTTOM = 54, EntityType_COLLECTABLE_CREWMATE = 55, EntityType_TELEPORTER = 100 }; class entclass { public: entclass(void); void clear(void); bool outside(void); void setenemy(int t); void setenemyroom(int rx, int ry); void settreadmillcolour(int rx, int ry); void updatecolour(void); bool ishumanoid(void); public: //Fundamentals bool invis; EntityType type; int size, tile, rule; int state, statedelay; int behave, animate; float para; int life; int colour; // As out-of-bounds colours are allowed, this should be an int instead of an EnemyColour. //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 gravity; int onground, onroof; //Animation int framedelay, drawframe, walkingframe, dir, actionframe; int collisionframedelay, collisiondrawframe, collisionwalkingframe; int visualonground, visualonroof; int yp;int xp; SDL_Color realcol; int lerpoldxp, lerpoldyp; }; #endif /* ENT_H */ ================================================ FILE: desktop_version/src/Entity.cpp ================================================ #define OBJ_DEFINITION #include "Entity.h" #include #include "CustomLevels.h" #include "Font.h" #include "Game.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "Localization.h" #include "Map.h" #include "Maths.h" #include "Music.h" #include "Script.h" #include "UtilityClass.h" #include "Vlogging.h" #include "Xoshiro.h" static int getgridpoint( int t ) { return t / 8; } bool entityclass::checktowerspikes(int t) { if (map.invincibility) { return false; } if (!INBOUNDS_VEC(t, entities)) { vlog_error("checktowerspikes() out-of-bounds!"); return false; } SDL_Rect temprect; temprect.x = entities[t].xp + entities[t].cx; temprect.y = entities[t].yp + entities[t].cy; temprect.w = entities[t].w; temprect.h = entities[t].h; int tempx = getgridpoint(temprect.x); int tempy = getgridpoint(temprect.y); int tempw = getgridpoint(temprect.x + temprect.w - 1); int temph = getgridpoint(temprect.y + temprect.h - 1); if (map.towerspikecollide(tempx, tempy)) return true; if (map.towerspikecollide(tempw, tempy)) return true; if (map.towerspikecollide(tempx, temph)) return true; if (map.towerspikecollide(tempw, temph)) return true; if (temprect.h >= 12) { int tpy1 = getgridpoint(temprect.y + 6); if (map.towerspikecollide(tempx, tpy1)) return true; if (map.towerspikecollide(tempw, tpy1)) return true; if (temprect.h >= 18) { tpy1 = getgridpoint(temprect.y + 12); if (map.towerspikecollide(tempx, tpy1)) return true; if (map.towerspikecollide(tempw, tpy1)) return true; if (temprect.h >= 24) { tpy1 = getgridpoint(temprect.y + 18); if (map.towerspikecollide(tempx, tpy1)) return true; if (map.towerspikecollide(tempw, tpy1)) return true; } } } return false; } void entityclass::init(void) { platformtile = 0; customplatformtile=0; vertplatforms = false; horplatforms = false; nearelephant = false; upsetmode = false; upset = 0; customenemy = 0; customwarpmode = false; customwarpmodevon = false; customwarpmodehon = false; customactivitycolour = ""; customactivitypositiony = -1; customactivitytext = ""; trophytext = 0; oldtrophytext = 0; trophytype = 0; altstates = 0; SDL_memset(customcrewmoods, true, sizeof(customcrewmoods)); resetallflags(); SDL_memset(collect, false, sizeof(collect)); SDL_memset(customcollect, false, sizeof(customcollect)); k = 0; } void entityclass::resetallflags(void) { SDL_memset(flags, false, sizeof(flags)); } int entityclass::swncolour( int t ) { //given colour t, return colour in setcol if (t == 0) return EntityColour_ENEMY_CYAN; if (t == 1) return EntityColour_ENEMY_RED; if (t == 2) return EntityColour_ENEMY_PINK; if (t == 3) return EntityColour_ENEMY_BLUE; if (t == 4) return EntityColour_ENEMY_YELLOW; if (t == 5) return EntityColour_ENEMY_GREEN; return EntityColour_CREW_CYAN; // Fallback to color 0 } void entityclass::swnenemiescol( int t ) { //change the colour of all SWN enemies to the current one for (size_t i = 0; i < entities.size(); i++) { if (entities[i].type == EntityType_GRAVITRON_ENEMY) { entities[i].colour = swncolour(t); } } } void entityclass::gravcreate( int ypos, int dir, int xoff /*= 0*/, int yoff /*= 0*/ ) { if (dir == 0) { createentity(-150 - xoff, 58 + (ypos * 20)+yoff, 23, 0, 0); } else { createentity(320+150 + xoff, 58 + (ypos * 20)+yoff, 23, 1, 0); } } void entityclass::generateswnwave( 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(-150, 58 + (int(xoshiro_rand() * 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(-150, 58 + (int(game.swnstate2) * 20), 23, 0, 0); game.swnstate = 0; game.swndelay = 0; //return to decision state break; case 3: createentity(320+150, 58 + (int(xoshiro_rand() * 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(xoshiro_rand() * 6); createentity(-150, 58 + (game.swnstate2 * 20), 23, 0, 0); createentity(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(-150, 58, 23, 0, 0); createentity(-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(-150, 58 + (2 * 20), 23, 0, 0); createentity(-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(320+150, 58, 23, 1, 0); createentity(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(320+150, 58 + (2 * 20), 23, 1, 0); createentity(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(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(xoshiro_rand() * 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(xoshiro_rand() * 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(xoshiro_rand() * 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(xoshiro_rand() * 100); game.swnstate4 = 0; 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(xoshiro_rand() * 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(0, 0); gravcreate(1, 0); gravcreate(2, 0); game.swnstate++; game.swndelay = 10; //return to decision state break; case 11: gravcreate(3, 0); gravcreate(4, 0); gravcreate(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(0, 1); gravcreate(1, 1); gravcreate(2, 1); game.swnstate++; game.swndelay = 10; //return to decision state break; case 13: gravcreate(3, 1); gravcreate(4, 1); gravcreate(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(0, 0, 0); gravcreate(5, 1, 0); game.swnstate++; game.swndelay = 20; //return to decision state break; case 15: gravcreate(1, 0); gravcreate(4, 1); game.swnstate++; game.swndelay = 20; //return to decision state break; case 16: gravcreate(2, 0); gravcreate(3, 1); game.swnstate++; game.swndelay = 20; //return to decision state break; case 17: gravcreate(3, 0); gravcreate(2, 1); game.swnstate++; game.swndelay = 20; //return to decision state break; case 18: gravcreate(4, 0); gravcreate(1, 1); game.swnstate++; game.swndelay = 20; //return to decision state break; case 19: gravcreate(5, 0); gravcreate(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(-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(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(xoshiro_rand() * 6); createentity(-150, 58 + (game.swnstate2 * 20), 23, 0, 0); createentity(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(1, 0); gravcreate(2, 0, 15); gravcreate(2, 0, -15); gravcreate(3, 0, 15); gravcreate(3, 0, -15); gravcreate(4, 0); game.swnstate = 0; game.swndelay = 15; //return to decision state break; case 24: gravcreate(1, 1); gravcreate(2, 1, 15); gravcreate(2, 1, -15); gravcreate(3, 1, 15); gravcreate(3, 1, -15); gravcreate(4, 1); game.swnstate = 0; game.swndelay = 15; //return to decision state break; case 25: gravcreate(0, 0); gravcreate(1, 1,0,10); gravcreate(4, 1,0,-10); gravcreate(5, 0); game.swnstate = 0; game.swndelay = 20; //return to decision state break; case 26: gravcreate(0, 1, 0); gravcreate(1, 1, 10); gravcreate(4, 1, 40); gravcreate(5, 1, 50); game.swnstate = 0; game.swndelay = 20; //return to decision state break; case 27: gravcreate(0, 0, 0); gravcreate(1, 0, 10); gravcreate(4, 0, 40); gravcreate(5, 0, 50); game.swnstate = 0; game.swndelay = 20; //return to decision state break; case 28: game.swnstate4++; game.swnstate2 = int(xoshiro_rand() * 6); createentity(-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(xoshiro_rand() * 6); gravcreate(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(xoshiro_rand() * 3); gravcreate(game.swnstate2, 0); gravcreate(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(xoshiro_rand() * 3); gravcreate(game.swnstate2, 1); gravcreate(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*/, const std::string& script /*= ""*/, bool custom /*= false*/) { k = blocks.size(); blockclass newblock; blockclass* blockptr; /* Can we reuse the slot of a disabled block? */ bool reuse = false; for (size_t i = 0; i < blocks.size(); ++i) { if (blocks[i].wp == 0 && blocks[i].hp == 0 && blocks[i].rect.w == 0 && blocks[i].rect.h == 0) { reuse = true; blockptr = &blocks[i]; break; } } if (!reuse) { blockptr = &newblock; } else { blockptr->clear(); } blockclass& block = *blockptr; switch(t) { case BLOCK: //Block block.type = BLOCK; block.xp = xp; block.yp = yp; block.wp = w; block.hp = h; block.rectset(xp, yp, w, h); break; case TRIGGER: //Trigger block.type = TRIGGER; block.wp = w; block.hp = h; block.rectset(xp, yp, w, h); block.trigger = trig; block.script = script; break; case DAMAGE: //Damage block.type = DAMAGE; block.wp = w; block.hp = h; block.rectset(xp, yp, w, h); break; case DIRECTIONAL: //Directional block.type = DIRECTIONAL; block.wp = w; block.hp = h; block.rectset(xp, yp, w, h); block.trigger = trig; break; case SAFE: //Safe block block.type = SAFE; block.xp = xp; block.yp = yp; block.wp = w; block.hp = h; block.rectset(xp, yp, w, h); break; case ACTIVITY: //Activity Zone block.type = ACTIVITY; block.wp = w; block.hp = h; block.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 block.prompt = "Press {button} to explode"; block.script = "intro"; block.setblockcolour("orange"); trig=1; break; case 1: block.prompt = "Press {button} to talk to Violet"; block.script = "talkpurple"; block.setblockcolour("purple"); trig=0; break; case 2: block.prompt = "Press {button} to talk to Vitellary"; block.script = "talkyellow"; block.setblockcolour("yellow"); trig=0; break; case 3: block.prompt = "Press {button} to talk to Vermilion"; block.script = "talkred"; block.setblockcolour("red"); trig=0; break; case 4: block.prompt = "Press {button} to talk to Verdigris"; block.script = "talkgreen"; block.setblockcolour("green"); trig=0; break; case 5: block.prompt = "Press {button} to talk to Victoria"; block.script = "talkblue"; block.setblockcolour("blue"); trig=0; break; case 6: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_station_1"; block.setblockcolour("orange"); trig=0; break; case 7: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_outside_1"; block.setblockcolour("orange"); trig=0; break; case 8: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_outside_2"; block.setblockcolour("orange"); trig=0; break; case 9: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_outside_3"; block.setblockcolour("orange"); trig=0; break; case 10: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_outside_4"; block.setblockcolour("orange"); trig=0; break; case 11: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_outside_5"; block.setblockcolour("orange"); trig=0; break; case 12: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_outside_6"; block.setblockcolour("orange"); trig=0; break; case 13: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_finallevel"; block.setblockcolour("orange"); trig=0; break; case 14: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_station_2"; block.setblockcolour("orange"); trig=0; break; case 15: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_station_3"; block.setblockcolour("orange"); trig=0; break; case 16: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_station_4"; block.setblockcolour("orange"); trig=0; break; case 17: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_warp_1"; block.setblockcolour("orange"); trig=0; break; case 18: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_warp_2"; block.setblockcolour("orange"); trig=0; break; case 19: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_lab_1"; block.setblockcolour("orange"); trig=0; break; case 20: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_lab_2"; block.setblockcolour("orange"); trig=0; break; case 21: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_secretlab"; block.setblockcolour("orange"); trig=0; break; case 22: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_shipcomputer"; block.setblockcolour("orange"); trig=0; break; case 23: block.prompt = "Press {button} to activate terminals"; block.script = "terminal_radio"; block.setblockcolour("orange"); trig=0; break; case 24: block.prompt = "Press {button} to activate terminal"; block.script = "terminal_jukebox"; block.setblockcolour("orange"); trig=0; break; case 25: block.prompt = "Passion for Exploring"; block.script = "terminal_juke1"; block.setblockcolour("orange"); trig=0; break; case 26: block.prompt = "Pushing Onwards"; block.script = "terminal_juke2"; block.setblockcolour("orange"); trig=0; break; case 27: block.prompt = "Positive Force"; block.script = "terminal_juke3"; block.setblockcolour("orange"); trig=0; break; case 28: block.prompt = "Presenting VVVVVV"; block.script = "terminal_juke4"; block.setblockcolour("orange"); trig=0; break; case 29: block.prompt = "Potential for Anything"; block.script = "terminal_juke5"; block.setblockcolour("orange"); trig=0; break; case 30: block.prompt = "Predestined Fate"; block.script = "terminal_juke6"; block.setblockcolour("orange"); trig=0; break; case 31: block.prompt = "Pipe Dream"; block.script = "terminal_juke7"; block.setblockcolour("orange"); trig=0; break; case 32: block.prompt = "Popular Potpourri"; block.script = "terminal_juke8"; block.setblockcolour("orange"); trig=0; break; case 33: block.prompt = "Pressure Cooker"; block.script = "terminal_juke9"; block.setblockcolour("orange"); trig=0; break; case 34: block.prompt = "ecroF evitisoP"; block.script = "terminal_juke10"; block.setblockcolour("orange"); trig=0; break; case 35: if (custom) { block.prompt = "Press {button} to interact"; } else { block.prompt = "Press {button} to activate terminal"; } block.script = "custom_"+customscript; block.setblockcolour("orange"); trig=0; break; } break; } if (customactivitytext != "") { block.prompt = customactivitytext; block.gettext = false; customactivitytext = ""; } else { block.gettext = true; } if (customactivitycolour != "") { block.setblockcolour(customactivitycolour.c_str()); customactivitycolour = ""; } if (customactivitypositiony != -1) { block.activity_y = customactivitypositiony; customactivitypositiony = -1; } else { block.activity_y = 0; } if (!reuse) { blocks.push_back(block); } } /* Disable entity, and return true if entity was successfully disabled */ bool entityclass::disableentity(int t) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("disableentity() out-of-bounds!"); return true; } if (entities[t].rule == 0 && t == getplayer()) { /* Don't disable the player entity! */ return false; } entities[t].invis = true; entities[t].size = -1; entities[t].type = EntityType_INVALID; entities[t].rule = -1; entities[t].isplatform = false; return true; } void entityclass::removeallblocks(void) { blocks.clear(); } void entityclass::disableblock( int t ) { if (!INBOUNDS_VEC(t, blocks)) { vlog_error("disableblock() out-of-bounds!"); return; } blocks[t].wp = 0; blocks[t].hp = 0; blocks[t].rect.w = blocks[t].wp; blocks[t].rect.h = blocks[t].hp; } void entityclass::moveblockto(int x1, int y1, int x2, int y2, int w, int h) { for (size_t i = 0; i < blocks.size(); i++) { if (blocks[i].xp == x1 && blocks[i].yp == y1) { blocks[i].xp = x2; blocks[i].yp = y2; blocks[i].wp = w; blocks[i].hp = h; blocks[i].rectset(blocks[i].xp, blocks[i].yp, blocks[i].wp, blocks[i].hp); break; } } } void entityclass::disableblockat(int x, int y) { for (size_t i = 0; i < blocks.size(); i++) { if (blocks[i].xp == x && blocks[i].yp == y) { disableblock(i); } } } void entityclass::removetrigger( int t ) { for(size_t i=0; i& linecrosskludge, int t) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("copylinecross() out-of-bounds!"); return; } //Copy entity t into the first free linecrosskludge entity linecrosskludge.push_back(entities[t]); } void entityclass::revertlinecross(std::vector& linecrosskludge, int t, int s) { if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(s, linecrosskludge)) { vlog_error("revertlinecross() out-of-bounds!"); return; } //Restore entity t info from linecrossing s entities[t].onentity = linecrosskludge[s].onentity; entities[t].state = linecrosskludge[s].state; entities[t].life = linecrosskludge[s].life; } static bool gridmatch( int p1, int p2, int p3, int p4, int p11, int p21, int p31, int p41 ) { if (p1 == p11 && p2 == p21 && p3 == p31 && p4 == p41) return true; return false; } static void entityclonefix(entclass* entity) { const bool is_lies_emitter = entity->behave == 10; const bool is_factory_emitter = entity->behave == 12; const bool is_emitter = is_lies_emitter || is_factory_emitter; if (!is_emitter) { return; } const bool in_lies_emitter_room = game.roomx >= 113 && game.roomx <= 117 && game.roomy == 111; const bool in_factory_emitter_room = game.roomx == 113 && game.roomy >= 108 && game.roomy <= 110; const bool valid = (is_lies_emitter && in_lies_emitter_room) || (is_factory_emitter && in_factory_emitter_room); if (!valid) { /* Fix memory leak */ entity->behave = -1; } } void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int p1, int p2, int p3, int p4) { k = entities.size(); entclass newent; entclass* entptr; /* Can we reuse the slot of a disabled entity? */ bool reuse = false; for (size_t i = 0; i < entities.size(); ++i) { if (entities[i].invis && entities[i].size == -1 && entities[i].type == EntityType_INVALID && entities[i].rule == -1 && !entities[i].isplatform) { reuse = true; entptr = &entities[i]; break; } } if (!reuse) { entptr = &newent; } else { entptr->clear(); } //Size 0 is a sprite //Size 1 is a tile //Beyond that are special cases (to do) //Size 2 is a moving platform of width 4 (32) //Size 3 is apparently a "big chunky pixel" //Size 4 is a coin/small pickup //Size 5 is a horizontal line, 6 is vertical //Rule 0 is the playable character //Rule 1 is anything harmful //Rule 2 is anything decorative (no collisions) //Rule 3 is anything that results in an entity to entity collision and state change //Rule 4 is a horizontal line, 5 is vertical //Rule 6 is a crew member bool custom_gray; // Special case for gray Warp Zone tileset! if (map.custommode) { const RoomProperty* const room = cl.getroomprop(game.roomx - 100, game.roomy - 100); custom_gray = room->tileset == 3 && room->tilecol == 6; } else { custom_gray = false; } entclass& entity = *entptr; entity.xp = xp; entity.yp = yp; entity.type = EntityType_INVALID; switch(t) { case 0: //Player entity.rule = 0; //Playable character entity.tile = 0; entity.colour = EntityColour_CREW_CYAN; entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 1; entity.type = EntityType_PLAYER; /* Fix wrong y-position if spawning in on conveyor */ entity.newxp = xp; entity.newyp = yp; if (meta1 == 1) entity.invis = true; entity.gravity = true; break; case 1: //Simple enemy, bouncing off the walls entity.rule = 1; entity.behave = meta1; entity.para = meta2; entity.w = 16; entity.h = 16; entity.cx = 0; entity.cy = 0; entity.x1 = p1; entity.y1 = p2; entity.x2 = p3; entity.y2 = p4; entity.harmful = true; entity.tile = 24; entity.animate = 0; entity.colour = EntityColour_ENEMY_PINK; entity.type = EntityType_MOVING; if (game.roomy == 111 && (game.roomx >= 113 && game.roomx <= 117)) { entity.setenemy(0); entity.setenemyroom(game.roomx, game.roomy); //For colour } else if (game.roomx == 113 && (game.roomy <= 110 && game.roomy >= 108)) { entity.setenemy(1); entity.setenemyroom(game.roomx, game.roomy); //For colour } else if (game.roomx == 113 && game.roomy == 107) { //MAVVERRRICK entity.tile = 96; entity.colour = EntityColour_ENEMY_RED; entity.size = 9; entity.w = 64; entity.h = 44; entity.animate = 4; } else { entity.setenemyroom(game.roomx, game.roomy); entityclonefix(&entity); } break; case 2: //A moving platform entity.rule = 2; entity.type = EntityType_MOVING; entity.size = 2; entity.tile = 1; if (customplatformtile > 0){ entity.tile = customplatformtile; }else if (platformtile > 0) { entity.tile = platformtile; }else{ //appearance again depends on location if (gridmatch(p1, p2, p3, p4, 100, 70, 320, 160)) entity.tile = 616; if (gridmatch(p1, p2, p3, p4, 72, 0, 248, 240)) entity.tile = 610; if (gridmatch(p1, p2, p3, p4, -20, 0, 320, 240)) entity.tile = 413; if (gridmatch(p1, p2, p3, p4, -96, -72, 400, 312)) entity.tile = 26; if (gridmatch(p1, p2, p3, p4, -32, -40, 352, 264)) entity.tile = 27; } entity.w = 32; entity.h = 8; if (meta1 <= 1) vertplatforms = true; if (meta1 >= 2 && meta1 <= 5) horplatforms = true; if (meta1 == 14 || meta1 == 15) horplatforms = true; //special case for last part of Space Station if (meta1 >= 6 && meta1 <= 7) vertplatforms = true; if (meta1 >= 10 && meta1 <= 11) { //Double sized threadmills entity.w = 64; entity.h = 8; meta1 -= 2; entity.size = 8; } entity.behave = meta1; entity.para = meta2; if (meta1 >= 8 && meta1 <= 9) { horplatforms = true; //threadmill! entity.animate = 10; if(customplatformtile>0){ entity.tile = customplatformtile+4; if (meta1 == 8) entity.tile += 4; if (meta1 == 9) entity.animate = 11; }else{ entity.settreadmillcolour(game.roomx, game.roomy); if (meta1 == 8) entity.tile += 40; if (meta1 == 9) entity.animate = 11; } } else { entity.animate = 100; } entity.x1 = p1; entity.y1 = p2; entity.x2 = p3; entity.y2 = p4; entity.isplatform = true; createblock(0, xp, yp, 32, 8); break; case 3: //Disappearing platforms entity.rule = 3; entity.type = EntityType_DISAPPEARING_PLATFORM; entity.size = 2; entity.tile = 2; //appearance again depends on location if(customplatformtile>0) { entity.tile=customplatformtile; } else if (meta1 > 0) { entity.tile = meta1; } else { if(game.roomx==49 && game.roomy==52) entity.tile = 18; if (game.roomx == 50 && game.roomy == 52) entity.tile = 22; } entity.cy = -1; entity.w = 32; entity.h = 10; entity.behave = meta1; entity.para = meta2; entity.onentity = 1; entity.animate = 100; createblock(0, xp, yp, 32, 8); break; case 4: //Breakable blocks entity.rule = 6; entity.type = EntityType_QUICKSAND; entity.size = 1; entity.tile = 10; entity.cy = -1; entity.w = 8; entity.h = 10; entity.behave = meta1; entity.para = meta2; entity.onentity = 1; entity.animate = 100; createblock(0, xp, yp, 8, 8); break; case 5: //Gravity Tokens entity.rule = 3; entity.type = EntityType_GRAVITY_TOKEN; entity.size = 0; entity.tile = 11; entity.w = 16; entity.h = 16; entity.behave = meta1; entity.para = meta2; entity.onentity = 1; entity.animate = 100; break; case 6: //Decorative particles entity.rule = 2; entity.type = EntityType_PARTICLE; //Particles entity.colour = EntityColour_PARTICLE_RED; entity.size = 3; entity.vx = meta1; entity.vy = meta2; entity.life = 12; break; case 7: //Decorative particles entity.rule = 2; entity.type = EntityType_PARTICLE; //Particles entity.colour = EntityColour_CREW_CYAN; entity.size = 3; entity.vx = meta1; entity.vy = meta2; entity.life = 12; break; case 8: //Small collectibles entity.rule = 3; entity.type = EntityType_COIN; entity.size = 4; entity.colour = EntityColour_COIN; entity.tile = 48; entity.w = 8; entity.h = 8; entity.onentity = 1; entity.animate = 100; //Check if it's already been collected entity.para = meta1; if (!INBOUNDS_ARR(meta1, collect) || collect[meta1]) return; break; case 9: //Something Shiny entity.rule = 3; entity.type = EntityType_TRINKET; entity.size = 0; entity.tile = 22; entity.w = 16; entity.h = 16; entity.colour = EntityColour_TRINKET; entity.onentity = 1; entity.animate = 100; //Check if it's already been collected entity.para = meta1; if (!INBOUNDS_ARR(meta1, collect) || collect[meta1]) return; break; case 10: //Savepoint entity.rule = 3; entity.type = EntityType_CHECKPOINT; entity.size = 0; entity.tile = 20 + meta1; entity.w = 16; entity.h = 16; entity.colour = EntityColour_INACTIVE_ENTITY; entity.onentity = 1; entity.animate = 100; entity.para = meta2; if (game.savepoint == meta2) { entity.colour = EntityColour_ACTIVE_ENTITY; entity.onentity = 0; } if (game.nodeathmode) { return; } break; case 11: //Horizontal Gravity Line entity.rule = 4; entity.type = EntityType_HORIZONTAL_GRAVITY_LINE; entity.size = 5; entity.life = 0; entity.colour = EntityColour_GRAVITY_LINE_ACTIVE; entity.w = meta1; entity.h = 1; entity.onentity = 1; break; case 12: //Vertical Gravity Line entity.rule = 5; entity.type = EntityType_VERTICAL_GRAVITY_LINE; entity.size = 6; entity.life = 0; entity.colour = EntityColour_GRAVITY_LINE_ACTIVE; entity.w = 1; entity.h = meta1; //entity.colour = EntityColour_CREW_CYAN; entity.onentity = 1; break; case 13: //Warp token entity.rule = 3; entity.type = EntityType_WARP_TOKEN; entity.size = 0; entity.tile = 18; entity.w = 16; entity.h = 16; entity.colour = EntityColour_WARP_TOKEN; entity.onentity = 1; entity.animate = 2; //Added in port, hope it doesn't break anything entity.behave = meta1; entity.para = meta2; break; case 14: // Teleporter entity.rule = 3; entity.type = EntityType_TELEPORTER; entity.size = 7; entity.tile = 1; //inactive entity.w = 96; entity.h = 96; entity.colour = EntityColour_TELEPORTER_INACTIVE; entity.onentity = 1; entity.animate = 100; entity.para = meta2; break; case 15: // Crew Member (warp zone) entity.rule = 6; entity.type = EntityType_CREWMATE; //A special case! entity.tile = 144; entity.colour = EntityColour_CREW_GREEN; //144 for sad :( entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 0; entity.state = meta1; entity.gravity = true; break; case 16: // Crew Member, upside down (space station) entity.rule = 7; entity.type = EntityType_CREWMATE; //A special case! entity.tile = 144+6; entity.colour = EntityColour_CREW_YELLOW; //144 for sad (upside down+12):( entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 1; entity.state = meta1; entity.gravity = true; break; case 17: // Crew Member (Lab) entity.rule = 6; entity.type = EntityType_CREWMATE; //A special case! entity.tile = 144; entity.colour = EntityColour_CREW_BLUE; //144 for sad :( entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 1; entity.state = meta1; entity.gravity = true; break; case 18: // Crew Member (Ship) //This is the scriping crewmember entity.rule = 6; entity.type = EntityType_CREWMATE; //A special case! entity.colour = meta1; if (meta2 == 0) { entity.tile = 0; } else { entity.tile = 144; } entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 0; entity.state = p1; entity.para = p2; if (p1 == 17) { entity.dir = p2; } entity.gravity = true; break; case 19: // Crew Member (Ship) More tests! entity.rule = 6; entity.type = EntityType_CREWMATE; //A special case! entity.tile = 0; entity.colour = EntityColour_ENEMY_RED; //54 for sad :( entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 1; entity.state = meta1; entity.gravity = true; break; case 20: //Terminal entity.rule = 3; entity.type = EntityType_TERMINAL; entity.size = 0; entity.tile = 16 + meta1; entity.w = 16; entity.h = 16; entity.colour = EntityColour_INACTIVE_ENTITY; entity.onentity = 1; entity.animate = 100; entity.para = meta2; break; case 21: //as above, except doesn't highlight entity.rule = 3; entity.type = EntityType_TERMINAL; entity.size = 0; entity.tile = 16 + meta1; entity.w = 16; entity.h = 16; entity.colour = EntityColour_INACTIVE_ENTITY; entity.onentity = 0; entity.animate = 100; entity.para = meta2; break; case 22: //Fake trinkets, only appear if you've collected them entity.rule = 3; entity.type = EntityType_TRINKET; entity.size = 0; entity.tile = 22; entity.w = 16; entity.h = 16; entity.colour = EntityColour_TRINKET; entity.onentity = 0; entity.animate = 100; //Check if it's already been collected entity.para = meta1; if (INBOUNDS_ARR(meta1, collect) && !collect[meta1]) return; break; case 23: //SWN Enemies //Given a different behavior, these enemies are especially for SWN mode and disappear outside the screen. entity.rule = 1; entity.type = EntityType_GRAVITRON_ENEMY; entity.behave = meta1; entity.para = meta2; entity.w = 16; entity.h = 16; entity.cx = 0; entity.cy = 0; entity.x1 = -2000; entity.y1 = -100; entity.x2 = 5200; entity.y2 = 340; entity.harmful = true; //initilise tiles here based on behavior entity.size = 12; //don't wrap around entity.colour = EntityColour_ENEMY_GRAVITRON; entity.tile = 78; //default case entity.animate = 1; if (game.swngame == SWN_SUPERGRAVITRON) { //set colour based on current state entity.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 entity.rule = 6; entity.type = EntityType_SUPERCREWMATE; //A special case! entity.colour = meta1; if (meta1 == 16) { //victoria is sad! if (meta2 == 2) meta2 = 1; } else { if (meta2 == 2) meta2 = 0; } if (meta2 == 0) { entity.tile = 0; } else { entity.tile = 144; } entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 1; entity.x1 = -2000; entity.y1 = -100; entity.x2 = 5200; entity.y2 = 340; entity.state = p1; entity.para = p2; if (p1 == 17) { entity.dir = p2; } entity.gravity = true; break; case 25: //Trophies entity.rule = 3; entity.type = EntityType_TROPHY; entity.size = 0; entity.w = 16; entity.h = 16; entity.colour = EntityColour_INACTIVE_ENTITY; entity.onentity = 1; entity.animate = 100; entity.para = meta2; //Decide tile here based on given achievement: both whether you have them and what they are //default is just a trophy base: entity.tile = 180 + meta1; switch (meta2) { case 1: if (game.bestrank[TimeTrial_SPACESTATION1] >= 3) { entity.tile = 184 + meta1; entity.colour = EntityColour_TROPHY_SPACE_STATION_1; } break; case 2: if (game.bestrank[TimeTrial_LABORATORY] >= 3) { entity.tile = 186 + meta1; entity.colour = EntityColour_TROPHY_LABORATORY; } break; case 3: if (game.bestrank[TimeTrial_TOWER] >= 3) { entity.tile = 184 + meta1; entity.colour = EntityColour_TROPHY_TOWER; } break; case 4: if (game.bestrank[TimeTrial_SPACESTATION2] >= 3) { entity.tile = 184 + meta1; entity.colour = EntityColour_TROPHY_SPACE_STATION_2; } break; case 5: if (game.bestrank[TimeTrial_WARPZONE] >= 3) { entity.tile = 184 + meta1; entity.colour = EntityColour_TROPHY_WARP_ZONE; } break; case 6: if (game.bestrank[TimeTrial_FINALLEVEL] >= 3) { entity.tile = 184 + meta1; entity.colour = EntityColour_TROPHY_FINAL_LEVEL; } break; case 7: if (game.unlock[UnlockTrophy_GAME_COMPLETE]) { entity.tile = 188 + meta1; entity.colour = EntityColour_TROPHY_GAME_COMPLETE; entity.h += 3; entity.yp -= 3; } break; case 8: if (game.unlock[UnlockTrophy_FLIPMODE_COMPLETE]) { entity.tile = 188 + meta1; entity.colour = EntityColour_TROPHY_GAME_COMPLETE; entity.h += 3; } break; case 9: if (game.bestgamedeaths > -1) { if (game.bestgamedeaths <= 50) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_FLASHY; } } break; case 10: if (game.bestgamedeaths > -1) { if (game.bestgamedeaths <= 100) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_GOLD; } } break; case 11: if (game.bestgamedeaths > -1) { if (game.bestgamedeaths <= 250) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_SILVER; } } break; case 12: if (game.bestgamedeaths > -1) { if (game.bestgamedeaths <= 500) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_BRONZE; } } break; case 13: if(game.swnbestrank>=1) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_BRONZE; } break; case 14: if(game.swnbestrank>=2) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_BRONZE; } break; case 15: if(game.swnbestrank>=3) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_BRONZE; } break; case 16: if(game.swnbestrank>=4) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_SILVER; } break; case 17: if(game.swnbestrank>=5) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_GOLD; } break; case 18: if(game.swnbestrank>=6) { entity.tile = 182 + meta1; entity.colour = EntityColour_TROPHY_FLASHY; } break; case 19: if (game.unlock[UnlockTrophy_NODEATHMODE_COMPLETE]) { entity.tile = 3; entity.colour = EntityColour_TELEPORTER_FLASHING; entity.size = 13; entity.xp -= 64; entity.yp -= 128; } break; } break; case 26: //Epilogue super warp token entity.rule = 3; entity.type = EntityType_WARP_TOKEN; entity.size = 0; entity.tile = 18; entity.w = 16; entity.h = 16; entity.colour = EntityColour_TRINKET; entity.onentity = 0; entity.animate = 100; entity.para = meta2; entity.size = 13; break; /* Warp lines */ case 51: /* Vertical */ case 52: /* Vertical */ case 53: /* Horizontal */ case 54: /* Horizontal */ if (t == 51) { entity.type = EntityType_WARP_LINE_LEFT; } else if (t == 52) { entity.type = EntityType_WARP_LINE_RIGHT; } else if (t == 53) { entity.type = EntityType_WARP_LINE_TOP; } else { entity.type = EntityType_WARP_LINE_BOTTOM; } entity.onentity = 1; entity.invis = true; entity.life = 0; switch (t) { case 51: case 52: entity.rule = 5; entity.size = 6; entity.w = 1; entity.h = meta1; break; case 53: case 54: entity.rule = 7; entity.size = 5; entity.w = meta1; entity.h = 1; break; } if (map.custommode) { customwarpmode = true; map.warpx = false; map.warpy = false; } break; case 55: // Crew Member (custom, collectable) //1 - position in array //2 - colour entity.rule = 3; entity.type = EntityType_COLLECTABLE_CREWMATE; if(INBOUNDS_ARR(meta2, customcrewmoods) && customcrewmoods[meta2]==1){ entity.tile = 144; }else{ entity.tile = 0; } entity.colour = graphics.crewcolour(meta2); entity.cx = 6; entity.cy = 2; entity.w = 12; entity.h = 21; entity.dir = 0; entity.state = 0; entity.onentity = 1; //entity.state = meta1; entity.gravity = true; //Check if it's already been collected entity.para = meta1; if (!INBOUNDS_ARR(meta1, customcollect) || customcollect[meta1]) return; break; case 56: //Custom enemy entity.rule = 1; entity.type = EntityType_MOVING; entity.behave = meta1; entity.para = meta2; entity.w = 16; entity.h = 16; entity.cx = 0; entity.cy = 0; entity.x1 = p1; entity.y1 = p2; entity.x2 = p3; entity.y2 = p4; entity.harmful = true; switch(customenemy){ case 0: entity.setenemyroom(4+100, 0+100); break; case 1: entity.setenemyroom(2+100, 0+100); break; case 2: entity.setenemyroom(12+100, 3+100); break; case 3: entity.setenemyroom(13+100, 12+100); break; case 4: entity.setenemyroom(16+100, 9+100); break; case 5: entity.setenemyroom(19+100, 1+100); break; case 6: entity.setenemyroom(19+100, 2+100); break; case 7: entity.setenemyroom(18+100, 3+100); break; case 8: entity.setenemyroom(16+100, 0+100); break; case 9: entity.setenemyroom(14+100, 2+100); break; default: entity.setenemyroom(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: entity.colour = EntityColour_ENEMY_RED; break; //GREEN case 5: case 9: case 22: case 25: case 29: case 31: case 38: case 46: case 52: case 53: entity.colour = EntityColour_ENEMY_GREEN; break; //BLUE case 1: case 6: case 14: case 27: case 33: case 44: case 50: case 57: entity.colour = EntityColour_ENEMY_BLUE; break; //YELLOW case 4: case 17: case 24: case 30: case 37: case 45: case 51: case 55: entity.colour = EntityColour_ENEMY_YELLOW; break; //PURPLE case 2: case 11: case 15: case 19: case 32: case 36: case 49: entity.colour = EntityColour_CREW_PURPLE; break; //CYAN case 8: case 10: case 13: case 18: case 26: case 35: case 41: case 47: case 54: entity.colour = EntityColour_ENEMY_CYAN; break; //PINK case 16: case 20: case 39: case 43: case 56: entity.colour = EntityColour_ENEMY_PINK; break; //ORANGE case 21: case 40: entity.colour = EntityColour_ENEMY_ORANGE; break; default: entity.colour = EntityColour_ENEMY_RED; break; } } if(custom_gray){ entity.colour = EntityColour_ENEMY_GRAY; } entityclonefix(&entity); break; case 100: // Invalid enemy, but gets treated as a teleporter entity.type = EntityType_TELEPORTER; break; } entity.lerpoldxp = entity.xp; entity.lerpoldyp = entity.yp; entity.drawframe = entity.tile; if (!reuse) { entities.push_back(entity); } /* Fix crewmate facing directions * This is a bit kludge-y but it's better than copy-pasting * and is okay to do because entity 12 does not change state on its own */ if (entity.type == EntityType_CREWMATE) { size_t indice; if (reuse) { indice = entptr - entities.data(); } else { indice = entities.size() - 1; } updateentities(indice); } } void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int p1, int p2) { createentity(xp, yp, t, meta1, meta2, p1, p2, 320, 240); } void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int p1) { createentity(xp, yp, t, meta1, meta2, p1, 0); } void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2) { createentity(xp, yp, t, meta1, meta2, 0); } void entityclass::createentity(int xp, int yp, int t, int meta1) { createentity(xp, yp, t, meta1, 0); } void entityclass::createentity(int xp, int yp, int t) { createentity(xp, yp, t, 0); } //Returns true if entity is removed bool entityclass::updateentities( int i ) { if (!INBOUNDS_VEC(i, entities)) { vlog_error("updateentities() out-of-bounds!"); return true; } if(entities[i].statedelay<=0) { switch(entities[i].type) { case EntityType_PLAYER: //Player break; case EntityType_MOVING: //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; bool entitygone = updateentities(i); if (entitygone) return true; } 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; bool entitygone = updateentities(i); if (entitygone) return true; } 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; bool entitygone = updateentities(i); if (entitygone) return true; } 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; bool entitygone = updateentities(i); if (entitygone) return true; } 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(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) { return disableentity(i); } if (game.roomx == 117) { if (entities[i].xp >= (33*8)-32) { return disableentity(i); } //collector for LIES } } break; case 12: //Emitter: shoot an enemy every so often (up) if (entities[i].state == 0) { createentity(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) { return disableentity(i); } if (game.roomx == 113 && game.roomy == 108) { if (entities[i].yp <= 60) { return disableentity(i); } //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 (size_t j = 0; j < entities.size(); j++) { if (entities[j].type == EntityType_DISAPPEARING_PLATFORM && entities[j].state== 3 && entities[j].xp == (entities[i].xp-32) ) { entities[i].state = 3; bool entitygone = updateentities(i); if (entitygone) return true; } } } 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 (size_t j = 0; j < entities.size(); j++) { if (entities[j].type == EntityType_DISAPPEARING_PLATFORM && entities[j].state==3 && entities[j].xp==entities[i].xp+32) { entities[i].state = 3; bool entitygone = updateentities(i); if (entitygone) return true; } } } 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 { int player = getplayer(); //first, y position if (INBOUNDS_VEC(player, entities) && entities[player].yp > 14 * 8) { entities[i].tile = 120; entities[i].yp = (28*8)-62; entities[i].lerpoldyp = (28*8)-62; } else { entities[i].tile = 96; entities[i].yp = 24; entities[i].lerpoldyp = 24; } //now, x position if (INBOUNDS_VEC(player, entities) && entities[player].xp > 20 * 8) { //approach from the left entities[i].xp = -64; entities[i].lerpoldxp = -64; entities[i].state = 2; bool entitygone = updateentities(i); //right if (entitygone) return true; } else { //approach from the left entities[i].xp = 320; entities[i].lerpoldxp = 320; entities[i].state = 3; bool entitygone = updateentities(i); //left if (entitygone) return true; } } 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); entities[i].lerpoldxp -= 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); entities[i].lerpoldxp += int(entities[i].para); } break; } break; case EntityType_DISAPPEARING_PLATFORM: //Disappearing platforms //wait for collision if (entities[i].state == 1) { entities[i].life = 12; entities[i].state = 2; entities[i].onentity = 0; music.playef(Sound_DISAPPEAR); } else if (entities[i].state == 2) { entities[i].life--; if (entities[i].life % 3 == 0) entities[i].walkingframe++; if (entities[i].life <= 0) { disableblockat(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].walkingframe--; 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].walkingframe--; if (entities[i].life >= 12) { entities[i].life = 12; entities[i].state = 0; entities[i].walkingframe++; } } break; case EntityType_QUICKSAND: //Breakable blocks //Only counts if vy of player entity is non zero if (entities[i].state == 1) { entities[i].life = 4; entities[i].state = 2; entities[i].onentity = 0; music.playef(Sound_CRUMBLE); } else if (entities[i].state == 2) { entities[i].life--; entities[i].tile++; if (entities[i].life <= 0) { disableblockat(entities[i].xp, entities[i].yp); return disableentity(i); } } break; case EntityType_GRAVITY_TOKEN: //Gravity token //wait for collision if (entities[i].state == 1) { game.gravitycontrol = (game.gravitycontrol + 1) % 2; ++game.totalflips; return disableentity(i); } break; case EntityType_PARTICLE: //Particle sprays if (entities[i].state == 0) { entities[i].life--; if (entities[i].life < 0) { return disableentity(i); } } break; case EntityType_COIN: //Small pickup //wait for collision if (entities[i].state == 1) { music.playef(Sound_COIN); if (INBOUNDS_ARR(entities[i].para, collect)) { collect[(int) entities[i].para] = true; } return disableentity(i); } break; case EntityType_TRINKET: //Found a trinket //wait for collision if (entities[i].state == 1) { if (INBOUNDS_ARR(entities[i].para, collect)) { collect[(int) entities[i].para] = true; } if (game.intimetrial) { music.playef(Sound_NEWRECORD); } else { game.setstate(1000); if(music.currentsong!=-1) music.silencedasmusik(); music.playef(Sound_TRINKET); if (game.trinkets() > game.stat_trinkets && !map.custommode) { game.stat_trinkets = game.trinkets(); game.savestatsandsettings(); } } return disableentity(i); } break; case EntityType_CHECKPOINT: //Savepoints //wait for collision if (entities[i].state == 1) { //First, deactivate all other savepoints for (size_t j = 0; j < entities.size(); j++) { if (entities[j].type == EntityType_CHECKPOINT) { entities[j].colour = EntityColour_INACTIVE_ENTITY; entities[j].onentity = 1; } } entities[i].colour = EntityColour_ACTIVE_ENTITY; entities[i].onentity = 0; game.savepoint = entities[i].para; music.playef(Sound_CHECKPOINT); game.savex = entities[i].xp - 4; if (entities[i].tile == 20) { game.savey = entities[i].yp - 2; game.savegc = 1; } else if (entities[i].tile == 21) { game.savey = entities[i].yp - 7; game.savegc = 0; } game.saverx = game.roomx; game.savery = game.roomy; int player = getplayer(); if (INBOUNDS_VEC(player, entities)) { game.savedir = entities[player].dir; } entities[i].state = 0; game.checkpoint_save(); } break; case EntityType_HORIZONTAL_GRAVITY_LINE: //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 EntityType_VERTICAL_GRAVITY_LINE: //Vertical gravity Lines if (entities[i].state == 1) { entities[i].onentity = 3; entities[i].state = 2; music.playef(Sound_GRAVITYLINE); game.gravitycontrol = (game.gravitycontrol + 1) % 2; game.totalflips++; int temp = getplayer(); if (game.gravitycontrol == 0) { if (INBOUNDS_VEC(temp, entities) && entities[temp].vy < 3) entities[temp].vy = 3; } else { if (INBOUNDS_VEC(temp, entities) && 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 EntityType_WARP_TOKEN: //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(Sound_TELEPORT); 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 EntityType_CREWMATE: //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 (INBOUNDS_VEC(k, entities) && entities[k].rule == 6) entities[k].tile = 0; if (INBOUNDS_VEC(k, entities) && entities[k].rule == 7) entities[k].tile = 6; //Stay close to the hero! int j = getplayer(); if (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; } else if (INBOUNDS_VEC(j, entities) && entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } if (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; } else if (INBOUNDS_VEC(j, entities) && entities[j].xp < entities[i].xp - 45) { entities[i].ax = -3; } //Special rules: if (game.roomx == 110 && game.roomy == 105 && !map.custommode) { 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 (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; } else if (INBOUNDS_VEC(j, entities) && entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } if (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; } else if (INBOUNDS_VEC(j, entities) && 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 (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; } else if (INBOUNDS_VEC(j, entities) && entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } if (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 45) { entities[i].ax = 3; } else if (INBOUNDS_VEC(j, entities) && 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(EntityColour_CREW_PURPLE); if (INBOUNDS_VEC(j, entities)) { 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(EntityColour_CREW_YELLOW); if (INBOUNDS_VEC(j, entities)) { 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(EntityColour_CREW_RED); if (INBOUNDS_VEC(j, entities)) { 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(EntityColour_CREW_GREEN); if (INBOUNDS_VEC(j, entities)) { 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(EntityColour_CREW_BLUE); if (INBOUNDS_VEC(j, entities)) { 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 (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; } else if (INBOUNDS_VEC(j, entities) && 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 EntityType_TERMINAL: //Terminals (very similar to savepoints) //wait for collision if (entities[i].state == 1) { entities[i].colour = EntityColour_ACTIVE_ENTITY; entities[i].onentity = 0; music.playef(Sound_TERMINALTOUCH); entities[i].state = 0; } break; case EntityType_SUPERCREWMATE: //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(INBOUNDS_VEC(j, entities) && 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 (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; } else if (INBOUNDS_VEC(j, entities) && 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++; return disableentity(i); } } break; case EntityType_TROPHY: //Trophy //wait for collision if (entities[i].state == 1) { if (!script.running) trophytext+=2; if (trophytext > 30) trophytext = 30; trophytype = entities[i].para; entities[i].state = 0; } break; case EntityType_GRAVITRON_ENEMY: //swn game! switch(entities[i].behave) { case 0: if (entities[i].state == 0) //Init { entities[i].vx = 7; if (entities[i].xp > 320) { return disableentity(i); } } break; case 1: if (entities[i].state == 0) //Init { entities[i].vx = -7; if (entities[i].xp <-20) { return disableentity(i); } } break; } break; case EntityType_WARP_LINE_LEFT: //Vertical warp line if (entities[i].state == 2){ int j=getplayer(); if(INBOUNDS_VEC(j, entities) && 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 EntityType_WARP_LINE_RIGHT: //Vertical warp line if (entities[i].state == 2){ int j=getplayer(); if(INBOUNDS_VEC(j, entities) && 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 EntityType_WARP_LINE_TOP: //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 EntityType_WARP_LINE_BOTTOM: //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 EntityType_COLLECTABLE_CREWMATE: //Collectable crewmate //wait for collision if (entities[i].state == 0) { //Basic rules, don't change expression int j = getplayer(); if (INBOUNDS_VEC(j, entities) && entities[j].xp > entities[i].xp + 5) { entities[i].dir = 1; } else if (INBOUNDS_VEC(j, entities) && entities[j].xp < entities[i].xp - 5) { entities[i].dir = 0; } } else if (entities[i].state == 1) { if (INBOUNDS_ARR(entities[i].para, customcollect)) { customcollect[(int) entities[i].para] = true; } if (game.intimetrial) { music.playef(Sound_RESCUE); } else { game.setstate(1010); //music.haltdasmusik(); if(music.currentsong!=-1) music.silencedasmusik(); music.playef(Sound_RESCUE); } return disableentity(i); } break; case EntityType_TELEPORTER: //The teleporter if (entities[i].state == 1) { //if inactive, activate! if (entities[i].tile == 1) { music.playef(Sound_GAMESAVED); entities[i].tile = 2; entities[i].colour = EntityColour_TELEPORTER_ACTIVE; if(!game.intimetrial && !game.nodeathmode) { game.setstate(2000); game.setstatedelay(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 (size_t j = 0; j < entities.size(); j++) { if (entities[j].type == EntityType_CHECKPOINT) { entities[j].colour = EntityColour_INACTIVE_ENTITY; 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; int player = getplayer(); if (INBOUNDS_VEC(player, entities)) { game.savedir = entities[player].dir; } } entities[i].onentity = 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 = EntityColour_TELEPORTER_FLASHING; 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; case EntityType_INVALID: // Invalid entity, do nothing! break; } } else { entities[i].statedelay--; if (entities[i].statedelay < 0) { entities[i].statedelay = 0; } } return false; } void entityclass::animateentities( int _i ) { if (!INBOUNDS_VEC(_i, entities)) { vlog_error("animateentities() out-of-bounds!"); return; } if(entities[_i].statedelay < 1) { switch(entities[_i].type) { case EntityType_PLAYER: 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].visualonground>0 || entities[_i].visualonroof>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].visualonroof > 0) entities[_i].drawframe += 6; // Stuck in a wall? Then default to gravitycontrol if (entities[_i].visualonground > 0 && entities[_i].visualonroof > 0 && game.gravitycontrol == 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 EntityType_MOVING: case EntityType_GRAVITRON_ENEMY: //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 EntityType_DISAPPEARING_PLATFORM: //Disappearing platforms entities[_i].drawframe = entities[_i].tile + entities[_i].walkingframe; break; case EntityType_WARP_TOKEN: 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 EntityType_CREWMATE: case EntityType_COLLECTABLE_CREWMATE: case EntityType_SUPERCREWMATE: //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].visualonground>0 || entities[_i].visualonroof>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].visualonroof > 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 EntityType_TELEPORTER: //the teleporter! if (entities[_i].tile == 1 || game.noflashingmode) { //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; } } void entityclass::animatehumanoidcollision(const int i) { /* For some awful reason, drawframe is used for actual collision. * And removing the input delay changes collision drawframe * because vx is checked in animateentities(). * So we need to separate the collision drawframe from the visual drawframe * and update it separately in gamelogic. * Hence this function. */ entclass* entity; if (!INBOUNDS_VEC(i, entities)) { vlog_error("animatehumanoidcollision() out-of-bounds!"); return; } entity = &entities[i]; if (!entity->ishumanoid()) { return; } if (entity->statedelay > 0) { return; } --entity->collisionframedelay; if (entity->dir == 1) { entity->collisiondrawframe = entity->tile; } else { entity->collisiondrawframe = entity->tile + 3; } if (entity->visualonground > 0 || entity->visualonroof > 0) { if (entity->vx > 0.0f || entity->vx < -0.0f) { /* Walking */ if (entity->collisionframedelay <= 1) { entity->collisionframedelay = 4; ++entity->collisionwalkingframe; } if (entity->collisionwalkingframe >= 2) { entity->collisionwalkingframe = 0; } entity->collisiondrawframe += entity->collisionwalkingframe + 1; } if (entity->visualonroof > 0) { entity->collisiondrawframe += 6; } } else { ++entity->collisiondrawframe; if (entity->type == EntityType_PLAYER && game.gravitycontrol == 1) { entity->collisiondrawframe += 6; } } /* deathseq shouldn't matter, but handling it anyway just in case */ if (game.deathseq > -1) { entity->collisiondrawframe = 13; if (entity->dir == 1) { entity->collisiondrawframe = 12; } if ((entity->type == EntityType_PLAYER && game.gravitycontrol == 1) || (entity->type != EntityType_PLAYER && entity->rule == 7)) { entity->collisiondrawframe += 2; } } entity->framedelay = entity->collisionframedelay; entity->drawframe = entity->collisiondrawframe; entity->walkingframe = entity->collisionwalkingframe; } int entityclass::getcompanion(void) { //Returns the index of the companion with rule t for (size_t i = 0; i < entities.size(); i++) { if(entities[i].rule==6 || entities[i].rule==7) { return i; } } return -1; } int entityclass::getplayer(void) { //Returns the index of the first player entity for (size_t i = 0; i < entities.size(); i++) { if (entities[i].type == EntityType_PLAYER) { return i; } } return -1; } int entityclass::getscm(void) { //Returns the supercrewmate for (size_t i = 0; i < entities.size(); i++) { if (entities[i].type == EntityType_SUPERCREWMATE) { return i; } } return 0; } int entityclass::getlineat( int t ) { //Get the entity which is a horizontal line at height t (for SWN game) for (size_t i = 0; i < entities.size(); 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. // Note: this takes an int, not an EntityColour, as invalid colours are allowed in scripting for (size_t i = 0; i < entities.size(); i++) { if ((entities[i].type == EntityType_CREWMATE || entities[i].type == EntityType_SUPERCREWMATE) && (entities[i].rule == 6 || entities[i].rule == 7)) { if (entities[i].colour == t) { return i; } } } // Return entity 0 as a fallback // Unfortunately some levels rely on this, where targeting a non-existent crewman returns the first entity... // Which, most of the time, is the player. return 0; } int entityclass::getcustomcrewman(int t) { // like getcrewman, this returns the index of the CUSTOM crewman with colour index given by t for (size_t i = 0; i < entities.size(); i++) { if (entities[i].type == EntityType_COLLECTABLE_CREWMATE) { if (entities[i].colour == t) { return i; } } } return 0; } int entityclass::getteleporter(void) { for (size_t i = 0; i < entities.size(); i++) { if (entities[i].type == EntityType_TELEPORTER) { return i; } } return -1; } bool entityclass::entitycollide( int a, int b ) { if (!INBOUNDS_VEC(a, entities) || !INBOUNDS_VEC(b, entities)) { vlog_error("entitycollide() out-of-bounds!"); return false; } //Do entities a and b collide? SDL_Rect temprect; temprect.x = entities[a].xp + entities[a].cx; temprect.y = entities[a].yp + entities[a].cy; temprect.w = entities[a].w; temprect.h = entities[a].h; SDL_Rect temprect2; temprect2.x = entities[b].xp + entities[b].cx; temprect2.y = entities[b].yp + entities[b].cy; temprect2.w = entities[b].w; temprect2.h = entities[b].h; if (help.intersects(temprect, temprect2)) return true; return false; } bool entityclass::checkdamage(bool scm /*= false*/) { //Returns true if player (or supercrewmate) collides with a damagepoint for(size_t i=0; i < entities.size(); i++) { if((scm && entities[i].type == EntityType_SUPERCREWMATE) || (!scm && entities[i].rule == 0)) { SDL_Rect temprect; temprect.x = entities[i].xp + entities[i].cx; temprect.y = entities[i].yp + entities[i].cy; temprect.w = entities[i].w; temprect.h = entities[i].h; for (size_t j=0; j 0 && blocks[i].trigger == 0) if (help.intersects(blocks[i].rect, temprect)) return true; if (dy <= 0 && blocks[i].trigger == 1) if (help.intersects(blocks[i].rect, temprect)) return true; if (dx > 0 && blocks[i].trigger == 2) if (help.intersects(blocks[i].rect, temprect)) return true; if (dx <= 0 && blocks[i].trigger == 3) if (help.intersects(blocks[i].rect, temprect)) return true; } if (blocks[i].type == BLOCK && help.intersects(blocks[i].rect, temprect)) { return true; } if (blocks[i].type == SAFE && (dr)==1 && help.intersects(blocks[i].rect, temprect)) { return true; } } return false; } bool entityclass::checkwall(const bool invincible, const SDL_Rect& temprect, const float dx, const float dy, const int dr, const bool skipblocks, const bool skipdirblocks) { //Returns true if entity setup in temprect collides with a wall if(skipblocks) { if (checkblocks(temprect, dx, dy, dr, skipdirblocks)) return true; } int tempx = getgridpoint(temprect.x); int tempy = getgridpoint(temprect.y); int tempw = getgridpoint(temprect.x + temprect.w - 1); int temph = getgridpoint(temprect.y + temprect.h - 1); if (map.collide(tempx, tempy, invincible)) return true; if (map.collide(tempw, tempy, invincible)) return true; if (map.collide(tempx, temph, invincible)) return true; if (map.collide(tempw, temph, invincible)) return true; if (temprect.h >= 12) { int tpy1 = getgridpoint(temprect.y + 6); if (map.collide(tempx, tpy1, invincible)) return true; if (map.collide(tempw, tpy1, invincible)) return true; if (temprect.h >= 18) { tpy1 = getgridpoint(temprect.y + 12); if (map.collide(tempx, tpy1, invincible)) return true; if (map.collide(tempw, tpy1, invincible)) return true; if (temprect.h >= 24) { tpy1 = getgridpoint(temprect.y + 18); if (map.collide(tempx, tpy1, invincible)) return true; if (map.collide(tempw, tpy1, invincible)) return true; } } } if (temprect.w >= 12) { int tpx1 = getgridpoint(temprect.x + 6); if (map.collide(tpx1, tempy, invincible)) return true; if (map.collide(tpx1, temph, invincible)) return true; } return false; } bool entityclass::checkwall(const bool invincible, const SDL_Rect& temprect) { // Same as above but use default arguments for blocks return checkwall(invincible, temprect, 0, 0, 0, true, false); } float entityclass::hplatformat(const int px, const int py) { //Returns first entity of horizontal platform at (px, py), -1000 otherwise. for (size_t i = 0; i < entities.size(); i++) { if (entities[i].rule == 2 && entities[i].behave >= 2 && 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; } static int yline( int a, int b ) { if (a < b) return -1; return 1; } bool entityclass::entityhlinecollide( int t, int l ) { if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(l, entities)) { vlog_error("entityhlinecollide() out-of-bounds!"); return false; } //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) { int 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 ) { if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(l, entities)) { vlog_error("entityvlinecollide() out-of-bounds!"); return false; } //Returns true is entity t collided with the vertical line l. if(entities[t].yp + entities[t].cy+entities[t].h>=entities[l].yp && entities[t].yp + entities[t].cy<=entities[l].yp+entities[l].h) { int 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) { if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(l, entities)) { vlog_error("entitywarphlinecollide() out-of-bounds!"); return false; } //Returns true is entity t collided with the horizontal line l. if(entities[t].xp + entities[t].cx+entities[t].w>=entities[l].xp &&entities[t].xp + entities[t].cx<=entities[l].xp+entities[l].w){ int 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) { if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(l, entities)) { vlog_error("entitywarpvlinecollide() out-of-bounds!"); return false; } //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 && entities[t].yp + entities[t].cy <= entities[l].yp + entities[l].h) { int 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( int t ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("entitycollideplatformroof() out-of-bounds!"); return -1000; } SDL_Rect temprect; temprect.x = entities[t].xp + entities[t].cx; temprect.y = entities[t].yp + entities[t].cy -1; temprect.w = entities[t].w; temprect.h = entities[t].h; int px = 0, py = 0; if (checkplatform(temprect, &px, &py)) { //px and py now contain an x y coordinate for a platform, find it return hplatformat(px, py); } return -1000; } float entityclass::entitycollideplatformfloor( int t ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("entitycollideplatformfloor() out-of-bounds!"); return -1000; } SDL_Rect temprect; temprect.x = entities[t].xp + entities[t].cx; temprect.y = entities[t].yp + entities[t].cy + 1; temprect.w = entities[t].w; temprect.h = entities[t].h; int px = 0, py = 0; if (checkplatform(temprect, &px, &py)) { //px and py now contain an x y coordinate for a platform, find it return hplatformat(px, py); } return -1000; } bool entityclass::entitycollidefloor( int t ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("entitycollidefloor() out-of-bounds!"); return false; } SDL_Rect temprect; temprect.x = entities[t].xp + entities[t].cx; temprect.y = entities[t].yp + entities[t].cy + 1; temprect.w = entities[t].w; temprect.h = entities[t].h; const bool invincible = map.invincibility && entities[t].ishumanoid(); if (checkwall(invincible, temprect)) return true; return false; } bool entityclass::entitycollideroof( int t ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("entitycollideroof() out-of-bounds!"); return false; } SDL_Rect temprect; temprect.x = entities[t].xp + entities[t].cx; temprect.y = entities[t].yp + entities[t].cy - 1; temprect.w = entities[t].w; temprect.h = entities[t].h; const bool invincible = map.invincibility && entities[t].ishumanoid(); if (checkwall(invincible, temprect)) return true; return false; } bool entityclass::testwallsx( int t, int tx, int ty, const bool skipdirblocks ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("testwallsx() out-of-bounds!"); return false; } SDL_Rect temprect; temprect.x = tx + entities[t].cx; temprect.y = ty + entities[t].cy; temprect.w = entities[t].w; temprect.h = entities[t].h; bool skipblocks = entities[t].rule < 2 || entities[t].type == EntityType_SUPERCREWMATE; float dx = 0; float dy = 0; if (entities[t].rule == 0) dx = entities[t].vx; int dr = entities[t].rule; const bool invincible = map.invincibility && entities[t].ishumanoid(); //Ok, now we check walls if (checkwall(invincible, temprect, dx, dy, dr, skipblocks, skipdirblocks)) { if (entities[t].vx > 1.0f) { entities[t].vx--; entities[t].newxp = entities[t].xp + entities[t].vx; return testwallsx(t, entities[t].newxp, entities[t].yp, skipdirblocks); } else if (entities[t].vx < -1.0f) { entities[t].vx++; entities[t].newxp = entities[t].xp + entities[t].vx; return testwallsx(t, entities[t].newxp, entities[t].yp, skipdirblocks); } else { entities[t].vx=0; return false; } } return true; } bool entityclass::testwallsy( int t, int tx, int ty ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("testwallsy() out-of-bounds!"); return false; } SDL_Rect temprect; temprect.x = tx + entities[t].cx; temprect.y = ty + entities[t].cy; temprect.w = entities[t].w; temprect.h = entities[t].h; bool skipblocks = entities[t].rule < 2 || entities[t].type == EntityType_SUPERCREWMATE; float dx = 0; float dy = 0; if (entities[t].rule == 0) dy = entities[t].vy; int dr = entities[t].rule; const bool invincible = map.invincibility && entities[t].ishumanoid(); //Ok, now we check walls if (checkwall(invincible, temprect, dx, dy, dr, skipblocks, false)) { if (entities[t].vy > 1) { entities[t].vy--; entities[t].newyp = int(entities[t].yp + entities[t].vy); return testwallsy(t, 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, entities[t].xp, entities[t].newyp); } else { entities[t].vy=0; return false; } } return true; } void entityclass::applyfriction( int t, float xrate, float yrate ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("applyfriction() out-of-bounds!"); return; } 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 (SDL_fabsf(entities[t].vx) < xrate) entities[t].vx = 0.0f; if (SDL_fabsf(entities[t].vy) < yrate) entities[t].vy = 0.0f; } void entityclass::updateentitylogic( int t ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("updateentitylogic() out-of-bounds!"); return; } 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 ) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("entitymapcollision() out-of-bounds!"); return; } if (testwallsx(t, entities[t].newxp, entities[t].yp, false)) { 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, 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; } } void entityclass::movingplatformfix( int t, int j ) { if (!INBOUNDS_VEC(t, entities) || !INBOUNDS_VEC(j, entities)) { vlog_error("movingplatformfix() out-of-bounds!"); return; } //If this intersects the entity, then we move them along it 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, 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 = 2; entities[j].visualonroof = 1; } else { entities[j].yp = entities[t].yp - entities[j].h-entities[j].cy; entities[j].vy = 0; entities[j].onground = 2; entities[j].visualonground = 1; } } else { entities[t].state = entities[t].onwall; } } } } void entityclass::customwarplinecheck(int i) { if (!INBOUNDS_VEC(i, entities)) { vlog_error("customwarplinecheck() out-of-bounds!"); return; } //Turns on obj.customwarpmodevon and obj.customwarpmodehon if player collides //with warp lines //We test entity to entity for (int j = 0; j < (int) entities.size(); j++) { if (i != j) { if (entities[i].rule == 0 && entities[j].rule == 5 //Player vs vertical line! && (entities[j].type == EntityType_WARP_LINE_LEFT || entities[j].type == EntityType_WARP_LINE_RIGHT) && entitywarpvlinecollide(i, j)) { customwarpmodevon = true; } if (entities[i].rule == 0 && entities[j].rule == 7 //Player vs horizontal WARP line && (entities[j].type == EntityType_WARP_LINE_TOP || entities[j].type == EntityType_WARP_LINE_BOTTOM) && entitywarphlinecollide(i, j)) { customwarpmodehon = true; } } } } void entityclass::entitycollisioncheck(void) { for (size_t i = 0; i < entities.size(); i++) { bool player = entities[i].rule == 0; bool scm = game.supercrewmate && entities[i].type == EntityType_SUPERCREWMATE; if (!player && !scm) { continue; } //We test entity to entity for (size_t j = 0; j < entities.size(); j++) { if (i == j) { continue; } collisioncheck(i, j, scm); } } //can't have the player being stuck... stuckprevention(getplayer()); //Can't have the supercrewmate getting stuck either! if (game.supercrewmate) { stuckprevention(getscm()); } //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 (checkdamage(true) && !map.invincibility) { //usual player dead stuff game.scmhurt = true; game.deathseq = 30; } } // WARNING: If updating this code, don't forget to update Map.cpp mapclass::twoframedelayfix() int block_idx = -1; int activetrigger = checktrigger(&block_idx); if (activetrigger > -1 && INBOUNDS_VEC(block_idx, blocks)) { // Load the block's script if its gamestate is out of range if (blocks[block_idx].script != "" && (activetrigger < 300 || activetrigger > 336)) { game.startscript = true; game.newscript = blocks[block_idx].script; removetrigger(activetrigger); game.setstate(0); } else { game.setstate(activetrigger); } game.setstatedelay(0); } } void entityclass::collisioncheck(int i, int j, bool scm /*= false*/) { if (!INBOUNDS_VEC(i, entities) || !INBOUNDS_VEC(j, entities)) { vlog_error("collisioncheck() out-of-bounds!"); return; } switch (entities[j].rule) { case 1: if (!entities[j].harmful) { break; } //person 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 SDL_Point colpoint1; colpoint1.x = entities[i].xp; colpoint1.y = entities[i].yp; SDL_Point colpoint2; colpoint2.x = entities[j].xp; colpoint2.y = entities[j].yp; int drawframe1 = entities[i].collisiondrawframe; int drawframe2 = entities[j].drawframe; std::vector& spritesvec = graphics.flipmode ? graphics.flipsprites_surf : graphics.sprites_surf; if (INBOUNDS_VEC(drawframe1, spritesvec) && INBOUNDS_VEC(drawframe2, spritesvec) && graphics.Hitest(spritesvec[drawframe1], colpoint1, spritesvec[drawframe2], colpoint2)) { //Do the collision stuff game.deathseq = 30; game.scmhurt = scm; } } else { //Ok, then we just assume a normal bounding box collision game.deathseq = 30; game.scmhurt = scm; } } break; case 2: //Moving platforms if (entities[j].behave >= 8 && entities[j].behave < 10) { //We don't want conveyors, moving platforms only break; } if (entitycollide(i, j)) { //Disable collision temporarily so we don't push the person out! //Collision will be restored at end of platform update loop in gamelogic disableblockat(entities[j].xp, entities[j].yp); } break; case 3: //Entity to entity if(entities[j].onentity>0) { if (entitycollide(i, j)) entities[j].state = entities[j].onentity; } break; case 4: //Person vs horizontal line! if(game.deathseq==-1) { //Here we compare the person'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(Sound_GRAVITYLINE); 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; } } } break; case 5: //Person vs vertical gravity/warp line! if(game.deathseq==-1) { if(entities[j].onentity>0) { if (entityvlinecollide(i, j)) { entities[j].state = entities[j].onentity; entities[j].life = 4; } } } break; case 6: //Person versus crumbly blocks! Special case if (entities[j].onentity > 0) { //ok; only check the actual collision if they're in a close proximity int 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; } } } break; case 7: // Person versus horizontal warp line, pre-2.1 if (GlitchrunnerMode_less_than_or_equal(Glitchrunner2_0) && game.deathseq == -1 && entities[j].onentity > 0 && entityhlinecollide(i, j)) { entities[j].state = entities[j].onentity; } break; } } void entityclass::stuckprevention(int t) { if (!INBOUNDS_VEC(t, entities)) { vlog_error("stuckprevention() out-of-bounds!"); return; } // Can't have this entity (player or supercrewmate) being stuck... if (!testwallsx(t, entities[t].xp, entities[t].yp, true)) { // Let's try to get out... if (game.gravitycontrol == 0) { entities[t].yp -= 3; } else { entities[t].yp += 3; } } } ================================================ FILE: desktop_version/src/Entity.h ================================================ #ifndef ENTITY_H #define ENTITY_H #include #include #include #include "BlockV.h" #include "Ent.h" #include "Game.h" #include "Maths.h" enum { BLOCK = 0, TRIGGER = 1, DAMAGE = 2, DIRECTIONAL = 3, SAFE = 4, ACTIVITY = 5 }; class entityclass { public: void init(void); void resetallflags(void); void fatal_top(void) { createblock(DAMAGE, -8, -8, 384, 16); } void fatal_bottom(void) { createblock(DAMAGE, -8, 224, 384, 16); } void fatal_left(void) { createblock(DAMAGE, -8, -8, 16, 260); } void fatal_right(void) { createblock(DAMAGE, 312, -8, 16, 260); } int swncolour(int t); void swnenemiescol(int t); void gravcreate(int ypos, int dir, int xoff = 0, int yoff = 0); void generateswnwave(int t); void createblock(int t, int xp, int yp, int w, int h, int trig = 0, const std::string& script = "", bool custom = false); bool disableentity(int t); void removeallblocks(void); void disableblock(int t); void disableblockat(int x, int y); void moveblockto(int x1, int y1, int x2, int y2, int w, int h); void removetrigger(int t); void copylinecross(std::vector& linecrosskludge, int t); void revertlinecross(std::vector& linecrosskludge, int t, int s); void createentity(int xp, int yp, int t, int meta1, int meta2, int p1, int p2, int p3, int p4); void createentity(int xp, int yp, int t, int meta1, int meta2, int p1, int p2); void createentity(int xp, int yp, int t, int meta1, int meta2, int p1); void createentity(int xp, int yp, int t, int meta1, int meta2); void createentity(int xp, int yp, int t, int meta1); void createentity(int xp, int yp, int t); bool updateentities(int i); void animateentities(int i); void animatehumanoidcollision(int i); int getcompanion(void); int getplayer(void); int getscm(void); int getlineat(int t); int getcrewman(int t); int getcustomcrewman(int t); int getteleporter(void); bool entitycollide(int a, int b); bool checkdamage(bool scm = false); int checktrigger(int* block_idx); int checkactivity(void); bool checkplatform(const SDL_Rect& temprect, int* px, int* py); bool checkblocks(const SDL_Rect& temprect, float dx, float dy, int dr, bool skipdirblocks); bool checktowerspikes(int t); bool checkwall(bool invincible, const SDL_Rect& temprect, float dx, float dy, int dr, bool skipblocks, bool skipdirblocks); bool checkwall(bool invincible, const SDL_Rect& temprect); float hplatformat(int px, int py); 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(int t); float entitycollideplatformfloor(int t); bool entitycollidefloor(int t); bool entitycollideroof(int t); bool testwallsx(int t, int tx, int ty, bool skipdirblocks); bool testwallsy(int t, int tx, int ty); void applyfriction(int t, float xrate, float yrate); void updateentitylogic(int t); void entitymapcollision(int t); void movingplatformfix(int t, int j); void entitycollisioncheck(void); void collisioncheck(int i, int j, bool scm = false); void stuckprevention(int t); std::vector entities; int k; std::vector blocks; bool flags[100]; bool collect[100]; bool customcollect[100]; int platformtile; bool vertplatforms, horplatforms; // :( bool nearelephant, upsetmode; int upset; //Trophy Text int trophytext, trophytype; int oldtrophytext; //Secret lab scripts int altstates; //Custom stuff int customenemy; int customplatformtile; bool customwarpmode, customwarpmodevon, customwarpmodehon; std::string customscript; bool customcrewmoods[Game::numcrew]; std::string customactivitycolour; std::string customactivitytext; int customactivitypositiony; }; #ifndef OBJ_DEFINITION extern entityclass obj; #endif #endif /* ENTITY_H */ ================================================ FILE: desktop_version/src/Enums.h ================================================ #ifndef ENUMGAME_H #define ENUMGAME_H enum GameGamestate { GAMEMODE, TITLEMODE, MAPMODE, TELEPORTERMODE, GAMECOMPLETE, GAMECOMPLETE2, EDITORMODE, PRELOADER }; #endif /* ENUMGAME_H */ ================================================ FILE: desktop_version/src/Exit.h ================================================ #ifndef VVV_EXIT_H #define VVV_EXIT_H #include SDL_NORETURN void VVV_exit(const int exit_code); #endif /* VVV_EXIT_H */ ================================================ FILE: desktop_version/src/FileSystemUtils.cpp ================================================ #include "FileSystemUtils.h" #include #include #include #include #include #include "Alloc.h" #include "BinaryBlob.h" #include "Constants.h" #include "Exit.h" #include "Graphics.h" #include "Localization.h" #include "Maths.h" #include "Screen.h" #include "Unused.h" #include "UtilityClass.h" #include "VFormat.h" #include "Vlogging.h" /* These are needed for PLATFORM_* crap */ #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include #include static int mkdir(char* path, int mode) { WCHAR utf16_path[MAX_PATH]; MultiByteToWideChar(CP_UTF8, 0, path, -1, utf16_path, MAX_PATH); return CreateDirectoryW(utf16_path, NULL); } #elif defined(__EMSCRIPTEN__) #include #include #include #define MAX_PATH PATH_MAX #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) || defined(__DragonFly__) || defined(__unix__) #include #include #define MAX_PATH PATH_MAX #endif static bool isInit = false; static const char* pathSep = NULL; static char* basePath = NULL; static char writeDir[MAX_PATH] = {'\0'}; static char saveDir[MAX_PATH] = {'\0'}; static char levelDir[MAX_PATH] = {'\0'}; static char screenshotDir[MAX_PATH] = {'\0'}; static char mainLangDir[MAX_PATH] = {'\0'}; static bool isMainLangDirFromRepo = false; static bool doesLangDirExist = false; static bool doesFontsDirExist = false; static char assetDir[MAX_PATH] = {'\0'}; static char virtualMountPath[MAX_PATH] = {'\0'}; static int PLATFORM_getOSDirectory(char* output, const size_t output_size); static void* bridged_malloc(PHYSFS_uint64 size) { return SDL_malloc(size); } static void* bridged_realloc(void* ptr, PHYSFS_uint64 size) { return SDL_realloc(ptr, size); } static const PHYSFS_Allocator allocator = { NULL, NULL, bridged_malloc, bridged_realloc, SDL_free }; #ifndef __ANDROID__ static bool mount_pre_datazip( char* out_path, const char* real_dirname, const char* mount_point, const char* user_path ) { /* Find and mount a directory (like the main language directory) in front of data.zip. * This directory, if not user-supplied, can be either next to data.zip, * or otherwise in desktop_version/ if that's found in the base path. * * out_path is assumed to be either NULL, or MAX_PATH long. If it isn't, boom */ if (user_path != NULL) { if (PHYSFS_mount(user_path, mount_point, 1)) { if (out_path != NULL) { SDL_strlcpy(out_path, user_path, MAX_PATH); } return true; } vlog_warn("User-supplied %s directory is invalid!", real_dirname); return false; } /* Try to detect the directory, it's next to data.zip in distributed builds */ bool dir_found = false; char buffer[MAX_PATH]; SDL_snprintf(buffer, sizeof(buffer), "%s%s%s", basePath, real_dirname, pathSep ); if (PHYSFS_mount(buffer, mount_point, 1)) { dir_found = true; } else { /* If you're a developer, you probably want to use the language files/fonts * from the repo, otherwise it's a pain to keep everything in sync. * And who knows how deep in build folders our binary is. */ size_t buf_reserve = SDL_strlen(real_dirname)+1; SDL_strlcpy(buffer, basePath, sizeof(buffer)-buf_reserve); char needle[32]; SDL_snprintf(needle, sizeof(needle), "%sdesktop_version%s", pathSep, pathSep ); /* We want the last match */ char* match_last = NULL; char* match = buffer; while ((match = SDL_strstr(match, needle))) { match_last = match; match = &match[1]; } if (match_last != NULL) { /* strstr only gives us a pointer and not a remaining buffer length, but that's * why we pretended the buffer was `buf_reserve` chars shorter than it was! */ SDL_strlcpy(&match_last[SDL_strlen(needle)], real_dirname, buf_reserve); SDL_strlcat(buffer, pathSep, sizeof(buffer)); if (PHYSFS_mount(buffer, mount_point, 1)) { dir_found = true; if (SDL_strcmp(real_dirname, "lang") == 0) { loc::show_translator_menu = true; isMainLangDirFromRepo = true; } } } } if (dir_found) { if (out_path != NULL) { SDL_strlcpy(out_path, buffer, MAX_PATH); } } else { vlog_warn("Cannot find the %s directory anywhere!", real_dirname); } return dir_found; } #endif int FILESYSTEM_init(char *argvZero, char* baseDir, char *assetsPath, char* langDir, char* fontsDir) { char output[MAX_PATH]; pathSep = PHYSFS_getDirSeparator(); PHYSFS_setAllocator(&allocator); // Yes, this is actually how you're supposed to use PhysFS on Android. #ifdef __ANDROID__ PHYSFS_AndroidInit androidInit; androidInit.jnienv = SDL_AndroidGetJNIEnv(); androidInit.context = SDL_AndroidGetActivity(); argvZero = (char*) &androidInit; #endif if (!PHYSFS_init(argvZero)) { vlog_error( "Unable to initialize PhysFS: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return 0; } PHYSFS_permitSymbolicLinks(1); /* Determine the OS user directory */ if (baseDir && baseDir[0] != '\0') { /* We later append to this path and assume it ends in a slash */ bool trailing_pathsep = SDL_strcmp(baseDir + SDL_strlen(baseDir) - SDL_strlen(pathSep), pathSep) == 0; SDL_snprintf(output, sizeof(output), "%s%s", baseDir, !trailing_pathsep ? pathSep : "" ); } else if (!PLATFORM_getOSDirectory(output, sizeof(output))) { return 0; } /* Mount our base user directory */ SDL_strlcpy(writeDir, output, sizeof(writeDir)); if (!PHYSFS_mount(writeDir, NULL, 0)) { vlog_error( "Could not mount %s: %s", writeDir, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return 0; } if (!PHYSFS_setWriteDir(writeDir)) { vlog_error( "Could not set write dir to %s: %s", writeDir, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return 0; } vlog_info("Base directory: %s", writeDir); /* Store full save directory */ SDL_snprintf(saveDir, sizeof(saveDir), "%s%s%s", writeDir, "saves", pathSep ); mkdir(saveDir, 0777); vlog_info("Save directory: %s", saveDir); /* Store full level directory */ SDL_snprintf(levelDir, sizeof(levelDir), "%s%s%s", writeDir, "levels", pathSep ); mkdir(levelDir, 0777); vlog_info("Level directory: %s", levelDir); /* Store full screenshot directory */ SDL_snprintf(screenshotDir, sizeof(screenshotDir), "%s%s%s", writeDir, "screenshots", pathSep ); mkdir(screenshotDir, 0777); vlog_info("Screenshot directory: %s", screenshotDir); /* We also need to make the subdirectories */ { char temp[MAX_PATH]; SDL_snprintf(temp, sizeof(temp), "%s%s%s", screenshotDir, "1x", pathSep ); mkdir(temp, 0777); SDL_snprintf(temp, sizeof(temp), "%s%s%s", screenshotDir, "2x", pathSep ); mkdir(temp, 0777); } basePath = SDL_GetBasePath(); if (basePath == NULL) { vlog_warn("Unable to determine base path, falling back to current directory"); basePath = SDL_strdup("./"); } #ifdef __ANDROID__ // This is kind of a mess, but that's not really solvable unless we expect the user to download the data.zip manually. if (!PHYSFS_mount(PHYSFS_getBaseDir(), "/apk", 1)) { vlog_error("Failed to mount apk!"); return 0; } PHYSFS_File* repoZip = PHYSFS_openRead("/apk/assets/repo.zip"); if (repoZip && PHYSFS_mountHandle(repoZip, "repo.zip", NULL, 1)) { doesLangDirExist = true; doesFontsDirExist = true; } PHYSFS_File* dataZip = PHYSFS_openRead("/apk/assets/data.zip"); if (!dataZip || !PHYSFS_mountHandle(dataZip, "data.zip", NULL, 1)) #else doesLangDirExist = mount_pre_datazip(mainLangDir, "lang", "lang/", langDir); vlog_info("Languages directory: %s", mainLangDir); doesFontsDirExist = mount_pre_datazip(NULL, "fonts", "graphics/", fontsDir); /* Mount the stock content last */ if (assetsPath) { SDL_strlcpy(output, assetsPath, sizeof(output)); } else { SDL_snprintf(output, sizeof(output), "%s%s", basePath, "data.zip" ); } if (!PHYSFS_mount(output, NULL, 1)) #endif { vlog_error("Error: data.zip missing!"); vlog_error("You do not have data.zip!"); vlog_error("Grab it from your purchased copy of the game,"); vlog_error("or get it from the free Make and Play Edition."); vlog_error("https://thelettervsixtim.es/makeandplay/"); SDL_MessageBoxData messagebox; messagebox.flags = SDL_MESSAGEBOX_ERROR; messagebox.window = NULL; messagebox.title = "data.zip missing!"; messagebox.message = "You do not have data.zip!" "\n\nGrab it from your purchased copy of the game," "\nor get it from the free Make and Play Edition."; messagebox.numbuttons = 2; SDL_MessageBoxButtonData buttons[2]; buttons[0].flags = SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT; buttons[0].flags |= SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT; buttons[0].buttonid = 0; buttons[0].text = "OK"; buttons[1].flags = 0; buttons[1].buttonid = 1; buttons[1].text = "Open Download Page"; messagebox.buttons = buttons; messagebox.colorScheme = NULL; int clicked = 0; SDL_ShowMessageBox(&messagebox, &clicked); if (clicked == 1) { SDL_OpenURL("https://thelettervsixtim.es/makeandplay/"); } VVV_exit(1); return 0; } SDL_snprintf(output, sizeof(output), "%s%s", basePath, "gamecontrollerdb.txt"); if (SDL_GameControllerAddMappingsFromFile(output) < 0) { vlog_info("gamecontrollerdb.txt not found!"); } isInit = true; return 1; } bool FILESYSTEM_isInit(void) { return isInit; } static unsigned char* stdin_buffer = NULL; static size_t stdin_length = 0; void FILESYSTEM_deinit(void) { if (PHYSFS_isInit()) { PHYSFS_deinit(); } VVV_free(stdin_buffer); VVV_free(basePath); isInit = false; } char *FILESYSTEM_getUserSaveDirectory(void) { return saveDir; } char *FILESYSTEM_getUserLevelDirectory(void) { return levelDir; } char *FILESYSTEM_getUserMainLangDirectory(void) { return mainLangDir; } bool FILESYSTEM_isMainLangDirFromRepo(void) { return isMainLangDirFromRepo; } bool FILESYSTEM_doesLangDirExist(void) { return doesLangDirExist; } bool FILESYSTEM_doesFontsDirExist(void) { return doesFontsDirExist; } bool FILESYSTEM_restoreWriteDir(void) { return PHYSFS_setWriteDir(writeDir); } bool FILESYSTEM_setLangWriteDir(void) { const char* realLangDir = PHYSFS_getRealDir("lang"); if (realLangDir == NULL || SDL_strcmp(mainLangDir, realLangDir) != 0) { vlog_error("Not setting language write dir: %s overrules %s when loading", realLangDir, mainLangDir ); return false; } if (!PHYSFS_setWriteDir(mainLangDir)) { FILESYSTEM_restoreWriteDir(); return false; } return true; } bool FILESYSTEM_isFileType(const char* filename, PHYSFS_FileType filetype) { PHYSFS_Stat stat; bool success = PHYSFS_stat(filename, &stat); if (!success) { vlog_error( "Could not stat file: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return false; } /* We unfortunately cannot follow symlinks (PhysFS limitation). * Let the caller deal with them. */ return stat.filetype == filetype || stat.filetype == PHYSFS_FILETYPE_SYMLINK; } bool FILESYSTEM_isFile(const char* filename) { return FILESYSTEM_isFileType(filename, PHYSFS_FILETYPE_REGULAR); } bool FILESYSTEM_isDirectory(const char* filename) { return FILESYSTEM_isFileType(filename, PHYSFS_FILETYPE_DIRECTORY); } bool FILESYSTEM_isMounted(const char* filename) { return PHYSFS_getMountPoint(filename) != NULL; } static bool FILESYSTEM_exists(const char *fname) { return PHYSFS_exists(fname); } static void generateBase36(char* string, const size_t string_size) { size_t i; for (i = 0; i < string_size - 1; ++i) { /* a-z0-9 */ char randchar = fRandom() * 35; if (randchar < 26) { randchar += 'a'; } else { randchar -= 26; randchar += '0'; } string[i] = randchar; } string[string_size - 1] = '\0'; } static void generateVirtualMountPath(char* path, const size_t path_size) { char random_str[6 + 1]; generateBase36(random_str, sizeof(random_str)); SDL_snprintf( path, path_size, ".vvv-mnt-virtual-%s/custom-assets/", random_str ); } static char levelDirError[6*SCREEN_WIDTH_CHARS + 1] = {'\0'}; static bool levelDirHasError = false; bool FILESYSTEM_levelDirHasError(void) { return levelDirHasError; } void FILESYSTEM_clearLevelDirError(void) { levelDirHasError = false; } const char* FILESYSTEM_getLevelDirError(void) { return levelDirError; } void FILESYSTEM_setLevelDirError(const char* text, const char* args_index, ...) { levelDirHasError = true; va_list list; va_start(list, args_index); vformat_buf_valist(levelDirError, sizeof(levelDirError), text, args_index, list); va_end(list); vlog_error("%s", levelDirError); } static bool FILESYSTEM_mountAssetsFrom(const char *fname) { const char* real_dir = PHYSFS_getRealDir(fname); char path[MAX_PATH]; if (real_dir == NULL) { FILESYSTEM_setLevelDirError( loc::gettext("Could not mount {path}: real directory doesn't exist"), "path:str", fname ); return false; } SDL_snprintf(path, sizeof(path), "%s/%s", real_dir, fname); generateVirtualMountPath(virtualMountPath, sizeof(virtualMountPath)); if (!PHYSFS_mount(path, virtualMountPath, 0)) { vlog_error( "Error mounting %s: %s", fname, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return false; } SDL_strlcpy(assetDir, path, sizeof(assetDir)); return true; } void FILESYSTEM_loadZip(const char* filename) { PHYSFS_File* zip = PHYSFS_openRead(filename); if (zip == NULL) { vlog_error( "Could not read zip %s: %s", filename, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); } if (!PHYSFS_mountHandle(zip, filename, "levels", 1)) { vlog_error( "Could not mount %s: %s", filename, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); } } bool FILESYSTEM_mountAssets(const char* path) { const char* real_dir = PHYSFS_getRealDir(path); if (real_dir != NULL && SDL_strncmp(real_dir, "levels/", sizeof("levels/") - 1) == 0 && endsWith(real_dir, ".zip")) { /* This is a level zip */ vlog_info("Asset directory is .zip at %s", real_dir); if (!FILESYSTEM_mountAssetsFrom(real_dir)) { return false; } MAYBE_FAIL(graphics.reloadresources()); } else { /* If it's not a zip, look for a level folder */ char filename[MAX_PATH]; char virtual_path[MAX_PATH]; VVV_between(path, "levels/", filename, ".vvvvvv"); SDL_snprintf( virtual_path, sizeof(virtual_path), "levels/%s/", filename ); if (FILESYSTEM_exists(virtual_path)) { vlog_info("Asset directory exists at %s", virtual_path); if (!FILESYSTEM_mountAssetsFrom(virtual_path)) { return false; } MAYBE_FAIL(graphics.reloadresources()); } else { /* Wasn't a level zip or folder! */ vlog_debug("Asset directory does not exist"); } } return true; fail: FILESYSTEM_unmountAssets(); return false; } void FILESYSTEM_unmountAssets(void) { if (assetDir[0] != '\0') { vlog_info("Unmounting %s", assetDir); PHYSFS_unmount(assetDir); assetDir[0] = '\0'; graphics.reloadresources(); } else { vlog_debug("Cannot unmount when no asset directory is mounted"); } } static void getMountedPath( char* buffer, const size_t buffer_size, const char* filename ) { const char* path; const bool assets_mounted = assetDir[0] != '\0'; char mounted_path[MAX_PATH]; if (assets_mounted) { SDL_snprintf( mounted_path, sizeof(mounted_path), "%s%s", virtualMountPath, filename ); } if (assets_mounted && PHYSFS_exists(mounted_path)) { path = mounted_path; } else { path = filename; } SDL_strlcpy(buffer, path, buffer_size); } bool FILESYSTEM_isAssetMounted(const char* filename) { const char* realDir; char path[MAX_PATH]; /* Fast path */ if (assetDir[0] == '\0') { return false; } getMountedPath(path, sizeof(path), filename); realDir = PHYSFS_getRealDir(path); if (realDir == NULL) { return false; } return SDL_strcmp(assetDir, realDir) == 0; } bool FILESYSTEM_areAssetsInSameRealDir(const char* filenameA, const char* filenameB) { char pathA[MAX_PATH]; char pathB[MAX_PATH]; getMountedPath(pathA, sizeof(pathA), filenameA); getMountedPath(pathB, sizeof(pathB), filenameB); const char* realDirA = PHYSFS_getRealDir(pathA); const char* realDirB = PHYSFS_getRealDir(pathB); /* Both NULL, or both the same pointer? */ if (realDirA == realDirB) { return true; } if (realDirA == NULL || realDirB == NULL) { return false; } return SDL_strcmp(realDirA, realDirB) == 0; } static void load_stdin(void) { size_t pos = 0; /* A .vvvvvv file with nothing is at least 140K... * initial size of 1K shouldn't hurt. */ #define INITIAL_SIZE 1024 size_t alloc_size = INITIAL_SIZE; stdin_buffer = (unsigned char*) SDL_malloc(INITIAL_SIZE); #undef INITIAL_SIZE if (stdin_buffer == NULL) { VVV_exit(1); } while (true) { int ch = fgetc(stdin); bool end = ch == EOF; if (end) { /* Always add null terminator. */ ch = '\0'; } if (pos == alloc_size) { unsigned char *tmp; alloc_size *= 2; tmp = (unsigned char*) SDL_realloc((void*) stdin_buffer, alloc_size); if (tmp == NULL) { VVV_exit(1); } stdin_buffer = tmp; } stdin_buffer[pos] = ch; ++pos; if (end) { break; } } stdin_length = pos - 1; } static PHYSFS_sint64 read_bytes( const char* name, PHYSFS_File* handle, void* buffer, const PHYSFS_uint64 length ) { const PHYSFS_sint64 bytes_read = PHYSFS_readBytes(handle, buffer, length); if (bytes_read < 0) { vlog_error( "Could not read bytes from file %s: %s", name, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); } else if ((unsigned) bytes_read != length) { const char* reason; if (PHYSFS_eof(handle)) { reason = "Unexpected EOF"; } else { reason = PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()); } vlog_warn( "Partially read file %s: Expected %lli bytes, got %lli: %s", name, length, bytes_read, reason ); } return bytes_read; } bool FILESYSTEM_saveFile(const char* name, const unsigned char* data, const size_t len) { if (!isInit) { vlog_warn("Filesystem not initialized! Not writing just to be safe."); return false; } PHYSFS_File* handle = PHYSFS_openWrite(name); if (handle == NULL) { vlog_error( "Could not open PHYSFS handle for %s: %s", name, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return false; } PHYSFS_sint64 bytes_written = PHYSFS_writeBytes(handle, data, len); if ((size_t) bytes_written != len) { vlog_warn("%s: Number of bytes written is not as expected", name); } int success = PHYSFS_close(handle); if (success == 0) { vlog_error("%s: Could not close handle", name); } return true; } void FILESYSTEM_loadFileToMemory( const char *name, unsigned char **mem, size_t *len ) { PHYSFS_File *handle; PHYSFS_sint64 length; PHYSFS_sint64 bytes_read; if (name == NULL || mem == NULL) { goto fail; } /* FIXME: Dumb hack to use `special/stdin.vvvvvv` here... * This is also checked elsewhere... grep for `special/stdin`! */ if (SDL_strcmp(name, "levels/special/stdin.vvvvvv") == 0) { // this isn't *technically* necessary when piping directly from a file, but checking for that is annoying if (stdin_buffer == NULL) { load_stdin(); } *mem = (unsigned char*) SDL_malloc(stdin_length + 1); /* + 1 for null */ if (*mem == NULL) { VVV_exit(1); } if (len != NULL) { *len = stdin_length; } SDL_memcpy((void*) *mem, (void*) stdin_buffer, stdin_length + 1); return; } handle = PHYSFS_openRead(name); if (handle == NULL) { vlog_debug( "Could not read file %s: %s", name, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); goto fail; } length = PHYSFS_fileLength(handle); if (len != NULL) { if (length < 0) { length = 0; } *len = length; } *mem = (unsigned char *) SDL_calloc(length + 1, 1); if (*mem == NULL) { VVV_exit(1); } bytes_read = read_bytes(name, handle, *mem, length); if (bytes_read < 0) { VVV_free(*mem); } PHYSFS_close(handle); return; fail: if (mem != NULL) { *mem = NULL; } if (len != NULL) { *len = 0; } } void FILESYSTEM_loadAssetToMemory( const char* name, unsigned char** mem, size_t* len ) { char path[MAX_PATH]; getMountedPath(path, sizeof(path), name); FILESYSTEM_loadFileToMemory(path, mem, len); } bool FILESYSTEM_loadBinaryBlob(binaryBlob* blob, const char* filename) { PHYSFS_sint64 size; PHYSFS_File* handle; int valid, offset; size_t i; char path[MAX_PATH]; if (blob == NULL || filename == NULL) { return false; } getMountedPath(path, sizeof(path), filename); handle = PHYSFS_openRead(path); if (handle == NULL) { vlog_debug( "Could not read binary blob %s: %s", filename, PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return false; } size = PHYSFS_fileLength(handle); read_bytes( filename, handle, &blob->m_headers, sizeof(blob->m_headers) ); valid = 0; offset = sizeof(blob->m_headers); for (i = 0; i < SDL_arraysize(blob->m_headers); ++i) { resourceheader* header = &blob->m_headers[i]; char** memblock = &blob->m_memblocks[i]; /* Name can be stupid, just needs to be terminated */ static const size_t last_char = sizeof(header->name) - 1; if (header->name[last_char] != '\0') { vlog_warn( "%s: Name of header %li is not null-terminated", filename, i ); } header->name[last_char] = '\0'; if (header->valid & ~0x1 || !header->valid) { if (header->valid & ~0x1) { vlog_error( "%s: Header %li's 'valid' value is invalid", filename, i ); } goto fail; /* Must be EXACTLY 1 or 0 */ } if (header->size < 1) { vlog_error( "%s: Header %li's size value is zero or negative", filename, i ); goto fail; /* Must be nonzero and positive */ } if (offset + header->size > size) { /* Not an error, VVVVVV 2.2 and below handled it gracefully */ vlog_warn( "%s: Header %li's size value goes past end of file", filename, i ); } PHYSFS_seek(handle, offset); *memblock = (char*) SDL_malloc(header->size); if (*memblock == NULL) { VVV_exit(1); /* Oh god we're out of memory, just bail */ } offset += header->size; header->size = read_bytes(filename, handle, *memblock, header->size); valid += 1; continue; fail: header->valid = false; } PHYSFS_close(handle); if (valid == 0) { return false; } vlog_debug("The complete reloaded file size: %lli", size); for (i = 0; i < SDL_arraysize(blob->m_headers); ++i) { const resourceheader* header = &blob->m_headers[i]; if (!header->valid) { continue; } vlog_debug("%s unpacked", header->name); } return true; } bool FILESYSTEM_saveTiXml2Document(const char *name, tinyxml2::XMLDocument& doc, bool sync /*= true*/) { if (!isInit) { vlog_warn("Filesystem not initialized! Not writing just to be safe."); return false; } /* XMLDocument.SaveFile doesn't account for Unicode paths, PHYSFS does */ tinyxml2::XMLPrinter printer; doc.Print(&printer); PHYSFS_File* handle = PHYSFS_openWrite(name); if (handle == NULL) { return false; } PHYSFS_writeBytes(handle, printer.CStr(), printer.CStrSize() - 1); // subtract one because CStrSize includes terminating null PHYSFS_close(handle); #ifdef __EMSCRIPTEN__ if (sync) { EM_ASM(FS.syncfs(false, function(err) { if (err) { console.warn("Error saving:", err); alert("Error saving. Check console for more information."); } })); } #else UNUSED(sync); #endif return true; } bool FILESYSTEM_loadTiXml2Document(const char *name, tinyxml2::XMLDocument& doc) { /* XMLDocument.LoadFile doesn't account for Unicode paths, PHYSFS does */ unsigned char *mem; FILESYSTEM_loadFileToMemory(name, &mem, NULL); if (mem == NULL) { return false; } doc.Parse((const char*) mem); VVV_free(mem); return true; } bool FILESYSTEM_loadAssetTiXml2Document(const char *name, tinyxml2::XMLDocument& doc) { /* Same as FILESYSTEM_loadTiXml2Document except for possible custom assets */ unsigned char *mem; FILESYSTEM_loadAssetToMemory(name, &mem, NULL); if (mem == NULL) { return false; } doc.Parse((const char*) mem); VVV_free(mem); return true; } struct CallbackWrapper { void (*callback)(const char* filename); }; static PHYSFS_EnumerateCallbackResult enumerateCallback( void* data, const char* origdir, const char* filename ) { struct CallbackWrapper* wrapper = (struct CallbackWrapper*) data; void (*callback)(const char*) = wrapper->callback; char builtLocation[MAX_PATH]; SDL_snprintf( builtLocation, sizeof(builtLocation), "%s/%s", origdir, filename ); callback(builtLocation); return PHYSFS_ENUM_OK; } void FILESYSTEM_enumerateLevelDirFileNames( void (*callback)(const char* filename) ) { int success; struct CallbackWrapper wrapper = {callback}; success = PHYSFS_enumerate("levels", enumerateCallback, (void*) &wrapper); if (success == 0) { vlog_error( "Could not get list of levels: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); } } const char* FILESYSTEM_enumerate(const char* folder, EnumHandle* handle) { /* List all files in a folder with PHYSFS_enumerateFiles. * * Doing it this way means we can decide and filter * what's in the lists (in wrapper functions). * * Called like this: * * EnumHandle handle = {}; * const char* item; * while ((item = FILESYSTEM_enumerate("graphics", &handle)) != NULL) * { * puts(item); * } * FILESYSTEM_freeEnumerate(&handle); */ if (handle->physfs_list == NULL) { // First iteration, set things up handle->physfs_list = PHYSFS_enumerateFiles(folder); handle->_item = handle->physfs_list; } /* Return the next item, and increment the pointer. * (once we return NULL, handle->_item points to 1 past end of array) */ return *(handle->_item++); } const char* FILESYSTEM_enumerateAssets(const char* folder, EnumHandle* handle) { /* This function enumerates ONLY level-specific assets. * If there are only global assets and no level-specific ones, * we want an empty list. * * This function is called the same way as FILESYSTEM_enumerate, see above. */ if (!FILESYSTEM_isAssetMounted(folder)) { return NULL; } char mounted_path[MAX_PATH]; getMountedPath(mounted_path, sizeof(mounted_path), folder); const char* item; while ((item = FILESYSTEM_enumerate(mounted_path, handle)) != NULL) { char full_name[128]; SDL_snprintf(full_name, sizeof(full_name), "%s/%s", mounted_path, item); if (FILESYSTEM_isFile(full_name) && item[0] != '.') { return item; } } return NULL; } const char* FILESYSTEM_enumerateLanguageCodes(EnumHandle* handle) { /* This function enumerates all the language codes. * * This function is called the same way as FILESYSTEM_enumerate, see above. */ const char* item; while ((item = FILESYSTEM_enumerate("lang", handle)) != NULL) { char full_name[128]; SDL_snprintf(full_name, sizeof(full_name), "lang/%s", item); if (FILESYSTEM_isDirectory(full_name) && item[0] != '.') { return item; } } return NULL; } void FILESYSTEM_freeEnumerate(EnumHandle* handle) { /* Call this function after enumerating with FILESYSTEM_enumerate or friends. */ if (handle == NULL) { return; } PHYSFS_freeList(handle->physfs_list); } static int PLATFORM_getOSDirectory(char* output, const size_t output_size) { #ifdef _WIN32 /* This block is here for compatibility, do not touch it! */ WCHAR utf16_path[MAX_PATH]; HRESULT retcode = SHGetFolderPathW( NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, utf16_path ); int num_bytes; if (FAILED(retcode)) { vlog_error( "Could not get OS directory: SHGetFolderPathW returned 0x%08x", retcode ); return 0; } num_bytes = WideCharToMultiByte( CP_UTF8, 0, utf16_path, -1, output, output_size, NULL, NULL ); if (num_bytes == 0) { vlog_error( "Could not get OS directory: UTF-8 conversion failed with %d", GetLastError() ); return 0; } SDL_strlcat(output, "\\VVVVVV\\", MAX_PATH); mkdir(output, 0777); return 1; #elif defined(__ANDROID__) const char* externalStoragePath = SDL_AndroidGetExternalStoragePath(); if (externalStoragePath == NULL) { vlog_error( "Could not get OS directory: %s", SDL_GetError() ); return 0; } SDL_snprintf(output, output_size, "%s/", externalStoragePath); return 1; #elif TARGET_OS_IPHONE // (ab)use SDL APIs to get the path to the Documents folder without needing Objective-C const char* prefsPath = SDL_GetPrefPath("", ""); if (prefsPath == NULL) { vlog_error( "Could not get OS directory: %s", SDL_GetError() ); return 0; } SDL_snprintf(output, output_size, "%s/../../Documents/", prefsPath); return 1; #else const char* prefDir = PHYSFS_getPrefDir("distractionware", "VVVVVV"); if (prefDir == NULL) { vlog_error( "Could not get OS directory: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); return 0; } SDL_strlcpy(output, prefDir, output_size); return 1; #endif } bool FILESYSTEM_openDirectoryEnabled(void) { return !gameScreen.isForcedFullscreen(); } #if defined(__EMSCRIPTEN__) bool FILESYSTEM_openDirectory(const char *dname) { return false; } #else bool FILESYSTEM_openDirectory(const char *dname) { char url[MAX_PATH]; SDL_snprintf(url, sizeof(url), "file://%s", dname); if (SDL_OpenURL(url) == -1) { vlog_error("Error opening directory: %s", SDL_GetError()); return false; } return true; } #endif bool FILESYSTEM_delete(const char *name) { return PHYSFS_delete(name) != 0; } static void levelSaveCallback(const char* filename) { if (endsWith(filename, ".vvvvvv.vvv")) { if (!FILESYSTEM_delete(filename)) { vlog_error("Error deleting %s", filename); } } } void FILESYSTEM_deleteLevelSaves(void) { int success; struct CallbackWrapper wrapper = {levelSaveCallback}; success = PHYSFS_enumerate( "saves", enumerateCallback, (void*) &wrapper ); if (success == 0) { vlog_error( "Could not enumerate saves/: %s", PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()) ); } } ================================================ FILE: desktop_version/src/FileSystemUtils.h ================================================ #ifndef FILESYSTEMUTILS_H #define FILESYSTEMUTILS_H /* Forward declaration */ class binaryBlob; #include // Forward declaration, including the entirety of tinyxml2.h across all files this file is included in is unnecessary namespace tinyxml2 { class XMLDocument; } int FILESYSTEM_init(char *argvZero, char* baseDir, char* assetsPath, char* langDir, char* fontsDir); bool FILESYSTEM_isInit(void); void FILESYSTEM_deinit(void); char *FILESYSTEM_getUserSaveDirectory(void); char *FILESYSTEM_getUserLevelDirectory(void); char *FILESYSTEM_getUserMainLangDirectory(void); bool FILESYSTEM_isMainLangDirFromRepo(void); bool FILESYSTEM_doesLangDirExist(void); bool FILESYSTEM_doesFontsDirExist(void); bool FILESYSTEM_setLangWriteDir(void); bool FILESYSTEM_restoreWriteDir(void); bool FILESYSTEM_isFile(const char* filename); bool FILESYSTEM_isMounted(const char* filename); void FILESYSTEM_loadZip(const char* filename); bool FILESYSTEM_mountAssets(const char *path); void FILESYSTEM_unmountAssets(void); bool FILESYSTEM_isAssetMounted(const char* filename); bool FILESYSTEM_areAssetsInSameRealDir(const char* filenameA, const char* filenameB); bool FILESYSTEM_saveFile(const char* name, const unsigned char* data, size_t len); void FILESYSTEM_loadFileToMemory(const char *name, unsigned char **mem, size_t *len); void FILESYSTEM_loadAssetToMemory( const char* name, unsigned char** mem, size_t* len ); bool FILESYSTEM_loadBinaryBlob(binaryBlob* blob, const char* filename); bool FILESYSTEM_saveTiXml2Document(const char *name, tinyxml2::XMLDocument& doc, bool sync = true); bool FILESYSTEM_loadTiXml2Document(const char *name, tinyxml2::XMLDocument& doc); bool FILESYSTEM_loadAssetTiXml2Document(const char *name, tinyxml2::XMLDocument& doc); void FILESYSTEM_enumerateLevelDirFileNames(void (*callback)(const char* filename)); struct EnumHandle { char** physfs_list; char** _item; }; const char* FILESYSTEM_enumerate(const char* folder, EnumHandle* handle); const char* FILESYSTEM_enumerateAssets(const char* folder, EnumHandle* handle); const char* FILESYSTEM_enumerateLanguageCodes(EnumHandle* handle); void FILESYSTEM_freeEnumerate(EnumHandle* handle); bool FILESYSTEM_levelDirHasError(void); void FILESYSTEM_clearLevelDirError(void); const char* FILESYSTEM_getLevelDirError(void); void FILESYSTEM_setLevelDirError(const char* text, const char* args_index, ...); bool FILESYSTEM_openDirectoryEnabled(void); bool FILESYSTEM_openDirectory(const char *dname); bool FILESYSTEM_delete(const char *name); void FILESYSTEM_deleteLevelSaves(void); #endif /* FILESYSTEMUTILS_H */ ================================================ FILE: desktop_version/src/Finalclass.cpp ================================================ #include "Finalclass.h" #include "Game.h" #include "Entity.h" #include "MakeAndPlay.h" const short* finalclass::loadlevel(int rx, int ry) { int t; t = rx + (ry * 100); const short* result; warpx = false; warpy = false; roomname_special = false; switch(t) { #if !defined(MAKEANDPLAY) case rn(50,52): { static const short contents[] = { 98,98,98,98,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, 98,98,98,98,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, 259,259,259,259,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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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(163, 32, 12, 168); // (vertical gravity line) obj.createentity(99, 32, 12, 168); // (vertical gravity line) obj.createentity(227, 32, 12, 168); // (vertical gravity line) obj.createentity(35, 32, 12, 168); // (vertical gravity line) obj.createentity(291, 32, 12, 168); // (vertical gravity line) warpx = true; roomname = "1954 World Cup Vinyl"; result = contents; break; } case rn(50,51): { static const short contents[] = { 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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(-8, 116, 11, 40); // (horizontal gravity line) obj.createentity(48, 116, 11, 184); // (horizontal gravity line) obj.createentity(32, 88, 10, 1, 51500); // (savepoint) obj.createentity(32, 128, 10, 0, 51501); // (savepoint) obj.createentity(256, 88, 10, 1, 51502); // (savepoint) obj.createentity(256, 128, 10, 0, 51503); // (savepoint) warpy = true; roomname = "The V Stooges"; result = contents; break; } case rn(49,51): { static const short contents[] = { 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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(-8, 116, 11, 40); // (horizontal gravity line) obj.createentity(288, 116, 11, 32); // (horizontal gravity line) obj.createentity(64, 116, 11, 64); // (horizontal gravity line) obj.createentity(192, 116, 11, 64); // (horizontal gravity line) warpy = true; roomname = "The Untouchables"; roomname_special = true; result = contents; break; } case rn(48,51): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(-8, 116, 11, 40); // (horizontal gravity line) obj.createentity(48, 116, 11, 224); // (horizontal gravity line) obj.createentity(288, 116, 11, 32); // (horizontal gravity line) obj.createentity(56, 88, 1, 3, 10); // Enemy obj.createentity(248-16, 128, 1, 2, 10); // Enemy obj.createentity(272, 168, 10, 0, 51480); // (savepoint) obj.createentity(32, 48, 10, 1, 51481); // (savepoint) warpy = true; roomname = "On the Waterfront"; roomname_special = true; result = contents; break; } case rn(47,51): { static const short contents[] = { 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(-8, 148, 11, 104); // (horizontal gravity line) obj.createentity(-8, 84, 11, 80); // (horizontal gravity line) obj.createentity(176, 116, 11, 144); // (horizontal gravity line) obj.createentity(128, 96, 10, 0, 51470); // (savepoint) obj.createentity(128, 56, 10, 1, 51471); // (savepoint) warpy = true; roomname = "Gvnsmoke"; roomname_special = true; result = contents; break; } case rn(46,51): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(-8, 84, 11, 328); // (horizontal gravity line) obj.createentity(-8, 148, 11, 328); // (horizontal gravity line) obj.createentity(96, 120, 1, 2, 4); // Enemy obj.createentity(144, 96, 1, 2, 4); // Enemy obj.createentity(192, 120, 1, 2, 4); // Enemy obj.createentity(240, 96, 1, 2, 4); // Enemy obj.createentity(288, 120, 1, 2, 4); // Enemy warpy = true; roomname = "Vwitched"; roomname_special = true; result = contents; break; } case rn(45,51): { static const short contents[] = { 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(248, 84, 11, 72); // (horizontal gravity line) obj.createentity(224, 148, 11, 96); // (horizontal gravity line) obj.createentity(176, 56, 10, 1, 51450); // (savepoint) obj.createentity(176, 96, 10, 0, 51451); // (savepoint) warpy = true; roomname = "Television Newsveel"; roomname_special = true; result = contents; break; } case rn(44,51): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(64+32-8, 32-16, 1, 0, 7, 0, -48, 320, 312); // Enemy, bounded obj.createentity(96+32-8, 32-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded obj.createentity(128+32-8, 32-16, 1, 0, 7, 0, -40, 320, 320); // Enemy, bounded obj.createentity(160+32-8, 32-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded obj.createentity(192+32-8, 32-16, 1, 0, 7, 0, -64, 320, 336); // Enemy, bounded obj.createentity(64+32-8, 64-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded obj.createentity(64+32-8, 96-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded obj.createentity(64+32-8, 128-16, 1, 0, 7, 0, -64, 320, 320); // Enemy, bounded obj.createentity(64+32-8, 160-16, 1, 0, 7, 0, -56, 320, 320); // Enemy, bounded obj.createentity(192+32-8, 128-16+8, 1, 0, 7, 0, -64, 320, 320); // Enemy, bounded obj.createentity(192+32-8, 160-16+8, 1, 0, 7, 0, -80, 320, 320); // Enemy, bounded obj.createentity(192+32-8, 192-16+8, 1, 0, 7, 0, -80, 320, 304); // Enemy, bounded obj.createentity(192+32-8, 192+24, 1, 0, 7, 0, -80, 320, 304); // Enemy, bounded warpy = true; roomname = "Vertigo"; result = contents; break; } case rn(43,51): { static const short contents[] = { 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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(155, 24, 12, 184); // (vertical gravity line) obj.createentity(120, 152, 1, 1, 8, 0, -56, 320, 296); // Enemy, bounded obj.createentity(104, 136, 1, 1, 8, 0, -64, 320, 296); // Enemy, bounded obj.createentity(88, 120, 1, 1, 8, 0, -56, 320, 312); // Enemy, bounded obj.createentity(72, 104, 1, 1, 8, 0, -56, 320, 296); // Enemy, bounded obj.createentity(56, 88, 1, 1, 8, 0, -48, 320, 328); // Enemy, bounded obj.createentity(176, 56, 1, 0, 8, 0, -64, 320, 288); // Enemy, bounded obj.createentity(192, 72, 1, 0, 8, 0, -48, 320, 296); // Enemy, bounded obj.createentity(208, 88, 1, 0, 8, 0, -72, 320, 296); // Enemy, bounded obj.createentity(224, 104, 1, 0, 8, 0, -56, 320, 296); // Enemy, bounded obj.createentity(240, 120, 1, 0, 8, 0, -48, 320, 296); // Enemy, bounded warpy = true; roomname = "The Voon Show"; result = contents; break; } case rn(42,51): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(168, 72, 10, 0, 51420); // (savepoint) obj.createentity(24, 60, 11, 120); // (horizontal gravity line) obj.createentity(24, 148, 11, 120); // (horizontal gravity line) warpy = true; roomname = "Rear Window"; roomname_special = true; result = contents; break; } case rn(41,51): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 740,740,218,98,220,0,0,0,0,0,218,220,218,98,98,98,98,98,98,98,98,98,220,218,98,220,740,740,740,740,740,740,740,740,740,740,740,740,740,740, }; obj.createentity(280, 120, 10, 1, 51410); // (savepoint) obj.createentity(40, 28, 11, 192); // (horizontal gravity line) obj.createentity(96, 204, 11, 88); // (horizontal gravity line) obj.createentity(144, 156, 11, 88); // (horizontal gravity line) obj.createentity(96, 92, 11, 88); // (horizontal gravity line) warpx = true; roomname = "1950 Silverstone Grand V"; result = contents; break; } case rn(41,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(264, 168, 10, 1, 52410); // (savepoint) obj.createentity(152, 112, 20, 1); // (terminal) if(!obj.flags[72]) { if ((game.intimetrial || game.nocutscenes) && !game.translator_exploring) { 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"; result = contents; break; }; case rn(42,52): { static const short contents[] = { 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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!"; result = contents; break; } case rn(43,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(264, 176, 10, 1, 52430); // (savepoint) obj.createentity(96, 180, 11, 96); // (horizontal gravity line) obj.createentity(160, 52, 11, 96); // (horizontal gravity line) obj.createentity(240, 136, 1, 2, 8); // Enemy obj.createentity(96, 88, 1, 3, 8); // Enemy obj.createentity(72, 32, 10, 0, 52431); // (savepoint) roomname = "Upstairs, Downstairs"; result = contents; break; } case rn(44,52): { static const short contents[] = { 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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(64, 112, 2, 11, 4); //Big Threadmill, <<<<<< obj.createentity(128, 112, 2, 11, 4); //Big Threadmill, <<<<<< obj.createentity(192, 112, 2, 11, 4); //Big Threadmill, <<<<<< obj.createentity(32, 112, 2, 9, 4); //Threadmill, <<< obj.createentity(0, 104, 2, 10, 4); //Big Threadmill, >>>>>> obj.createentity(64, 104, 2, 10, 4); //Big Threadmill, >>>>>> obj.createentity(128, 104, 2, 10, 4); //Big Threadmill, >>>>>> obj.createentity(192, 104, 2, 8, 4); //Threadmill, >>> obj.createentity(80+8, 128, 1, 0, 5, 0, 120, 320, 200); // Enemy, bounded obj.createentity(128+16, 168, 1, 1, 5, 0, 120, 320, 200); // Enemy, bounded obj.createentity(176+24, 128, 1, 0, 5, 0, 120, 320, 200); // Enemy, bounded //obj.createentity(224, 168, 1, 1, 5, 0, 120, 320, 200); // Enemy, bounded obj.createentity(24, 184, 10, 1, 52440); // (savepoint) roomname = "Timeslip"; result = contents; break; } case rn(45,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(40, 176, 10, 1, 52450); // (savepoint) obj.createentity(80, 156, 11, 176); // (horizontal gravity line) obj.createentity(128, 88, 10, 1, 52451); // (savepoint) obj.createentity(160, 76, 11, 96); // (horizontal gravity line) roomname = "Three's Company"; result = contents; break; } case rn(47,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(68-4, 56, 2, 11, 4); //Big Threadmill, <<<<<< obj.createentity(132-4, 56, 2, 9, 4); //Threadmill, <<< obj.createentity(44, 192, 3); //Disappearing Platform obj.createentity(92, 104, 3); //Disappearing Platform obj.createentity(120, 192, 2, 3, 6); // Platform obj.createentity(264, 48, 2, 2, 6); // Platform roomname = "Cosmic Creepers"; result = contents; break; }; case rn(48,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 98,98,98,98,98,98,98,98,98,220,218,98,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, }; obj.createentity(16, 112, 10, 1, 52480); // (savepoint) obj.createentity(67, 24, 12, 96); // (vertical gravity line) obj.createentity(243, 112, 12, 104); // (vertical gravity line) obj.createentity(288, 104, 10, 0, 52481); // (savepoint) obj.createentity(187, 24, 12, 80); // (vertical gravity line) obj.createentity(123, 128, 12, 88); // (vertical gravity line) roomname = "The Villi People"; result = contents; break; } case rn(50,53): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(192, 56, 10, 1, 53500); // (savepoint) obj.createentity(288, 104, 10, 0, 53501); // (savepoint) obj.createentity(168, 96, 1, 0, 5); // Enemy obj.createentity(184+2, 104, 1, 0, 5); // Enemy obj.createentity(200+4, 112, 1, 0, 5); // Enemy obj.createentity(88, 176-4, 1, 1, 5); // Enemy obj.createentity(104+2, 168-4, 1, 1, 5); // Enemy obj.createentity(120 + 4, 160 - 4, 1, 1, 5); // Enemy warpx = true; roomname = "Please enjoy these repeats"; roomname_special = true; result = contents; break; } case rn(50,54): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,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(24, 88, 10, 1, 54500); // (savepoint) obj.createentity(280, 184, 10, 1, 54501); // (savepoint) obj.createentity(56, 44, 11, 56); // (horizontal gravity line) obj.createentity(131, 72, 12, 64); // (vertical gravity line) obj.createentity(144, 36, 11, 48); // (horizontal gravity line) obj.createentity(211, 80, 12, 56); // (vertical gravity line) obj.createentity(224, 52, 11, 80); // (horizontal gravity line) warpx = true; roomname = "Try Jiggling the Antenna"; roomname_special = true; result = contents; break; } case rn(52,53): { static const short contents[] = { 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 740,740,740,740,740,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, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,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(16, 48, 10, 1, 53520); // (savepoint) obj.createentity(96, 144, 3); //Disappearing Platform obj.createentity(128, 144, 3); //Disappearing Platform obj.createentity(160, 144, 3); //Disappearing Platform obj.createentity(208, 80, 3); //Disappearing Platform obj.createentity(240, 80, 3); //Disappearing Platform obj.createentity(272, 80, 3); //Disappearing Platform obj.createentity(304, 80, 3); //Disappearing Platform roomname = "The Last Straw"; result = contents; break; } case rn(53,53): { static const short contents[] = { 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,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(0, 80, 3); //Disappearing Platform obj.createentity(288, 88, 3); //Disappearing Platform obj.createentity(32, 80, 3); //Disappearing Platform obj.createentity(64, 136, 3); //Disappearing Platform obj.createentity(96, 136, 3); //Disappearing Platform obj.createentity(224, 144, 3); //Disappearing Platform obj.createentity(192, 144, 3); //Disappearing Platform obj.createentity(256, 88, 3); //Disappearing Platform obj.createentity(128, 88, 3); //Disappearing Platform obj.createentity(160, 88, 3); //Disappearing Platform roomname = "W"; result = contents; break; } case rn(54,53): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740, 740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,740,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(0, 88, 3); //Disappearing Platform obj.createentity(32, 88, 3); //Disappearing Platform obj.createentity(64, 88, 3); //Disappearing Platform obj.createentity(120, 128, 9, 19); // (shiny trinket) roomname="V"; result = contents; break; } case rn(54,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(54,51): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(54,50): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(54,49): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(54,48): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,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,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, 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, 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, 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.translator_exploring) { obj.createblock(1, 0, 0, 320, 120, 3091); } else if(game.intimetrial) { obj.createblock(1, 0, 0, 320, 120, 82); } else { obj.createblock(1, 0, 0, 320, 120, 3500); //Game complete } roomname = "VVVVVV"; result = contents; break; } case rn(46,54): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; warpy = true; roomname = "Temporary Fault..."; result = contents; break; } case rn(47,54): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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"; result = contents; break; } case rn(48,54): { static const short contents[] = { 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,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, 0,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, 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, 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, 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, 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, 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(264, 32, 10, 0, 54480); // (savepoint) /*if(!game.nocutscenes && !obj.flags[71]){ obj.createblock(1, 72, 0, 320, 240, 49); }*/ warpy = true; roomname = "Regular Service Will Return Shortly"; result = contents; break; } case rn(49,54): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(120, 116, 11, 80); // (horizontal gravity line) warpy = true; roomname = "Origami Room"; result = contents; break; } //Tower Hallways from here case rn(108,109): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,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(40, 80, 10, 1, 50500); // (savepoint) roomname = "Teleporter Divot"; result = contents; break; } case rn(110,104): { static const short contents[] = { 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,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(16, 112, 10, 1, 50520); // (savepoint) roomname = "Seeing Red"; if(!game.intimetrial || game.translator_exploring) { if(game.companion==0 && !obj.flags[8] && !game.crewstats[3]) //also need to check if he's rescued in a previous game { obj.createentity(264, 185, 18, 15, 1, 17, 0); obj.createblock(1, 26*8, 0, 32, 240, 36); } } result = contents; break; } case rn(111,104): { static const short contents[] = { 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,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(128-16, 80-32, 14); //Teleporter! roomname = "Building Apport"; if(game.intimetrial) { obj.createblock(1, 40, 0, 32, 240, 82); } result = contents; break; } //Intermission level 2 case rn(53,48): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; roomname = "Whee Sports"; warpx = true; result = contents; break; } case rn(53,49): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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; result = contents; break; } case rn(53, 50): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(-8, 84-32, 11, 328); // (horizontal gravity line) obj.createentity(-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; result = contents; break; } case rn(53,51): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 179,179,179,179,179,179,179,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, 98,98,98,98,98,98,98,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, 98,98,98,98,98,98,98,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, 98,98,98,98,98,98,98,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, 259,259,259,259,259,259,259,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(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(112, 169, 18, 14, 0, 17, 1); obj.createblock(1, 22 * 8, 16*8, 32, 240, 37); } else if (game.lastsaved ==3) { obj.createentity(112, 169, 18, 15, 0, 17, 1); obj.createblock(1, 22 * 8, 16*8, 32, 240, 38); } else if (game.lastsaved == 4) { obj.createentity(112, 169, 18, 13, 0, 17, 1); obj.createblock(1, 22 * 8, 16*8, 32, 240, 39); } else { obj.createentity(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; result = contents; break; } case rn(53,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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((22 * 8)+4, (9 * 8) + 4, 14); //Teleporter! roomname = "House of Mirrors"; warpx = true; result = contents; break; } //Intermission 1 case rn(41,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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(164, 96, 10, 1, 56410); // (savepoint) warpy = true; roomname = "Now Take My Lead"; result = contents; break; } case rn(42,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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; result = contents; break; } case rn(43,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,178,179,179,180,0,0,0,0,178,179,179,180,0,0,0,0,178,179,179,179, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,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(104, 120, 1, 0, 3); // Enemy obj.createentity(168, 176, 1, 1, 3); // Enemy obj.createentity(232, 120, 1, 0, 3); // Enemy warpy = true; roomname = "Don't Get Ahead of Yourself!"; result = contents; break; } case rn(44,56): { static const short contents[] = { 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,179,179,179,179,179,179,179, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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,219,219,219,219, }; obj.createentity(144, 40, 10, 1, 56440); // (savepoint) if(!game.nodeathmode) { obj.createblock(1, 200, 0, 32, 240, 42); //scene 3 } roomname = "Very Good"; warpy = true; result = contents; break; } case rn(45,56): { static const short contents[] = { 98,98,98,98,98,98,98,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, 259,259,259,259,259,259,259,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,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(104, 152, 1, 0, 3); // Enemy obj.createentity(200, 152, 1, 0, 3); // Enemy roomname = "Must I Do Everything For You?"; warpy = true; result = contents; break; } case rn(46,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,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(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; result = contents; break; } case rn(47,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 219,219,219,219,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, }; obj.createentity(144, 64, 2, 0, 2, 144, 64, 176, 216); // Platform, bounded roomname = "...But Not Too Close"; warpy = true; result = contents; break; } case rn(48,56): { static const short contents[] = { 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, 98,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, 259,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(49,56): { static const short contents[] = { 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,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(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..."; result = contents; break; } case rn(50,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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,98,98,98,98,98,98,98,98,220,218,98,98,220,218,98, }; obj.createentity(88, 200, 2, 1, 4, 88, 128, 216, 208); // Platform, bounded obj.createentity(136, 136, 2, 0, 4, 88, 128, 216, 208); // Platform, bounded obj.createentity(184, 200, 2, 1, 4, 88, 128, 216, 208); // Platform, bounded roomname = "...Not as I Do"; warpy = true; result = contents; break; } case rn(51,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,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(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"; result = contents; break; } case rn(52,56): { static const short contents[] = { 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,260,218,98,220,219, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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,220,218,98,220,219, }; obj.createentity(48, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded obj.createentity(80, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded obj.createentity(112, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded obj.createentity(144, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded obj.createentity(176, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded obj.createentity(208, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded obj.createentity(240, 200, 2, 1, 6, 48, 48, 272, 208); // Platform, bounded roomname = "Do Try To Keep Up"; warpy = true; result = contents; break; } case rn(53,56): { static const short contents[] = { 219,219,219,219,219,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, 219,219,219,219,219,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, 219,219,219,219,219,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, 179,179,179,179,179,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, 98,98,98,98,98,98,98,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, 259,259,259,259,259,259,259,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(72, 72, 10, 1, 56530); // (savepoint) roomname = "You're Falling Behind"; warpy = true; result = contents; break; } case rn(54,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179, 98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98, 259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259,259, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219, 219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,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((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; result = contents; break; } #endif default: { static const short contents[1200] = {0}; roomname = "Outer Space"; roomname_special = true; //game.test = true; //game.teststring = "ERROR: Map not found in Final Area"; result = contents; break; } } return result; } ================================================ FILE: desktop_version/src/Finalclass.h ================================================ #ifndef FINALCLASS_H #define FINALCLASS_H class finalclass { public: const short* loadlevel(int rx, int ry); const char* roomname; bool roomname_special; bool warpx, warpy; }; #endif /* FINALCLASS_H */ ================================================ FILE: desktop_version/src/Font.cpp ================================================ #include "Font.h" #include #include "Alloc.h" #include "Constants.h" #include "CustomLevels.h" #include "FileSystemUtils.h" #include "FontBidi.h" #include "Graphics.h" #include "GraphicsResources.h" #include "GraphicsUtil.h" #include "Localization.h" #include "UTF8.h" #include "UtilityClass.h" #include "Vlogging.h" #include "XMLUtils.h" extern "C" { #include } namespace font { #define GLYPH_EXISTS 0x1 #define GLYPH_COLOR 0x2 struct GlyphInfo { uint16_t image_idx; uint8_t advance; uint8_t flags; }; /* Codepoints go up to U+10FFFF, so we have 0x110 (272) pages * of 0x1000 (4096) glyphs, allocated as needed */ #define FONT_N_PAGES 0x110 #define FONT_PAGE_SIZE 0x1000 enum FontType { FontType_FONT, FontType_BUTTONS }; struct Font { char name[64]; char display_name[SCREEN_WIDTH_CHARS + 1]; FontType type; uint8_t glyph_w; uint8_t glyph_h; SDL_Texture* image; GlyphInfo* glyph_page[FONT_N_PAGES]; char fallback_key[64]; uint8_t fallback_idx; bool fallback_idx_valid; }; struct FontContainer { uint8_t count; Font* fonts; hashmap* map_name_idx; }; struct PrintFlags { uint8_t scale; Font* font_sel; uint8_t brightness; bool border; bool full_border; bool align_cen; bool align_right; bool cjk_low; bool cjk_high; bool rtl; bool rtl_xflip; }; static FontContainer fonts_main = {}; static FontContainer fonts_custom = {}; static uint8_t font_idx_8x8 = 0; uint8_t font_idx_options_n = 0; uint8_t font_idx_options[20]; static bool font_level_is_interface = false; bool font_idx_level_is_custom = false; uint8_t font_idx_level = 0; static void codepoint_split( const uint32_t codepoint, short* page, short* glyph ) { // Splits a code point (0x10FFFF) into page (0x10F) and glyph (0xFFF) if (codepoint > 0x10FFFF) { codepoint_split(0xFFFD, page, glyph); return; } *page = codepoint >> 12; *glyph = codepoint % FONT_PAGE_SIZE; } static GlyphInfo* get_glyphinfo( const Font* f, const uint32_t codepoint ) { short page, glyph; codepoint_split(codepoint, &page, &glyph); if (f->glyph_page[page] == NULL) { return NULL; } return &f->glyph_page[page][glyph]; } static void add_glyphinfo( Font* f, const uint32_t codepoint, const int image_idx ) { if (image_idx < 0 || image_idx > 65535) { return; } short page, glyph; codepoint_split(codepoint, &page, &glyph); if (f->glyph_page[page] == NULL) { f->glyph_page[page] = (GlyphInfo*) SDL_calloc(FONT_PAGE_SIZE, sizeof(GlyphInfo)); if (f->glyph_page[page] == NULL) { return; } } f->glyph_page[page][glyph].image_idx = image_idx; f->glyph_page[page][glyph].advance = f->glyph_w; f->glyph_page[page][glyph].flags = GLYPH_EXISTS; } static bool glyph_is_valid(const GlyphInfo* glyph) { return glyph->flags & GLYPH_EXISTS; } static Font* fallback_for(const Font* f) { if (!f->fallback_idx_valid) { return NULL; } return &fonts_main.fonts[f->fallback_idx]; } static GlyphInfo* find_glyphinfo(const Font* f, const uint32_t codepoint, const Font** f_glyph) { /* Get the GlyphInfo for a specific codepoint, or or ? if it doesn't exist. * f_glyph may be either set to f (the main specified font) or its fallback font, if it exists. * As a last resort, may return NULL. */ *f_glyph = f; GlyphInfo* glyph = get_glyphinfo(f, codepoint); if (glyph != NULL && glyph_is_valid(glyph)) { return glyph; } Font* f_fallback = fallback_for(f); if (f_fallback != NULL && (glyph = get_glyphinfo(f_fallback, codepoint)) != NULL && glyph_is_valid(glyph)) { *f_glyph = f_fallback; return glyph; } glyph = get_glyphinfo(f, 0xFFFD); if (glyph != NULL && glyph_is_valid(glyph)) { return glyph; } glyph = get_glyphinfo(f, '?'); if (glyph != NULL && glyph_is_valid(glyph)) { return glyph; } return NULL; } static int get_advance_ff(const Font* f, const Font* f_glyph, const GlyphInfo* glyph) { /* Internal function - get the correct advance after we have * determined whether the glyph is from the fallback font or not. */ if (glyph == NULL) { return f->glyph_w; } /* If the glyph is a fallback glyph, center it relative to the main font * instead of trusting the fallback's width */ if (f_glyph != f) { return f->glyph_w; } return glyph->advance; } int get_advance(const Font* f, const uint32_t codepoint) { // Get the width of a single character in a font if (f == NULL) { return 8; } const Font* f_glyph; GlyphInfo* glyph = find_glyphinfo(f, codepoint, &f_glyph); return get_advance_ff(f, f_glyph, glyph); } static bool decode_xml_range(tinyxml2::XMLElement* elem, unsigned* start, unsigned* end) { // We do support hexadecimal start/end like "0x10FFFF" if (elem->QueryUnsignedAttribute("start", start) != tinyxml2::XML_SUCCESS || elem->QueryUnsignedAttribute("end", end) != tinyxml2::XML_SUCCESS || *end < *start || *start > 0x10FFFF ) { return false; } *end = SDL_min(*end, 0x10FFFF); return true; } static uint8_t load_font(FontContainer* container, const char* name) { if (container->count >= 254) { return 0; } Font* new_fonts = (Font*) SDL_realloc(container->fonts, sizeof(Font)*(container->count+1)); if (new_fonts == NULL) { return 0; } container->fonts = new_fonts; uint8_t f_idx = container->count++; Font* f = &container->fonts[f_idx]; vlog_info("Loading font \"%s\"...", name); char name_png[256]; char name_txt[256]; char name_xml[256]; SDL_snprintf(name_png, sizeof(name_png), "graphics/%s.png", name); SDL_snprintf(name_txt, sizeof(name_txt), "graphics/%s.txt", name); SDL_snprintf(name_xml, sizeof(name_xml), "graphics/%s.fontmeta", name); SDL_strlcpy(f->name, name, sizeof(f->name)); SDL_strlcpy(f->display_name, name, sizeof(f->display_name)); f->type = FontType_FONT; f->glyph_w = 8; f->glyph_h = 8; f->fallback_key[0] = '\0'; f->fallback_idx_valid = false; bool white_teeth = false; tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; bool xml_loaded = false; if (FILESYSTEM_areAssetsInSameRealDir(name_png, name_xml) && FILESYSTEM_loadAssetTiXml2Document(name_xml, doc) ) { xml_loaded = true; hDoc = hDoc.FirstChildElement("font_metadata"); if ((pElem = hDoc.FirstChildElement("display_name").ToElement()) != NULL) { SDL_strlcpy(f->display_name, pElem->GetText(), sizeof(f->display_name)); } if ((pElem = hDoc.FirstChildElement("type").ToElement()) != NULL) { if (SDL_strcmp(pElem->GetText(), "buttons") == 0) { f->type = FontType_BUTTONS; } } if ((pElem = hDoc.FirstChildElement("width").ToElement()) != NULL) { f->glyph_w = help.Int(pElem->GetText()); } if ((pElem = hDoc.FirstChildElement("height").ToElement()) != NULL) { f->glyph_h = help.Int(pElem->GetText()); } if ((pElem = hDoc.FirstChildElement("white_teeth").ToElement()) != NULL) { // If 1, we don't need to whiten the entire font (like in old versions) white_teeth = help.Int(pElem->GetText()); } if ((pElem = hDoc.FirstChildElement("fallback").ToElement()) != NULL) { SDL_strlcpy(f->fallback_key, pElem->GetText(), sizeof(f->fallback_key)); } } f->image = LoadImage(name_png, white_teeth ? TEX_COLOR : TEX_WHITE); SDL_zeroa(f->glyph_page); if (f->image == NULL) { return f_idx; } /* We may have a 2.3-style font.txt with all the characters. * font.txt takes priority over in the XML. * If neither exist, it's just ASCII. */ bool charset_loaded = false; bool special_loaded = false; unsigned char* charmap = NULL; size_t length; if (FILESYSTEM_areAssetsInSameRealDir(name_png, name_txt)) { /* The .txt can contain null bytes, but it's still null-terminated - it protects * against incomplete sequences getting the UTF-8 decoder to read out of bounds. */ FILESYSTEM_loadAssetToMemory(name_txt, &charmap, &length); } if (charmap != NULL) { // We have a .txt! It's an obsolete system, but it takes priority if the file exists. const char* current = (char*) charmap; const char* end = (char*) charmap + length; int pos = 0; while (current < end) { uint32_t codepoint = UTF8_next(¤t); add_glyphinfo(f, codepoint, pos); ++pos; } VVV_free(charmap); charset_loaded = true; } if (xml_loaded && !charset_loaded && (pElem = hDoc.FirstChildElement("chars").ToElement()) != NULL) { // in the XML is the preferred system. int pos = 0; tinyxml2::XMLElement* subElem; FOR_EACH_XML_SUB_ELEMENT(pElem, subElem) { EXPECT_ELEM(subElem, "range"); unsigned start, end; if (!decode_xml_range(subElem, &start, &end)) { continue; } for (uint32_t codepoint = start; codepoint <= end; codepoint++) { add_glyphinfo(f, codepoint, pos); ++pos; } } charset_loaded = true; } if (!charset_loaded) { /* If we don't have font.txt and no tag either, * this font is 2.2-and-below-style plain ASCII. * Or well... 2.3 interpreted these as * "all unicode from 0 to however much is in the image"... */ SDL_Surface* temp_surface = LoadImageSurface(name_png); if (temp_surface != NULL) { const uint32_t chars_per_line = temp_surface->w / f->glyph_w; const uint32_t max_codepoint = (temp_surface->h / f->glyph_h) * chars_per_line; for (uint32_t codepoint = 0x00; codepoint < max_codepoint; codepoint++) { if (codepoint > 0x7F) { /* Only include characters with actual pixels... * If the font.png is too big (normally it is) we _want_ question marks. */ const int glyph_x = (codepoint % chars_per_line) * f->glyph_w; const int glyph_y = (codepoint / chars_per_line) * f->glyph_h; bool found_pixel = false; for (int pixel_y = 0; pixel_y < f->glyph_h; pixel_y++) { for (int pixel_x = 0; pixel_x < f->glyph_w; pixel_x++) { if (ReadPixel(temp_surface, glyph_x+pixel_x, glyph_y+pixel_y).a > 0) { found_pixel = true; goto no_more_pixels; } } } no_more_pixels: if (!found_pixel) { // Do not add it continue; } } add_glyphinfo(f, codepoint, codepoint); } VVV_freefunc(SDL_FreeSurface, temp_surface); } } if (xml_loaded && (pElem = hDoc.FirstChildElement("special").ToElement()) != NULL) { tinyxml2::XMLElement* subElem; FOR_EACH_XML_SUB_ELEMENT(pElem, subElem) { EXPECT_ELEM(subElem, "range"); unsigned start, end; if (!decode_xml_range(subElem, &start, &end)) { continue; } int advance = subElem->IntAttribute("advance", -1); int color = subElem->IntAttribute("color", -1); for (uint32_t codepoint = start; codepoint <= end; codepoint++) { GlyphInfo* glyph = get_glyphinfo(f, codepoint); if (glyph == NULL) { continue; } if (advance >= 0 && advance < 256) { glyph->advance = advance; } if (color == 0) { glyph->flags &= ~GLYPH_COLOR; } else if (color == 1) { glyph->flags |= GLYPH_COLOR; } } } special_loaded = true; } if (!special_loaded && f->glyph_w == 8 && f->glyph_h == 8) { /* If we don't have , and the font is 8x8, * 0x00-0x1F will be less wide because that's how it has always been. */ for (uint32_t codepoint = 0x00; codepoint < 0x20; codepoint++) { GlyphInfo* glyph = get_glyphinfo(f, codepoint); if (glyph != NULL) { glyph->advance = 6; } } } return f_idx; } static bool find_font_by_name(FontContainer* container, const char* name, uint8_t* idx) { // Returns true if font found (and idx is set), false if not found if (container->map_name_idx == NULL) { // No fonts yet... return false; } uintptr_t i; if (hashmap_get(container->map_name_idx, name, SDL_strlen(name), &i)) { *idx = i; return true; } return false; } bool find_main_font_by_name(const char* name, uint8_t* idx) { return find_font_by_name(&fonts_main, name, idx); } uint8_t get_font_idx_8x8(void) { return font_idx_8x8; } bool level_font_is_main_idx(const uint8_t idx) { return !font_idx_level_is_custom && font_idx_level == idx; } void set_level_font(const char* name) { /* Apply the choice for a certain level-specific font. * This function is for custom levels. */ font_level_is_interface = false; if (find_font_by_name(&fonts_custom, name, &font_idx_level)) { font_idx_level_is_custom = true; } else { font_idx_level_is_custom = false; if (!find_font_by_name(&fonts_main, name, &font_idx_level)) { if (SDL_strcmp(name, "font") != 0) { set_level_font("font"); } else { font_idx_level = font_idx_8x8; } } } cl.rtl = SDL_strcmp(name, "font_ar") == 0; // FIXME: make different menu options for choosing LTR/RTL of the same font } void set_level_font_interface(void) { /* Set the level font equal to the interface font. * This function is for the main game. */ font_level_is_interface = true; } void set_level_font_new(void) { /* Set the level font to the default font for new levels. * This function is for starting the editor. */ font_level_is_interface = false; font_idx_level_is_custom = false; if (loc::new_level_font == "") { /* Just take the language's font * (Japanese VVVVVV can make Japanese levels by default, etc) */ font_idx_level = loc::get_langmeta()->font_idx; } else { /* If the user has changed the font (wants to make levels * for a different userbase) then remember that choice. */ if (!find_main_font_by_name(loc::new_level_font.c_str(), &font_idx_level)) { font_idx_level = font_idx_8x8; } } cl.level_font_name = get_main_font_name(font_idx_level); cl.rtl = cl.level_font_name == "font_ar"; // FIXME: make different menu options for choosing LTR/RTL of the same font } static void fill_map_name_idx(FontContainer* container) { /* Initialize the name->idx hashmap for the fonts in this container. * This should only be done once, after all the fonts are added. */ container->map_name_idx = hashmap_create(); for (uint8_t i = 0; i < container->count; i++) { Font* f = &container->fonts[i]; hashmap_set(container->map_name_idx, f->name, SDL_strlen(f->name), i); } } static void set_fallbacks(FontContainer* container) { /* Initialize the value of fallback_idx for all fonts in this container. * Only main fonts can be fallback fonts. */ for (uint8_t i = 0; i < container->count; i++) { Font* f = &container->fonts[i]; if (find_main_font_by_name(f->fallback_key, &f->fallback_idx)) { f->fallback_idx_valid = true; } } } static void load_font_filename(bool is_custom, const char* filename) { // Load font.png, and everything that matches *.fontmeta (but not font.fontmeta) size_t expected_ext_start; bool is_fontpng = SDL_strcmp(filename, "font.png") == 0; if (is_fontpng) { expected_ext_start = SDL_strlen(filename)-4; } else { expected_ext_start = SDL_strlen(filename)-9; } if (is_fontpng || (endsWith(filename, ".fontmeta") && SDL_strcmp(filename, "font.fontmeta") != 0)) { char font_name[64]; SDL_strlcpy(font_name, filename, sizeof(font_name)); font_name[SDL_min(63, expected_ext_start)] = '\0'; uint8_t f_idx = load_font(is_custom ? &fonts_custom : &fonts_main, font_name); if (is_fontpng && !is_custom) { font_idx_8x8 = f_idx; } } } void load_main(void) { // Load all global fonts EnumHandle handle = {}; const char* item; while ((item = FILESYSTEM_enumerate("graphics", &handle)) != NULL) { load_font_filename(false, item); } FILESYSTEM_freeEnumerate(&handle); font_idx_level = font_idx_8x8; fill_map_name_idx(&fonts_main); set_fallbacks(&fonts_main); // Initialize the font menu options, 8x8 font first font_idx_options[0] = font_idx_8x8; font_idx_options_n = 1; for (uint8_t i = 0; i < fonts_main.count; i++) { if (i == font_idx_8x8) { continue; } if (fonts_main.fonts[i].type != FontType_FONT) { continue; } font_idx_options[font_idx_options_n++] = i; if (font_idx_options_n >= sizeof(font_idx_options)) { break; } } } void load_custom(const char* name) { // Load all custom (level-specific assets) fonts unload_custom(); EnumHandle handle = {}; const char* item; while ((item = FILESYSTEM_enumerateAssets("graphics", &handle)) != NULL) { load_font_filename(true, item); } FILESYSTEM_freeEnumerate(&handle); fill_map_name_idx(&fonts_custom); set_fallbacks(&fonts_custom); set_level_font(name); } void unload_font(Font* f) { VVV_freefunc(SDL_DestroyTexture, f->image); for (int i = 0; i < FONT_N_PAGES; i++) { VVV_free(f->glyph_page[i]); } } void unload_font_container(FontContainer* container) { VVV_freefunc(hashmap_free, container->map_name_idx); for (uint8_t i = 0; i < container->count; i++) { unload_font(&container->fonts[i]); } VVV_free(container->fonts); container->fonts = NULL; container->count = 0; } void unload_custom(void) { // Unload all custom fonts unload_font_container(&fonts_custom); } void destroy(void) { // Unload all fonts (main and custom) for exiting unload_custom(); unload_font_container(&fonts_main); } static Font* container_get(FontContainer* container, uint8_t idx) { /* Get a certain font from the given container (with bounds checking). * Does its best to return at least something, * but if there are no fonts whatsoever, can return NULL. */ if (idx < container->count) { return &container->fonts[idx]; } if (font_idx_8x8 < fonts_main.count) { return &fonts_main.fonts[font_idx_8x8]; } if (fonts_main.count > 0) { return &fonts_main.fonts[0]; } if (fonts_custom.count > 0) { return &fonts_custom.fonts[0]; } return NULL; } static Font* fontsel_to_font(int sel, bool* rtl, bool custom) { /* Take font selection integer (0-31) and turn it into the correct Font * 0: PR_FONT_INTERFACE - use interface font * 1: PR_FONT_LEVEL - use level font * 2: PR_FONT_8X8 - use 8x8 font no matter what * 3-31: - use font index 0-28 (depending on custom, from * PR_FONT_IDX_IS_CUSTOM) * * rtl will be set depending on whether we're requesting the interface * font (take it from the lang attributes) or level font (take it from * the level attributes), or false otherwise. */ *rtl = false; if (sel < 0) { // Shouldn't happen but better safe than sorry... return NULL; } switch (sel) { case 1: if (!font_level_is_interface) { *rtl = cl.rtl; if (font_idx_level_is_custom) { return container_get(&fonts_custom, font_idx_level); } else { return container_get(&fonts_main, font_idx_level); } } SDL_FALLTHROUGH; case 0: *rtl = loc::get_langmeta()->rtl; return container_get(&fonts_main, loc::get_langmeta()->font_idx); case 2: return container_get(&fonts_main, font_idx_8x8); } if (custom) { return container_get(&fonts_custom, sel-3); } return container_get(&fonts_main, sel-3); } #define FLAG_PART(start, count) ((flags >> start) % (1 << count)) static PrintFlags decode_print_flags(uint32_t flags) { PrintFlags pf; pf.scale = FLAG_PART(0, 3) + 1; pf.font_sel = fontsel_to_font( FLAG_PART(3, 5), &pf.rtl, flags & PR_FONT_IDX_IS_CUSTOM ); if (flags & PR_RTL_FORCE) { pf.rtl = true; } pf.brightness = ~FLAG_PART(8, 8) & 0xff; pf.border = flags & PR_BOR; pf.full_border = flags & PR_FULLBOR; pf.align_cen = flags & PR_CEN; pf.align_right = flags & PR_RIGHT; pf.cjk_low = flags & PR_CJK_LOW; pf.cjk_high = flags & PR_CJK_HIGH; pf.rtl_xflip = flags & PR_RTL_XFLIP; if (pf.full_border) { pf.border = false; } return pf; } #undef FLAG_PART static bool next_wrap( Font* f, size_t* start, size_t* len, const char* str, const int maxwidth ) { /* Get information about the current line in wordwrapped text, * given this line starts at str[*start]. * *start is updated to the start of the next line. */ size_t idx = 0; size_t lenfromlastspace = 0; size_t lastspace = 0; int linewidth = 0; *len = 0; if (str[idx] == '\0') { return false; } while (true) { uint8_t codepoint_nbytes; uint32_t codepoint = UTF8_peek_next(&str[idx], &codepoint_nbytes); switch (codepoint) { case ' ': if (loc::get_langmeta()->autowordwrap) { lenfromlastspace = idx; lastspace = *start; } break; case '\n': case '|': *start += 1; SDL_FALLTHROUGH; case '\0': return true; } linewidth += get_advance(f, codepoint); if (linewidth > maxwidth) { if (lenfromlastspace != 0) { *len = lenfromlastspace; *start = lastspace + 1; } if (idx == 0) { // Oops, we're stuck at a single character *len = 1; *start += 1; } return true; } idx += codepoint_nbytes; *start += codepoint_nbytes; *len += codepoint_nbytes; } } static bool next_wrap_buf( Font* f, char buffer[], const size_t buffer_size, size_t* start, const char* str, const int maxwidth ) { /* Get each line of wordwrapped text, writing one line at a time to a buffer. * Call as follows: * * char buf[256]; * size_t start = 0; * while (next_wrap_buf(font, buf, sizeof(buf), &start, "String to wordwrap", 320)) * { * // buf contains a line of text * } */ size_t len = 0; const size_t prev_start = *start; const bool retval = next_wrap(f, start, &len, &str[*start], maxwidth); if (retval) { /* Like next_split_s(), don't use SDL_strlcpy() here. */ const size_t length = SDL_min(buffer_size - 1, len); SDL_memcpy(buffer, &str[prev_start], length); buffer[length] = '\0'; } return retval; } std::string string_wordwrap(const uint32_t flags, const std::string& s, int maxwidth, short *lines /*= NULL*/) { /* Return a string wordwrapped to a maximum limit by adding newlines. * CJK will need to have autowordwrap disabled and have manually inserted newlines. */ if (lines != NULL) { *lines = 1; } PrintFlags pf = decode_print_flags(flags); if (pf.font_sel == NULL) { return s; } const char* orig = s.c_str(); std::string result; size_t start = 0; bool first = true; while (true) { size_t len = 0; const char* part = &orig[start]; const bool retval = next_wrap(pf.font_sel, &start, &len, part, maxwidth); if (!retval) { return result; } if (first) { first = false; } else { result.push_back('\n'); if (lines != NULL) { (*lines)++; } } result.append(part, len); } } std::string string_wordwrap_balanced(const uint32_t flags, const std::string& s, int maxwidth) { /* Return a string wordwrapped to a limit of maxwidth by adding newlines. * Try to fill the lines as far as possible, and return result where lines are most filled. * Goal is to have all lines in textboxes be about as long and to avoid wrapping just one word to a new line. * CJK will need to have autowordwrap disabled and have manually inserted newlines. */ if (!loc::get_langmeta()->autowordwrap) { return s; } short lines; string_wordwrap(flags, s, maxwidth, &lines); int bestwidth = maxwidth; if (lines > 1) { for (int curlimit = maxwidth; curlimit > 1; curlimit -= 8) { short try_lines; string_wordwrap(flags, s, curlimit, &try_lines); if (try_lines > lines) { bestwidth = curlimit + 8; break; } } } return string_wordwrap(flags, s, bestwidth); } std::string string_unwordwrap(const std::string& s) { /* Takes a string wordwrapped by newlines, and turns it into a single line, undoing the wrapping. * Also trims any leading/trailing whitespace and collapses multiple spaces into one (to undo manual centering) * Only applied to English, so langmeta.autowordwrap isn't used here (it'd break looking up strings) */ std::string result; result.reserve(s.length()); bool latest_was_space = true; // last character was a space (or the beginning, don't want leading whitespace) int consecutive_newlines = 0; // number of newlines currently encountered in a row (multiple newlines should stay!) const char* str = s.c_str(); uint32_t ch; while ((ch = UTF8_next(&str))) { if (ch == '\n') { if (consecutive_newlines == 0) { ch = ' '; } else if (consecutive_newlines == 1) { if (!result.empty()) { // The last character was already a newline, so change it back from the space we thought it should have become. result[result.size()-1] = '\n'; } else { // The string starts with two or more newlines, in this case we didn't add the first one at all. result.append("\n\n"); } } consecutive_newlines++; } else { consecutive_newlines = 0; } if (ch != ' ' || !latest_was_space) { result.append(UTF8_encode(ch).bytes); } latest_was_space = (ch == ' ' || ch == '\n'); } // We could have one trailing space if (!result.empty() && result[result.size()-1] == ' ') { result.erase(result.end()-1); } return result; } static int print_char( const Font* f, const uint32_t codepoint, int x, int y, const int scale, uint8_t r, uint8_t g, uint8_t b, const uint8_t brightness ) { /* Draws the glyph for a codepoint at x,y. * Returns the amount of pixels to advance the cursor. */ if (is_directional_character(codepoint) || is_joiner(codepoint)) { // Some characters should be completely invisible return 0; } const Font* f_glyph; GlyphInfo* glyph = find_glyphinfo(f, codepoint, &f_glyph); if (glyph == NULL) { return f->glyph_w * scale; } if (glyph->flags & GLYPH_COLOR && (r | g | b) != 0) { r = g = b = brightness; } else if (brightness < 255) { float bri_factor = brightness / (float) 255; r *= bri_factor; g *= bri_factor; b *= bri_factor; } // If the glyph is a fallback glyph, center it if (f_glyph != f) { x += (f->glyph_w - f_glyph->glyph_w) / 2; y += (f->glyph_h - f_glyph->glyph_h) / 2; } graphics.draw_grid_tile( f_glyph->image, glyph->image_idx, x, y, f_glyph->glyph_w, f_glyph->glyph_h, r, g, b, scale, scale * (graphics.flipmode ? -1 : 1) ); return get_advance_ff(f, f_glyph, glyph) * scale; } const char* get_main_font_name(uint8_t idx) { Font* f = container_get(&fonts_main, idx); if (f == NULL) { return ""; } return f->name; } const char* get_main_font_display_name(uint8_t idx) { Font* f = container_get(&fonts_main, idx); if (f == NULL) { return ""; } if (idx == font_idx_8x8) { // Deciding the name for the 8x8 font was harder than I'd like to admit. if (loc::lang == "en" || loc::get_langmeta()->font_idx != font_idx_8x8) { // If you use English, or a CJK language: "english/..." SDL_strlcpy( f->display_name, "english/…", sizeof(f->display_name) ); } else { // If you use another, e.g. German: "english/deutsch/..." SDL_snprintf( f->display_name, sizeof(f->display_name), "english/%s/…", loc::get_langmeta()->nativename.c_str() ); } } return f->display_name; } const char* get_level_font_display_name(void) { if (font_idx_level_is_custom) { Font* f = container_get(&fonts_custom, font_idx_level); if (f == NULL) { return ""; } return f->display_name; } return get_main_font_display_name(font_idx_level); } bool glyph_dimensions(uint32_t flags, uint8_t* glyph_w, uint8_t* glyph_h) { /* Gets the dimensions (glyph_w and glyph_h) of a certain font. * Returns true if the font is valid (glyph_w and/or glyph_h were written to if not NULL), false if not. */ PrintFlags pf = decode_print_flags(flags); if (pf.font_sel == NULL) { return false; } if (glyph_w != NULL) { *glyph_w = pf.font_sel->glyph_w; } if (glyph_h != NULL) { *glyph_h = pf.font_sel->glyph_h; } return true; } int len(const uint32_t flags, const char* text) { PrintFlags pf = decode_print_flags(flags); if (bidi_should_transform(pf.rtl, text)) { text = bidi_transform(pf.rtl, text); } int text_len = 0; uint32_t codepoint; while ((codepoint = UTF8_next(&text))) { if (!is_directional_character(codepoint) && !is_joiner(codepoint)) { text_len += get_advance(pf.font_sel, codepoint); } } return text_len * pf.scale; } int height(const uint32_t flags) { PrintFlags pf = decode_print_flags(flags); if (pf.font_sel == NULL) { return 8; } return pf.font_sel->glyph_h * pf.scale; } bool is_rtl(const uint32_t flags) { PrintFlags pf = decode_print_flags(flags); return pf.rtl; } void print( const uint32_t flags, int x, int y, const char* text, const uint8_t r, const uint8_t g, const uint8_t b ) { PrintFlags pf = decode_print_flags(flags); if (pf.font_sel == NULL) { return; } if (pf.rtl && pf.rtl_xflip && (!pf.align_cen || x != -1)) { x = SCREEN_WIDTH_PIXELS - x; pf.align_right = !pf.align_right; } if (pf.align_cen || pf.align_right) { const int textlen = len(flags, text); if (pf.align_cen) { if (x == -1) { x = SCREEN_WIDTH_PIXELS / 2; } x -= textlen/2; if (!pf.rtl) { x = SDL_max(x, 0); } else { x = SDL_min(x, SCREEN_WIDTH_PIXELS - textlen); } } else { x -= textlen; } } if (pf.border && !graphics.notextoutline) { static const int offsets[4][2] = {{0,-1}, {-1,0}, {1,0}, {0,1}}; for (int offset = 0; offset < 4; offset++) { print( flags & ~PR_BOR & ~PR_CEN & ~PR_RIGHT & ~PR_RTL_XFLIP, x + offsets[offset][0]*pf.scale, y + offsets[offset][1]*pf.scale, text, 0, 0, 0 ); } } if (pf.full_border) { static const int offsets[8][2] = { {0,-1}, {-1,0}, {1,0}, {0,1}, {-1,-1}, {1,1}, {-1,1}, {1,-1} }; for (int offset = 0; offset < 8; offset++) { print( flags & ~PR_FULLBOR & ~PR_CEN & ~PR_RIGHT & ~PR_RTL_XFLIP, x + offsets[offset][0] * pf.scale, y + offsets[offset][1] * pf.scale, text, 0, 0, 0 ); } } int h_diff_8 = (pf.font_sel->glyph_h-8)*pf.scale; if (h_diff_8 < 0) { /* If the font is less high than 8, * just center it (lower on screen) */ y -= h_diff_8/2; } else if (pf.cjk_high) { y -= h_diff_8; } else if (!pf.cjk_low) { y -= h_diff_8/2; } if (bidi_should_transform(pf.rtl, text)) { text = bidi_transform(pf.rtl, text); } int position = 0; uint32_t codepoint; while ((codepoint = UTF8_next(&text))) { position += font::print_char( pf.font_sel, codepoint, x + position, y, pf.scale, r, g, b, pf.brightness ); } } void print( const uint32_t flags, int x, int y, const std::string& text, const uint8_t r, const uint8_t g, const uint8_t b ) { // Just a std::string overload for now because it's more .c_str() to add than I'm comfortable with... print(flags, x, y, text.c_str(), r, g, b); } int print_wrap( uint32_t flags, const int x, int y, const char* text, const uint8_t r, const uint8_t g, const uint8_t b, int linespacing /*= -1*/, int maxwidth /*= -1*/ ) { PrintFlags pf = decode_print_flags(flags); if (pf.font_sel == NULL) { return y; } if (linespacing == -1) { linespacing = 10; } linespacing = SDL_max(linespacing, pf.font_sel->glyph_h * pf.scale); if (maxwidth == -1) { maxwidth = 304; } if (pf.border && !graphics.notextoutline && (r|g|b) != 0) { print_wrap(flags, x, y, text, 0, 0, 0, linespacing, maxwidth); flags &= ~PR_BOR; } if (pf.full_border && (r | g | b) != 0) { print_wrap(flags, x, y, text, 0, 0, 0, linespacing, maxwidth); flags &= ~PR_FULLBOR; } // This could fit 64 non-BMP characters onscreen, should be plenty char buffer[256]; size_t start = 0; if (graphics.flipmode) { // Correct for the height of the resulting print. size_t len = 0; while (next_wrap(pf.font_sel, &start, &len, &text[start], maxwidth)) { y += linespacing; } y -= linespacing; start = 0; } while (next_wrap_buf(pf.font_sel, buffer, sizeof(buffer), &start, text, maxwidth)) { print(flags, x, y, buffer, r, g, b); if (graphics.flipmode) { y -= linespacing; } else { y += linespacing; } } return y + linespacing; } } // namespace font ================================================ FILE: desktop_version/src/Font.h ================================================ /* * == SOME TEXT PRINTING EXAMPLES == * * Standard print * font::print(0, 50, 50, "Hello world!", 255, 255, 255); * * Centered text * font::print(PR_CEN, -1, 50, "Hello world!", 255, 255, 255); * (set X to -1, unless you want to center *around* X) * * 2x scale * font::print(PR_2X, 50, 50, "V", 255, 255, 255); * * Centered 2x scale * font::print(PR_CEN | PR_2X, -1, 50, "V", 255, 255, 255); * * Right-aligned 3x scale with a border around it * font::print(PR_RIGHT | PR_3X | PR_BOR, 320, 50, "V", 255, 255, 255); * * Wordwrapped centered text * font::print_wrap(PR_CEN, -1, 50, "Hello world, this will wordwrap to the screen width", 255, 255, 255); * */ #ifndef FONT_H #define FONT_H #include #include #include #define PR_1X (0 << 0) /* default, 1x scale */ #define PR_2X (1 << 0) /* 2x scale */ #define PR_3X (2 << 0) /* etc */ #define PR_4X (3 << 0) #define PR_5X (4 << 0) #define PR_6X (5 << 0) #define PR_7X (6 << 0) #define PR_8X (7 << 0) #define PR_FONT_INTERFACE (0 << 3) /* default, use interface font */ #define PR_FONT_LEVEL (1 << 3) /* use level-specific font (room names, cutscene dialogue, etc) */ #define PR_FONT_8X8 (2 << 3) /* use 8x8 font no matter what */ #define PR_FONT_IDX(idx, rtl) /* use given font index */\ (((SDL_clamp(idx, 0, 28) + 3) << 3) | (rtl ? PR_RTL_FORCE : 0)) #define PR_BRIGHTNESS(value) /* use this brightness 0-255 for the text (accounts for button glyphs correctly) */\ (((~SDL_clamp((int)(value), 0, 255) & 0xff) << 8)) #define PR_FULLBOR (1 << 16) /* draw a black border around the text, filling in the corners (for the map legend) */ #define PR_BOR (1 << 17) /* draw a black border around the text (was bprint/bigbprint) */ #define PR_LEFT (0 << 18) /* default, left-align text/place at x coordinate */ #define PR_CEN (1 << 18) /* center-align text relative to X (X is center) or to screen if X == -1 */ #define PR_RIGHT (2 << 18) /* right-align text to X (X is now the right border, not left border) */ #define PR_CJK_CEN (0 << 20) /* default, larger fonts should stick out on top and bottom compared to 8x8 font */ #define PR_CJK_LOW (1 << 20) /* larger fonts should stick out fully on the bottom (draw at Y) */ #define PR_CJK_HIGH (2 << 20) /* larger fonts should stick out fully on the top */ #define PR_RTL_FORCE (1 << 22) /* force the RTL flag, not needed if the font is set to INTERFACE or LEVEL */ #define PR_RTL_XFLIP (1 << 23) /* in RTL languages, mirror the X axis, so left is 320 and right is 0, and invert the meaning of PR_LEFT and PR_RIGHT */ #define PR_FONT_IDX_IS_CUSTOM (1 << 24) /* with PR_FONT_IDX, mark that the font index is of a custom font */ namespace font { // Options in font selection menu extern uint8_t font_idx_options_n; extern uint8_t font_idx_options[20]; extern uint8_t font_idx_level; extern bool font_idx_level_is_custom; bool find_main_font_by_name(const char* name, uint8_t* idx); const char* get_main_font_name(uint8_t idx); const char* get_main_font_display_name(uint8_t idx); const char* get_level_font_display_name(void); uint8_t get_font_idx_8x8(void); bool level_font_is_main_idx(uint8_t idx); void set_level_font(const char* name); void set_level_font_interface(void); void set_level_font_new(void); void load_main(void); void load_custom(const char* name); void unload_custom(void); void destroy(void); std::string string_wordwrap(uint32_t flags, const std::string& s, int maxwidth, short *lines = NULL); std::string string_wordwrap_balanced(uint32_t flags, const std::string& s, int maxwidth); std::string string_unwordwrap(const std::string& s); bool glyph_dimensions(uint32_t flags, uint8_t* glyph_w, uint8_t* glyph_h); int len(uint32_t flags, const char* text); int height(uint32_t flags); bool is_rtl(uint32_t flags); void print( uint32_t flags, int x, int y, const char* text, uint8_t r, uint8_t g, uint8_t b ); // std::string overload for only font::print (use .c_str() for the others) void print( uint32_t flags, int x, int y, const std::string& text, uint8_t r, uint8_t g, uint8_t b ); int print_wrap( uint32_t flags, int x, int y, const char* text, uint8_t r, uint8_t g, uint8_t b, int linespacing = -1, int maxwidth = -1 ); } // namespace font #endif // FONT_H ================================================ FILE: desktop_version/src/FontBidi.cpp ================================================ #include "FontBidi.h" #include #include #include "Alloc.h" #include "UTF8.h" extern "C" { #include } namespace font { struct ArabicLetter { uint32_t letter; uint32_t isolated; uint32_t initial; uint32_t medial; uint32_t final; }; // Arabic reshaping lookup table from https://github.com/TerryCavanagh/hx_arabic_shaper static ArabicLetter arabic_letters[] = { // ARABIC LETTER HAMZA {0x0621, 0xFE80, 0, 0, 0}, // ARABIC LETTER ALEF WITH MADDA ABOVE {0x0622, 0xFE81, 0, 0, 0xFE82}, // ARABIC LETTER ALEF WITH HAMZA ABOVE {0x0623, 0xFE83, 0, 0, 0xFE84}, // ARABIC LETTER WAW WITH HAMZA ABOVE {0x0624, 0xFE85, 0, 0, 0xFE86}, // ARABIC LETTER ALEF WITH HAMZA BELOW {0x0625, 0xFE87, 0, 0, 0xFE88}, // ARABIC LETTER YEH WITH HAMZA ABOVE {0x0626, 0xFE89, 0xFE8B, 0xFE8C, 0xFE8A}, // ARABIC LETTER ALEF {0x0627, 0xFE8D, 0, 0, 0xFE8E}, // ARABIC LETTER BEH {0x0628, 0xFE8F, 0xFE91, 0xFE92, 0xFE90}, // ARABIC LETTER TEH MARBUTA {0x0629, 0xFE93, 0, 0, 0xFE94}, // ARABIC LETTER TEH {0x062A, 0xFE95, 0xFE97, 0xFE98, 0xFE96}, // ARABIC LETTER THEH {0x062B, 0xFE99, 0xFE9B, 0xFE9C, 0xFE9A}, // ARABIC LETTER JEEM {0x062C, 0xFE9D, 0xFE9F, 0xFEA0, 0xFE9E}, // ARABIC LETTER HAH {0x062D, 0xFEA1, 0xFEA3, 0xFEA4, 0xFEA2}, // ARABIC LETTER KHAH {0x062E, 0xFEA5, 0xFEA7, 0xFEA8, 0xFEA6}, // ARABIC LETTER DAL {0x062F, 0xFEA9, 0, 0, 0xFEAA}, // ARABIC LETTER THAL {0x0630, 0xFEAB, 0, 0, 0xFEAC}, // ARABIC LETTER REH {0x0631, 0xFEAD, 0, 0, 0xFEAE}, // ARABIC LETTER ZAIN {0x0632, 0xFEAF, 0, 0, 0xFEB0}, // ARABIC LETTER SEEN {0x0633, 0xFEB1, 0xFEB3, 0xFEB4, 0xFEB2}, // ARABIC LETTER SHEEN {0x0634, 0xFEB5, 0xFEB7, 0xFEB8, 0xFEB6}, // ARABIC LETTER SAD {0x0635, 0xFEB9, 0xFEBB, 0xFEBC, 0xFEBA}, // ARABIC LETTER DAD {0x0636, 0xFEBD, 0xFEBF, 0xFEC0, 0xFEBE}, // ARABIC LETTER TAH {0x0637, 0xFEC1, 0xFEC3, 0xFEC4, 0xFEC2}, // ARABIC LETTER ZAH {0x0638, 0xFEC5, 0xFEC7, 0xFEC8, 0xFEC6}, // ARABIC LETTER AIN {0x0639, 0xFEC9, 0xFECB, 0xFECC, 0xFECA}, // ARABIC LETTER GHAIN {0x063A, 0xFECD, 0xFECF, 0xFED0, 0xFECE}, // ARABIC TATWEEL {0x0640, 0x0640, 0x0640, 0x0640, 0x0640}, // ARABIC LETTER FEH {0x0641, 0xFED1, 0xFED3, 0xFED4, 0xFED2}, // ARABIC LETTER QAF {0x0642, 0xFED5, 0xFED7, 0xFED8, 0xFED6}, // ARABIC LETTER KAF {0x0643, 0xFED9, 0xFEDB, 0xFEDC, 0xFEDA}, // ARABIC LETTER LAM {0x0644, 0xFEDD, 0xFEDF, 0xFEE0, 0xFEDE}, // ARABIC LETTER MEEM {0x0645, 0xFEE1, 0xFEE3, 0xFEE4, 0xFEE2}, // ARABIC LETTER NOON {0x0646, 0xFEE5, 0xFEE7, 0xFEE8, 0xFEE6}, // ARABIC LETTER HEH {0x0647, 0xFEE9, 0xFEEB, 0xFEEC, 0xFEEA}, // ARABIC LETTER WAW {0x0648, 0xFEED, 0, 0, 0xFEEE}, // ARABIC LETTER [UIGHUR KAZAKH KIRGHIZ]? ALEF MAKSURA {0x0649, 0xFEEF, 0xFBE8, 0xFBE9, 0xFEF0}, // ARABIC LETTER YEH {0x064A, 0xFEF1, 0xFEF3, 0xFEF4, 0xFEF2}, // ARABIC LETTER ALEF WASLA {0x0671, 0xFB50, 0, 0, 0xFB51}, // ARABIC LETTER U WITH HAMZA ABOVE {0x0677, 0xFBDD, 0, 0, 0}, // ARABIC LETTER TTEH {0x0679, 0xFB66, 0xFB68, 0xFB69, 0xFB67}, // ARABIC LETTER TTEHEH {0x067A, 0xFB5E, 0xFB60, 0xFB61, 0xFB5F}, // ARABIC LETTER BEEH {0x067B, 0xFB52, 0xFB54, 0xFB55, 0xFB53}, // ARABIC LETTER PEH {0x067E, 0xFB56, 0xFB58, 0xFB59, 0xFB57}, // ARABIC LETTER TEHEH {0x067F, 0xFB62, 0xFB64, 0xFB65, 0xFB63}, // ARABIC LETTER BEHEH {0x0680, 0xFB5A, 0xFB5C, 0xFB5D, 0xFB5B}, // ARABIC LETTER NYEH {0x0683, 0xFB76, 0xFB78, 0xFB79, 0xFB77}, // ARABIC LETTER DYEH {0x0684, 0xFB72, 0xFB74, 0xFB75, 0xFB73}, // ARABIC LETTER TCHEH {0x0686, 0xFB7A, 0xFB7C, 0xFB7D, 0xFB7B}, // ARABIC LETTER TCHEHEH {0x0687, 0xFB7E, 0xFB80, 0xFB81, 0xFB7F}, // ARABIC LETTER DDAL {0x0688, 0xFB88, 0, 0, 0xFB89}, // ARABIC LETTER DAHAL {0x068C, 0xFB84, 0, 0, 0xFB85}, // ARABIC LETTER DDAHAL {0x068D, 0xFB82, 0, 0, 0xFB83}, // ARABIC LETTER DUL {0x068E, 0xFB86, 0, 0, 0xFB87}, // ARABIC LETTER RREH {0x0691, 0xFB8C, 0, 0, 0xFB8D}, // ARABIC LETTER JEH {0x0698, 0xFB8A, 0, 0, 0xFB8B}, // ARABIC LETTER VEH {0x06A4, 0xFB6A, 0xFB6C, 0xFB6D, 0xFB6B}, // ARABIC LETTER PEHEH {0x06A6, 0xFB6E, 0xFB70, 0xFB71, 0xFB6F}, // ARABIC LETTER KEHEH {0x06A9, 0xFB8E, 0xFB90, 0xFB91, 0xFB8F}, // ARABIC LETTER NG {0x06AD, 0xFBD3, 0xFBD5, 0xFBD6, 0xFBD4}, // ARABIC LETTER GAF {0x06AF, 0xFB92, 0xFB94, 0xFB95, 0xFB93}, // ARABIC LETTER NGOEH {0x06B1, 0xFB9A, 0xFB9C, 0xFB9D, 0xFB9B}, // ARABIC LETTER GUEH {0x06B3, 0xFB96, 0xFB98, 0xFB99, 0xFB97}, // ARABIC LETTER NOON GHUNNA {0x06BA, 0xFB9E, 0, 0, 0xFB9F}, // ARABIC LETTER RNOON {0x06BB, 0xFBA0, 0xFBA2, 0xFBA3, 0xFBA1}, // ARABIC LETTER HEH DOACHASHMEE {0x06BE, 0xFBAA, 0xFBAC, 0xFBAD, 0xFBAB}, // ARABIC LETTER HEH WITH YEH ABOVE {0x06C0, 0xFBA4, 0, 0, 0xFBA5}, // ARABIC LETTER HEH GOAL {0x06C1, 0xFBA6, 0xFBA8, 0xFBA9, 0xFBA7}, // ARABIC LETTER KIRGHIZ OE {0x06C5, 0xFBE0, 0, 0, 0xFBE1}, // ARABIC LETTER OE {0x06C6, 0xFBD9, 0, 0, 0xFBDA}, // ARABIC LETTER U {0x06C7, 0xFBD7, 0, 0, 0xFBD8}, // ARABIC LETTER YU {0x06C8, 0xFBDB, 0, 0, 0xFBDC}, // ARABIC LETTER KIRGHIZ YU {0x06C9, 0xFBE2, 0, 0, 0xFBE3}, // ARABIC LETTER VE {0x06CB, 0xFBDE, 0, 0, 0xFBDF}, // ARABIC LETTER FARSI YEH {0x06CC, 0xFBFC, 0xFBFE, 0xFBFF, 0xFBFD}, // ARABIC LETTER E {0x06D0, 0xFBE4, 0xFBE6, 0xFBE7, 0xFBE5}, // ARABIC LETTER YEH BARREE {0x06D2, 0xFBAE, 0, 0, 0xFBAF}, // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE {0x06D3, 0xFBB0, 0, 0, 0xFBB1}, // ZWJ {0x200D, 0x200D, 0x200D, 0x200D, 0x200D}, }; // Our ligatures are all simple A+B -> C conversions struct ArabicLigature { uint32_t source[2]; uint32_t target; bool mandatory; }; static ArabicLigature arabic_ligatures[] = { {{0xFEDF, 0xFE8E}, 0xFEFB, true}, {{0xFEDF, 0xFE82}, 0xFEF5, true}, {{0xFEDF, 0xFE84}, 0xFEF7, true}, {{0xFEDF, 0xFE88}, 0xFEF9, true}, {{0xFEE0, 0xFE8E}, 0xFEFC, true}, {{0xFEE0, 0xFE82}, 0xFEF6, true}, {{0xFEE0, 0xFE84}, 0xFEF8, true}, {{0xFEE0, 0xFE88}, 0xFEFA, true}, {{0xFE8D, 0xFEDF}, 0xFBF0, false}, {{0xFE8E, 0xFEDF}, 0xFBF0, false}, {{0xFEDF, 0xFEDF}, 0xFBF1, false}, {{0xFEE0, 0xFEDF}, 0xFBF1, false}, {{0xFE8B, 0xFE8E}, 0xFBF2, false}, {{0xFE8C, 0xFE8E}, 0xFBF2, false}, {{0xFEE7, 0xFE8E}, 0xFBF3, false}, {{0xFEE8, 0xFE8E}, 0xFBF3, false}, {{0xFE91, 0xFE8E}, 0xFBF4, false}, {{0xFE92, 0xFE8E}, 0xFBF4, false}, {{0xFEF3, 0xFE8E}, 0xFBF5, false}, {{0xFEF4, 0xFE8E}, 0xFBF5, false}, {{0xFEAD, 0xFE8D}, 0xFBF6, false}, {{0xFEAE, 0xFE8D}, 0xFBF6, false}, {{0xFEAF, 0xFE8D}, 0xFBF7, false}, {{0xFEB0, 0xFE8D}, 0xFBF7, false}, {{0xFEAD, 0xFEDF}, 0xFBF8, false}, {{0xFEAE, 0xFEDF}, 0xFBF8, false}, {{0xFEAF, 0xFEDF}, 0xFBF9, false}, {{0xFEB0, 0xFEDF}, 0xFBF9, false}, {{0xFEDF, 0xFEE0}, 0xFBF1, false}, {{0xFEE0, 0xFEE0}, 0xFBF1, false}, }; static hashmap* arabic_letters_map; static hashmap* arabic_ligatures_map; void bidi_init(void) { arabic_letters_map = hashmap_create(); for (size_t i = 0; i < sizeof(arabic_letters)/sizeof(ArabicLetter); i++) { hashmap_set( arabic_letters_map, &arabic_letters[i].letter, sizeof(uint32_t), (uintptr_t) &arabic_letters[i] ); } arabic_ligatures_map = hashmap_create(); for (size_t i = 0; i < sizeof(arabic_ligatures)/sizeof(ArabicLigature); i++) { hashmap_set( arabic_ligatures_map, &arabic_ligatures[i].source, sizeof(uint32_t) * 2, (uintptr_t) &arabic_ligatures[i] ); } } void bidi_destroy(void) { VVV_freefunc(hashmap_free, arabic_ligatures_map); VVV_freefunc(hashmap_free, arabic_letters_map); } bool is_directional_character(const uint32_t codepoint) { // LEFT-TO-RIGHT MARK and RIGHT-TO-LEFT MARK if (codepoint == 0x200E || codepoint == 0x200F) return true; // Some other directional formatting: LRE, RLE, PDF, RLO, LRO if (codepoint >= 0x202A && codepoint <= 0x202E) return true; // The more recent isolates: LRI, RLI, FSI, PDI if (codepoint >= 0x2066 && codepoint <= 0x2069) return true; return false; } bool is_joiner(const uint32_t codepoint) { return codepoint == 0x200C || codepoint == 0x200D; } bool bidi_should_transform(const bool rtl, const char* text) { /* Just as an optimization, only run the whole bidi machinery if the * language is actually an RTL one, _or_ if an RTL character is found. */ if (rtl) { return true; } const char* text_ptr = text; uint32_t ch; while ((ch = UTF8_next(&text_ptr))) { // The standard Hebrew and Arabic blocks if (ch >= 0x590 && ch <= 0x77F) return true; // Extended Arabic B and A if (ch >= 0x870 && ch <= 0x8FF) return true; // Any directional control character if (is_directional_character(ch)) return true; // Hebrew presentation forms if (ch >= 0xFB1D && ch <= 0xFB4F) return true; // Arabic presentation forms A if (ch >= 0xFB50 && ch <= 0xFDFF) return true; // Arabic presentation forms B if (ch >= 0xFE70 && ch <= 0xFEFE) return true; } return false; } const char* bidi_transform(const bool rtl, const char* text) { uint32_t utf32_in[1024]; int n_codepoints = 0; const char* text_ptr = text; uint32_t codepoint; while ((codepoint = UTF8_next(&text_ptr))) { if (codepoint == '\r' || codepoint == '\n') { // Don't treat newlines in font::print differently in bidi codepoint = ' '; } utf32_in[n_codepoints++] = codepoint; if (n_codepoints >= 1023) { break; } } utf32_in[n_codepoints] = 0; if (n_codepoints == 0) { return text; } static char utf8_out[1024]; size_t utf8_out_cur = 0; SBCodepointSequence codepoint_sequence = {SBStringEncodingUTF32, (void*) utf32_in, (SBUInteger) n_codepoints}; SBAlgorithmRef algorithm = SBAlgorithmCreate(&codepoint_sequence); if (algorithm == NULL) { return text; } SBParagraphRef paragraph = SBAlgorithmCreateParagraph( algorithm, 0, INT32_MAX, rtl ? SBLevelDefaultRTL : SBLevelDefaultLTR ); SDL_assert(paragraph != NULL); SBUInteger paragraph_len = SBParagraphGetLength(paragraph); SBLineRef paragraph_line = SBParagraphCreateLine(paragraph, 0, paragraph_len); SDL_assert(paragraph_line != NULL); // Make sure )brackets( are mirrored correctly... SBMirrorLocatorRef mirror_locator = SBMirrorLocatorCreate(); if (mirror_locator != NULL) { SBMirrorLocatorLoadLine(mirror_locator, paragraph_line, (void*) utf32_in); const SBMirrorAgent *mirror_agent = SBMirrorLocatorGetAgent(mirror_locator); while (SBMirrorLocatorMoveNext(mirror_locator)) { utf32_in[mirror_agent->index] = mirror_agent->mirror; } VVV_freefunc(SBMirrorLocatorRelease, mirror_locator); } SBUInteger n_runs = SBLineGetRunCount(paragraph_line); const SBRun *runs = SBLineGetRunsPtr(paragraph_line); for (SBUInteger i = 0; i < n_runs; i++) { bool is_ltr = runs[i].level % 2 == 0; if (!is_ltr) { // Time for reshaping! enum arabic_form { NONE, ISOLATED, INITIAL, MEDIAL, FINAL }; arabic_form forms[1024]; uint32_t replacements[1024]; const ArabicLetter* letter; const ArabicLetter* previous_letter = NULL; arabic_form previous_form = NONE; for (size_t c = 0; c < runs[i].length; c++) { uintptr_t letter_ptr; bool found = hashmap_get(arabic_letters_map, &utf32_in[runs[i].offset + c], sizeof(uint32_t), &letter_ptr); if (!found) { forms[c] = NONE; replacements[c] = 0; previous_form = NONE; previous_letter = NULL; continue; } letter = (const ArabicLetter*) letter_ptr; if (previous_form == NONE) { // Maybe the first letter, or the one after an unknown one forms[c] = ISOLATED; replacements[c] = letter->isolated; } else if (letter->final == 0 && letter->medial == 0) { // letter doesn't connect with the one before forms[c] = ISOLATED; replacements[c] = letter->isolated; } else if (previous_letter->initial == 0 && previous_letter->medial == 0) { // previous_letter doesn't connect with the one after forms[c] = ISOLATED; replacements[c] = letter->isolated; } else if (previous_form == FINAL && previous_letter->medial == 0) { // previous_letter doesn't connect with the ones before and after forms[c] = ISOLATED; replacements[c] = letter->isolated; } else if (previous_form == ISOLATED) { forms[c-1] = INITIAL; forms[c] = FINAL; replacements[c-1] = previous_letter->initial; replacements[c] = letter->final; } else { /* Otherwise, we will change the previous letter * to connect to the current letter */ forms[c-1] = MEDIAL; forms[c] = FINAL; replacements[c-1] = previous_letter->medial; replacements[c] = letter->final; } previous_form = forms[c]; previous_letter = (const ArabicLetter*) letter; } // Now that we have all the forms, time to change the codepoints! for (size_t c = 0; c < runs[i].length; c++) { if (replacements[c] != 0) { utf32_in[runs[i].offset + c] = replacements[c]; } } /* Ligature time! We have to do these after the reshaping process, that is, now! * Again, all our ligatures are just A+B -> C, so we can just do a single pass, * up until the second-to-last character (because the last character can't form * a ligature with the character after). * Actually, did I say single pass... The mandatory ligatures must be prioritized * over the optional ones... */ for (char pass = 0; pass < 2; pass++) { for (size_t c = 0; c < runs[i].length - 1; c++) { if (pass == 1 && utf32_in[runs[i].offset + c + 1] == 0xFFFFFFFF) { c++; continue; } uintptr_t ligature_ptr; bool found = hashmap_get(arabic_ligatures_map, &utf32_in[runs[i].offset + c], sizeof(uint32_t)*2, &ligature_ptr); if (!found) { continue; } const ArabicLigature* ligature = (const ArabicLigature*) ligature_ptr; if (pass == 0 && !ligature->mandatory) { continue; } /* We have a match, that means [c]+[c+1] needs to be replaced! * We'll use 0xFFFFFFFF as a special tombstone character, * otherwise we'd have to keep shifting the array contents... */ utf32_in[runs[i].offset + c] = ligature->target; utf32_in[runs[i].offset + c + 1] = 0xFFFFFFFF; // Don't bother comparing the tombstone with the next letter c++; } } } for (size_t c = 0; c < runs[i].length; c++) { size_t ix; if (is_ltr) { ix = runs[i].offset + c; } else { ix = runs[i].offset + runs[i].length - 1 - c; } if (utf32_in[ix] == 0xFFFFFFFF) { continue; } int out_room_left = sizeof(utf8_out) - 1 - utf8_out_cur; if (out_room_left <= 0) { goto no_more_runs; } UTF8_encoding enc = UTF8_encode(utf32_in[ix]); size_t n_copy = SDL_min(enc.nbytes, (size_t) out_room_left); SDL_memcpy( &utf8_out[utf8_out_cur], enc.bytes, n_copy ); utf8_out_cur += n_copy; } } no_more_runs: utf8_out[utf8_out_cur] = '\0'; VVV_freefunc(SBLineRelease, paragraph_line); VVV_freefunc(SBParagraphRelease, paragraph); VVV_freefunc(SBAlgorithmRelease, algorithm); return utf8_out; } } // namespace font ================================================ FILE: desktop_version/src/FontBidi.h ================================================ #ifndef FONTBIDI_H #define FONTBIDI_H #include namespace font { void bidi_init(void); void bidi_destroy(void); bool is_directional_character(uint32_t codepoint); bool is_joiner(uint32_t codepoint); bool bidi_should_transform(bool rtl, const char* text); const char* bidi_transform(bool rtl, const char* text); } // namespace font #endif // FONTBIDI_H ================================================ FILE: desktop_version/src/GOGNetwork.c ================================================ #include "MakeAndPlay.h" #ifndef MAKEANDPLAY #include /* Totally unimplemented right now! */ int32_t GOG_init(void) { return 0; } void GOG_shutdown(void) { } void GOG_update(void) { } void GOG_unlockAchievement(const char *name) { } #endif /* MAKEANDPLAY */ ================================================ FILE: desktop_version/src/Game.cpp ================================================ #define GAME_DEFINITION #include "Game.h" #include #include #include #include #include "ButtonGlyphs.h" #include "Constants.h" #include "CustomLevels.h" #include "DeferCallbacks.h" #include "Editor.h" #include "Entity.h" #include "Enums.h" #include "FileSystemUtils.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "LevelDebugger.h" #include "Localization.h" #include "LocalizationStorage.h" #include "KeyPoll.h" #include "MakeAndPlay.h" #include "Map.h" #include "Music.h" #include "Network.h" #include "RoomnameTranslator.h" #include "Screen.h" #include "Script.h" #include "Unused.h" #include "UTF8.h" #include "UtilityClass.h" #include "VFormat.h" #include "Vlogging.h" #include "XMLUtils.h" static bool GetButtonFromString(const char *pText, SDL_GameControllerButton *button) { if (*pText == '0' || *pText == 'a' || *pText == 'A') { *button = SDL_CONTROLLER_BUTTON_A; return true; } if (SDL_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' || SDL_strcasecmp(pText, "BACK") == 0) { *button = SDL_CONTROLLER_BUTTON_BACK; return true; } if (*pText == '5' || SDL_strcasecmp(pText, "GUIDE") == 0) { *button = SDL_CONTROLLER_BUTTON_GUIDE; return true; } if (*pText == '6' || SDL_strcasecmp(pText, "START") == 0) { *button = SDL_CONTROLLER_BUTTON_START; return true; } if (*pText == '7' || SDL_strcasecmp(pText, "LS") == 0) { *button = SDL_CONTROLLER_BUTTON_LEFTSTICK; return true; } if (*pText == '8' || SDL_strcasecmp(pText, "RS") == 0) { *button = SDL_CONTROLLER_BUTTON_RIGHTSTICK; return true; } if (*pText == '9' || SDL_strcasecmp(pText, "LB") == 0) { *button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; return true; } if (SDL_strcmp(pText, "10") == 0 || SDL_strcasecmp(pText, "RB") == 0) { *button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; return true; } return false; } // Unfortunate forward-declare... My hands are pretty tied static void loadthissummary( const char* filename, struct Game::Summary* summary, tinyxml2::XMLDocument& doc ); static struct Game::Summary get_summary( const char* filename, const char* savename, tinyxml2::XMLDocument& doc ) { tinyxml2::XMLHandle hDoc(&doc); struct Game::Summary summary; SDL_zero(summary); if (!FILESYSTEM_loadTiXml2Document(filename, doc)) { vlog_info("%s not found", savename); return summary; } loadthissummary(savename, &summary, doc); return summary; } void Game::init(void) { SDL_strlcpy(magic, "[vVvVvV]game", sizeof(magic)); roomx = 0; roomy = 0; prevroomx = 0; prevroomy = 0; saverx = 0; savery = 0; savecolour = EntityColour_CREW_CYAN; mutebutton = 0; muted = false; musicmuted = false; musicmutebutton = 0; glitchrunkludge = false; gamestate = TITLEMODE; prevgamestate = TITLEMODE; hascontrol = true; jumpheld = false; advancetext = false; jumppressed = 0; gravitycontrol = 0; teleport = false; edteleportent = 0; //Added in the port! companion = 0; quickrestartkludge = false; tapleft = 0; tapright = 0; press_right = false; press_left = false; press_action = false; press_map = false; press_interact = false; interactheld = false; separate_interact = false; mapheld = false; pausescript = false; completestop = false; activeactivity = -1; act_fade = 0; prev_act_fade = 0; backgroundtext = false; startscript = false; inintermission = false; alarmon = false; alarmdelay = 0; blackout = false; creditposx = 0; creditposy = 0; creditposdelay = 0; oldcreditposx = 0; useteleporter = false; teleport_to_teleporter = 0; activetele = false; readytotele = 0; oldreadytotele = 0; activity_r = 0; activity_g = 0; activity_b = 0; activity_y = 0; creditposition = 0; oldcreditposition = 0; bestgamedeaths = -1; //Accessibility Options colourblindmode = false; noflashingmode = false; slowdown = 30; nodeathmode = false; nocutscenes = false; ndmresultcrewrescued = 0; ndmresulttrinkets = 0; ndmresulthardestroom.clear(); ndmresulthardestroom_x = hardestroom_x; ndmresulthardestroom_y = hardestroom_y; ndmresulthardestroom_specialname = false; nodeatheligible = false; customcol=0; SDL_memset(crewstats, false, sizeof(crewstats)); SDL_memset(ndmresultcrewstats, false, sizeof(ndmresultcrewstats)); SDL_memset(besttimes, -1, sizeof(besttimes)); SDL_memset(bestframes, -1, sizeof(bestframes)); SDL_memset(besttrinkets, -1, sizeof(besttrinkets)); SDL_memset(bestlives, -1, sizeof(bestlives)); SDL_memset(bestrank, -1, sizeof(bestrank)); crewstats[0] = true; lastsaved = 0; //Menu stuff initiliased here: SDL_memset(unlock, false, sizeof(unlock)); SDL_memset(unlocknotify, false, sizeof(unlock)); currentmenuoption = 0; menutestmode = false; current_credits_list_index = 0; translator_credits_pagenum = 0; menuxoff = 0; menuyoff = 0; menucountdown = 0; levelpage=0; playcustomlevel=0; gpmenu_lastbutton = SDL_CONTROLLER_BUTTON_INVALID; gpmenu_confirming = false; gpmenu_showremove = false; silence_settings_error = false; deathcounts = 0; gameoverdelay = 0; framecounter = 0; seed_use_sdl_getticks = false; editor_disabled = false; resetgameclock(); gamesaved = false; gamesavefailed = false; savetime = "00:00"; savetrinkets = 0; /* These are only used some of the time. */ saveframes = 0; saveseconds = 0; intimetrial = false; timetrialcountdown = 0; timetrialshinytarget = 0; timetrialparlost = false; timetrialpar = 0; timetrialcheater = false; timetrialresulttime = 0; timetrialresultframes = 0; timetrialresultshinytarget = 0; timetrialresulttrinkets = 0; timetrialresultpar = 0; timetrialresultdeaths = 0; start_translator_exploring = false; translator_exploring = false; translator_exploring_allowtele = false; translator_cutscene_test = false; totalflips = 0; hardestroom = "Welcome Aboard"; hardestroomdeaths = 0; hardestroom_x = 13; hardestroom_y = 5; hardestroom_specialname = false; hardestroom_finalstretch = false; currentroomdeaths=0; inertia = 1.1f; swnmode = false; swntimer = 0; swngame = SWN_NONE; // Not playing sine wave ninja! swnstate = 0; swnstate2 = 0; swnstate3 = 0; swnstate4 = 0; swndelay = 0; swndeaths = 0; supercrewmate = false; scmhurt = false; scmprogress = 0; swncolstate = 0; swncoldelay = 0; swnrecord = 0; swnbestrank = 0; swnrank = 0; swnmessage = 0; clearcustomlevelstats(); saveFilePath = FILESYSTEM_getUserSaveDirectory(); tinyxml2::XMLDocument doc; last_quicksave = get_summary("saves/qsave.vvv", "qsave.vvv", doc); tinyxml2::XMLDocument docTele; last_telesave = get_summary("saves/tsave.vvv", "tsave.vvv", doc); screenshake = flashlight = 0 ; stat_trinkets = 0; state = 1; statedelay = 0; statelocked = false; //updatestate(); skipfakeload = false; ghostsenabled = false; cliplaytest = false; playx = 0; playy = 0; playrx = 0; playry = 0; playgc = 0; fadetomenu = false; fadetomenudelay = 0; fadetolab = false; fadetolabdelay = 0; over30mode = true; showingametimer = false; ingame_titlemode = false; ingame_editormode = false; kludge_ingametemp = Menu::mainmenu; slidermode = SLIDER_NONE; disablepause = false; disableaudiopause = false; disabletemporaryaudiopause = true; inputdelay = false; old_skip_message_timer = 0; skip_message_timer = 0; old_mode_indicator_timer = 0; mode_indicator_timer = 0; old_screenshot_border_timer = 0; screenshot_border_timer = 0; screenshot_saved_success = false; #if defined(__ANDROID__) || TARGET_OS_IPHONE checkpoint_saving = true; #else checkpoint_saving = false; #endif setdefaultcontrollerbuttons(); } void Game::setdefaultcontrollerbuttons(void) { 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); } if (controllerButton_restart.size() < 1) { controllerButton_restart.push_back(SDL_CONTROLLER_BUTTON_RIGHTSHOULDER); } if (controllerButton_interact.size() < 1) { controllerButton_interact.push_back(SDL_CONTROLLER_BUTTON_X); } /* If one of the arrays was empty, and others weren't, we might now have conflicts... * A crucial one is if the ACTION button is also "ESC", because then you can't * fix it with just a controller anymore, which might make the game unplayable. * This is similar to updatebuttonmappings() in Input.cpp, except less... complete? */ for (size_t f = 0; f < controllerButton_flip.size(); f++) { for (size_t e = 0; e < controllerButton_esc.size(); e++) { if (controllerButton_flip[f] == controllerButton_esc[e]) { controllerButton_esc.erase(controllerButton_esc.begin() + e); break; } } } } void Game::lifesequence(void) { if (lifeseq > 0) { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { 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 (INBOUNDS_VEC(i, obj.entities) && (lifeseq <= 0 || noflashingmode)) { obj.entities[i].invis = false; } } } void Game::clearcustomlevelstats(void) { //just clearing the array customlevelstats.clear(); } void Game::updatecustomlevelstats(std::string clevel, int cscore) { if (!map.custommodeforreal) { /* We are playtesting, don't update level stats */ return; } if (clevel.find("levels/") != std::string::npos) { clevel = clevel.substr(7); } if (customlevelstats.count(clevel) == 0 || cscore > customlevelstats[clevel]) { customlevelstats[clevel] = cscore; } savecustomlevelstats(); } void Game::deletecustomlevelstats(void) { customlevelstats.clear(); if (!FILESYSTEM_delete("saves/levelstats.vvv")) { vlog_error("Error deleting levelstats.vvv"); } } #define LOAD_ARRAY_RENAME(ARRAY_NAME, DEST) \ if (SDL_strcmp(pKey, #ARRAY_NAME) == 0 && pText[0] != '\0') \ { \ /* We're loading in 32-bit integers. If we need more than 16 chars, * something is seriously wrong */ \ char buffer[16]; \ size_t start = 0; \ size_t i = 0; \ \ while (next_split_s(buffer, sizeof(buffer), &start, pText, ',')) \ { \ if (i >= SDL_arraysize(DEST)) \ { \ break; \ } \ \ DEST[i] = help.Int(buffer); \ ++i; \ } \ } #define LOAD_ARRAY(ARRAY_NAME) LOAD_ARRAY_RENAME(ARRAY_NAME, ARRAY_NAME) void Game::loadcustomlevelstats(void) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); if (!FILESYSTEM_loadTiXml2Document("saves/levelstats.vvv", doc)) { //No levelstats file exists; start new customlevelstats.clear(); savecustomlevelstats(); return; } if (doc.Error()) { vlog_error("Error parsing levelstats.vvv: %s", doc.ErrorStr()); return; } customlevelstats.clear(); tinyxml2::XMLElement* pElem; tinyxml2::XMLElement* firstElement; firstElement = hDoc .FirstChildElement() .FirstChildElement("Data") .FirstChildElement() .ToElement(); // First pass, look for the new system of storing stats // If they don't exist, then fall back to the old system for (pElem = firstElement; pElem != NULL; pElem = pElem->NextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText(); if (pText == NULL) { pText = ""; } if (SDL_strcmp(pKey, "stats") == 0) { bool file_has_duplicates = false; for (tinyxml2::XMLElement* stat_el = pElem->FirstChildElement(); stat_el; stat_el = stat_el->NextSiblingElement()) { int score = 0; std::string name; if (stat_el->GetText() != NULL) { score = help.Int(stat_el->GetText()); } if (stat_el->Attribute("name")) { name = stat_el->Attribute("name"); } int existing = customlevelstats.count(name); if (existing > 0) { file_has_duplicates = true; } if (existing == 0 || score > customlevelstats[name]) { customlevelstats[name] = score; } } if (file_has_duplicates) { /* This might be really inflated, so simply save the map we have now, * so we don't have to keep loading a 90 MB file. */ savecustomlevelstats(); } return; } } // Since we're still here, we must be on the old system std::vector customlevelnames; std::vector customlevelscores; for (pElem = firstElement; pElem; pElem=pElem->NextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; if(pText == NULL) { pText = ""; } if (SDL_strcmp(pKey, "customlevelscore") == 0 && pText[0] != '\0') { char buffer[16]; size_t start = 0; while (next_split_s(buffer, sizeof(buffer), &start, pText, ',')) { customlevelscores.push_back(help.Int(buffer)); } } if (SDL_strcmp(pKey, "customlevelstats") == 0 && pText[0] != '\0') { size_t start = 0; size_t len = 0; size_t prev_start = 0; while (next_split(&start, &len, &pText[start], '|')) { customlevelnames.push_back(std::string(&pText[prev_start], len)); prev_start = start; } } } // If the two arrays happen to differ in length, just go with the smallest one for (size_t i = 0; i < SDL_min(customlevelnames.size(), customlevelscores.size()); i++) { const std::string& name = customlevelnames[i]; const int score = customlevelscores[i]; if (customlevelstats.count(name) == 0 || score > customlevelstats[name]) { customlevelstats[name] = score; } } } void Game::savecustomlevelstats(void) { tinyxml2::XMLDocument doc; bool already_exists = FILESYSTEM_loadTiXml2Document("saves/levelstats.vvv", doc); if (!already_exists) { vlog_info("No levelstats.vvv found. Creating new file"); } else if (doc.Error()) { vlog_error("Error parsing existing levelstats.vvv: %s", doc.ErrorStr()); vlog_info("Creating new levelstats.vvv"); } xml::update_declaration(doc); tinyxml2::XMLElement * root = xml::update_element(doc, "Levelstats"); xml::update_comment(root, " Levelstats Save file "); tinyxml2::XMLElement * msgs = xml::update_element(root, "Data"); int numcustomlevelstats = customlevelstats.size(); if(numcustomlevelstats>=200)numcustomlevelstats=199; xml::update_tag(msgs, "numcustomlevelstats", numcustomlevelstats); std::string customlevelscorestr; std::string customlevelstatsstr; std::map::iterator iter; for (iter = customlevelstats.begin(); iter != customlevelstats.end(); iter++) { customlevelscorestr += help.String(iter->second) + ","; customlevelstatsstr += iter->first + "|"; } xml::update_tag(msgs, "customlevelscore", customlevelscorestr.c_str()); xml::update_tag(msgs, "customlevelstats", customlevelstatsstr.c_str()); // New system tinyxml2::XMLElement* msg = xml::update_element_delete_contents(msgs, "stats"); tinyxml2::XMLElement* stat_el; for (iter = customlevelstats.begin(); iter != customlevelstats.end(); iter++) { stat_el = doc.NewElement("stat"); stat_el->SetAttribute("name", iter->first.c_str()); stat_el->LinkEndChild(doc.NewText(help.String(iter->second).c_str())); msg->LinkEndChild(stat_el); } if(FILESYSTEM_saveTiXml2Document("saves/levelstats.vvv", doc)) { vlog_info("Level stats saved"); } else { vlog_error("Could Not Save level stats!"); vlog_error("Failed: %s%s", saveFilePath, "levelstats.vvv"); } } void Game::levelcomplete_textbox(void) { graphics.createtextboxflipme("", -1, 12, TEXT_COLOUR("cyan")); graphics.addline(" "); graphics.addline(""); graphics.addline(""); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); graphics.setimage(TEXTIMAGE_LEVELCOMPLETE); graphics.setlinegap(0); graphics.textboxapplyposition(); } static void compute_crewmate_textbox(textboxclass* THIS) { THIS->lines.clear(); THIS->addline(""); const int extra_cjk_height = (font::height(PR_FONT_INTERFACE) * 4) - 32; THIS->yp = 64 + 8 + 16 - extra_cjk_height/2; /* This is a special case for wrapping, we MUST have two lines. * So just make sure it can't fit in one line. */ const char* text = loc::gettext("You have rescued a crew member!"); std::string wrapped = font::string_wordwrap_balanced(PR_FONT_INTERFACE, text, font::len(PR_FONT_INTERFACE, text)-1); size_t startline = 0; size_t newline; do { size_t pos_n = wrapped.find('\n', startline); size_t pos_p = wrapped.find('|', startline); newline = SDL_min(pos_n, pos_p); THIS->addline(wrapped.substr(startline, newline-startline)); startline = newline+1; } while (newline != std::string::npos); THIS->addline(""); THIS->centertext(); float spaces_per_8 = font::len(PR_FONT_INTERFACE, " ")/8.0f; THIS->pad(SDL_ceilf(5/spaces_per_8), SDL_ceilf(2/spaces_per_8)); if (!THIS->sprites.empty()) { THIS->sprites[0].y = 12 + extra_cjk_height/2; } } void Game::crewmate_textbox(const int color) { const int extra_cjk_height = (font::height(PR_FONT_INTERFACE) * 4) - 32; graphics.createtextboxflipme("", -1, 64 + 8 + 16, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.addsprite(14, 12 + extra_cjk_height/2, 0, color); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, compute_crewmate_textbox); graphics.setlinegap(0); graphics.textboxapplyposition(); } static void compute_remaining_textbox(textboxclass* THIS) { extern Game game; const int remaining = 6 - game.crewrescued(); char buffer[SCREEN_WIDTH_CHARS + 1]; if (remaining > 0) { loc::gettext_plural_fill(buffer, sizeof(buffer), "{n_crew|wordy} remain", "{n_crew|wordy} remains", "n_crew:int", remaining); } else { SDL_strlcpy(buffer, loc::gettext("All Crew Members Rescued!"), sizeof(buffer)); } THIS->lines.clear(); THIS->lines.push_back(buffer); // In CJK, the "You have rescued" box becomes so big we should lower this one a bit... const int cjk_lowering = font::height(PR_FONT_INTERFACE) - 8; THIS->yp = 128 + 16 + cjk_lowering; THIS->pad(2, 2); } void Game::remaining_textbox(void) { graphics.createtextboxflipme("", -1, 128 + 16, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, compute_remaining_textbox); graphics.textboxapplyposition(); } static void compute_actionprompt_textbox(textboxclass* THIS) { THIS->lines.clear(); char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Press {button} to continue"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_ACTION) ); THIS->lines.push_back(buffer); THIS->pad(1, 1); } void Game::actionprompt_textbox(void) { graphics.createtextboxflipme("", -1, 196, TEXT_COLOUR("cyan")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, compute_actionprompt_textbox); graphics.textboxapplyposition(); } static void savetele_textbox_success(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("Game Saved")); THIS->pad(3, 3); } static void save_textbox_fail(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("ERROR: Could not save game!")); THIS->wrap(2); THIS->pad(1, 1); } void Game::show_save_fail(void) { graphics.createtextboxflipme("", -1, 12, TEXT_COLOUR("red")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(50); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, save_textbox_fail); } void Game::checkpoint_save(void) { if (checkpoint_saving && !inspecial() && (!map.custommode || (map.custommode && map.custommodeforreal)) && !cliplaytest) { bool success = map.custommode ? customsavequick(cl.ListOfMetaData[playcustomlevel].filename) : savequick(); gamesaved = success; gamesavefailed = !success; if (gamesavefailed) { show_save_fail(); graphics.textboxapplyposition(); } } } void Game::savetele_textbox(void) { if (inspecial() || map.custommode) { return; } if (savetele()) { graphics.createtextboxflipme("", -1, 12, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(25); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, savetele_textbox_success); } else { show_save_fail(); } graphics.textboxapplyposition(); } static void wasd_textbox(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(BUTTONGLYPHS_get_wasd_text()); THIS->wrap(4); THIS->centertext(); THIS->pad(2, 2); } static void flip_textbox(textboxclass* THIS) { THIS->lines.clear(); char buffer[SCREEN_WIDTH_CHARS*3 + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Press {button} to flip"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_ACTION) ); THIS->lines.push_back(buffer); THIS->wrap(4); THIS->centertext(); THIS->pad(2, 2); } static void arrowkey_textbox(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("If you prefer, you can press UP or DOWN instead of ACTION to flip.")); THIS->wrap(2); THIS->centertext(); THIS->pad(1, 1); } static void map_textbox(textboxclass* THIS) { THIS->lines.clear(); char buffer[SCREEN_WIDTH_CHARS*3 + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Press {button} to view map and quicksave"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_Map) ); THIS->lines.push_back(buffer); THIS->wrap(4); THIS->centertext(); THIS->pad(2, 2); } static void im1_instructions_textbox1(textboxclass* THIS) { extern Game game; THIS->lines.clear(); // Intermission 1 instructional textbox, depends on last saved const char* floorceiling = graphics.flipmode ? "ceiling" : "floor"; const char* crewmate; switch (game.lastsaved) { case 2: crewmate = "Vitellary"; break; case 3: crewmate = "Vermilion"; break; case 4: crewmate = "Verdigris"; break; case 5: crewmate = "Victoria"; break; default: crewmate = "your companion"; } char english[SCREEN_WIDTH_TILES*3 + 1]; /* ASCII only */ vformat_buf(english, sizeof(english), "When you're standing on the {floorceiling}, {crewmate} will try to walk to you.", "floorceiling:str, crewmate:str", floorceiling, crewmate ); THIS->lines.push_back(loc::gettext(english)); THIS->wrap(2); THIS->padtowidth(36*8); } static void im1_instructions_textbox2(textboxclass* THIS) { extern Game game; THIS->lines.clear(); // Intermission 1 instructional textbox, depends on last saved const char* floorceiling = graphics.flipmode ? "ceiling" : "floor"; const char* crewmate; switch (game.lastsaved) { case 2: crewmate = "Vitellary"; break; case 3: crewmate = "Vermilion"; break; case 4: crewmate = "Verdigris"; break; case 5: crewmate = "Victoria"; break; default: crewmate = "your companion"; } char english[SCREEN_WIDTH_TILES*3 + 1]; /* ASCII only */ vformat_buf(english, sizeof(english), "When you're NOT standing on the {floorceiling}, {crewmate} will stop and wait for you.", "floorceiling:str, crewmate:str", floorceiling, crewmate ); THIS->lines.push_back(loc::gettext(english)); THIS->wrap(2); THIS->padtowidth(36*8); } static void im1_instructions_textbox3(textboxclass* THIS) { extern Game game; THIS->lines.clear(); // Intermission 1 instructional textbox, depends on last saved const char* english; switch (game.lastsaved) { case 2: case 3: case 4: english = "You can't continue to the next room until he is safely across."; break; case 5: english = "You can't continue to the next room until she is safely across."; break; default: english = "You can't continue to the next room until they are safely across."; } THIS->lines.push_back(loc::gettext(english)); THIS->wrap(2); THIS->padtowidth(36*8); } /* Also used in foundtrinket() script command. */ void foundtrinket_textbox1(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("Congratulations!\n\nYou have found a shiny trinket!")); THIS->wrap(2); THIS->centertext(); THIS->pad(1, 1); } /* Also used in foundtrinket() script command. */ void foundtrinket_textbox2(textboxclass* THIS) { extern Game game; THIS->lines.clear(); const int max_trinkets = map.custommode ? cl.numtrinkets() : 20; char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("{n_trinkets|wordy} out of {max_trinkets|wordy}"), "n_trinkets:int, max_trinkets:int", game.trinkets(), max_trinkets ); THIS->lines.push_back(buffer); if (INBOUNDS_VEC(THIS->other_textbox_index, graphics.textboxes) && &graphics.textboxes[THIS->other_textbox_index] != THIS) { THIS->yp = 95 + graphics.textboxes[THIS->other_textbox_index].h; } THIS->wrap(2); THIS->centertext(); THIS->pad(1, 1); } static void foundcrewmate_textbox1(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("Congratulations!\n\nYou have found a lost crewmate!")); THIS->wrap(2); THIS->centertext(); THIS->pad(1, 1); } static void foundcrewmate_textbox2(textboxclass* THIS) { extern Game game; THIS->lines.clear(); const int num_remaining = cl.numcrewmates() - game.crewmates(); if (num_remaining == 0) { THIS->lines.push_back(loc::gettext("All crewmates rescued!")); } else { char buffer[SCREEN_WIDTH_CHARS + 1]; loc::gettext_plural_fill( buffer, sizeof(buffer), "{n_crew|wordy} remain", "{n_crew|wordy} remains", "n_crew:int", num_remaining ); THIS->lines.push_back(buffer); } if (INBOUNDS_VEC(THIS->other_textbox_index, graphics.textboxes) && &graphics.textboxes[THIS->other_textbox_index] != THIS) { THIS->yp = 95 + graphics.textboxes[THIS->other_textbox_index].h; } THIS->wrap(4); THIS->centertext(); THIS->pad(2, 2); } static void gamecomplete_textbox2(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("All Crew Members Rescued!")); } static void gamecomplete_textbox3(textboxclass* THIS) { THIS->lines.clear(); const char* label = loc::gettext("Trinkets Found:"); THIS->lines.push_back(label); THIS->xp = 170 - font::len(PR_FONT_INTERFACE, label); } static void gamecomplete_textbox4(textboxclass* THIS) { extern Game game; THIS->lines.clear(); char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::gettext("{gamecomplete_n_trinkets|wordy}"), "gamecomplete_n_trinkets:int", game.trinkets() ); THIS->lines.push_back(buffer); } static void gamecomplete_textbox5(textboxclass* THIS) { THIS->lines.clear(); const char* label = loc::gettext("Game Time:"); THIS->lines.push_back(label); THIS->xp = 170 - font::len(PR_FONT_INTERFACE, label); } static void gamecomplete_textbox6(textboxclass* THIS) { extern Game game; THIS->lines.clear(); char buffer[SCREEN_WIDTH_CHARS + 1]; help.format_time(buffer, sizeof(buffer), game.saveseconds, game.saveframes, true); THIS->lines.push_back(buffer); } static void gamecomplete_textbox7(textboxclass* THIS) { THIS->lines.clear(); const char* label = loc::gettext("Total Flips:"); THIS->lines.push_back(label); THIS->xp = 170 - font::len(PR_FONT_INTERFACE, label); } static void gamecomplete_textbox9(textboxclass* THIS) { THIS->lines.clear(); const char* label = loc::gettext("Total Deaths:"); THIS->lines.push_back(label); THIS->xp = 170 - font::len(PR_FONT_INTERFACE, label); } static void gamecomplete_textbox11(textboxclass* THIS) { extern Game game; THIS->lines.clear(); char buffer[SCREEN_WIDTH_CHARS + 1]; loc::gettext_plural_fill( buffer, sizeof(buffer), "Hardest Room (with {n_deaths} deaths)", "Hardest Room (with {n_deaths} death)", "n_deaths:int", game.hardestroomdeaths ); THIS->lines.push_back(buffer); } static void gamecomplete_textbox12(textboxclass* THIS) { extern Game game; THIS->lines.clear(); THIS->lines.push_back( loc::gettext_roomname( map.custommode, game.hardestroom_x, game.hardestroom_y, game.hardestroom.c_str(), game.hardestroom_specialname ) ); } void Game::setstate(const int gamestate) { if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { state = gamestate; } } void Game::incstate(void) { if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { state++; } } void Game::setstatedelay(const int delay) { if (!statelocked || GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { statedelay = delay; } } void Game::lockstate(void) { statelocked = true; } void Game::unlockstate(void) { statelocked = false; } void Game::updatestate(void) { statedelay--; if (statedelay <= 0) { statedelay = 0; glitchrunkludge=false; } if (statedelay <= 0) { switch(state) { case 0: //Do nothing here! Standard game state if (script.running) { if (pausescript && !advancetext) { /* Prevent softlocks if we somehow don't have advancetext */ pausescript = false; } } else { if (completestop) { /* Close potential collection dialogue if warping to ship */ graphics.textboxremove(); graphics.showcutscenebars = false; } /* Prevent softlocks if there's no cutscene running right now */ hascontrol = true; completestop = false; } break; case 1: //Game initilisation setstate(0); break; case 2: //Opening cutscene advancetext = true; hascontrol = false; setstate(3); graphics.createtextbox("To do: write quick", 50, 80, TEXT_COLOUR("cyan")); graphics.addline("intro to story!"); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); //Oh no! what happen to rest of crew etc crash into dimension break; case 4: //End of opening cutscene for now graphics.createtextbox("", -1, 195, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(60); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, wasd_textbox); graphics.textboxapplyposition(); setstate(0); break; case 5: //Demo over advancetext = true; hascontrol = false; startscript = true; newscript="returntohub"; obj.removetrigger(5); setstate(6); break; case 7: //End of opening cutscene for now graphics.textboxremove(); hascontrol = true; advancetext = false; setstate(0); break; case 8: //Enter dialogue obj.removetrigger(8); if (!obj.flags[13]) { obj.flags[13] = true; graphics.createtextbox("", -1, 155, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(60); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, map_textbox); graphics.textboxapplyposition(); } setstate(0); break; case 9: if (!map.custommode && nocompetitive()) { returntolab(); startscript = true; newscript = "disableaccessibility"; setstate(0); break; } //Start SWN Minigame Mode B obj.removetrigger(9); swnmode = true; swngame = SWN_START_SUPERGRAVITRON_STEP_1; 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; setstate(0); break; case 10: //Start SWN Minigame Mode A obj.removetrigger(10); swnmode = true; swngame = SWN_START_GRAVITRON_STEP_1; 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; setstate(0); break; case 11: graphics.textboxremovefast(); graphics.createtextbox("", -1, 3, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(180); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, im1_instructions_textbox2); graphics.textboxapplyposition(); setstate(0); break; case 12: obj.removetrigger(12); if (!obj.flags[61]) { obj.flags[61] = true; graphics.textboxremovefast(); graphics.createtextbox("", -1, 3, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(120); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, im1_instructions_textbox3); graphics.textboxapplyposition(); } setstate(0); break; case 13: //textbox removal obj.removetrigger(13); graphics.textboxremovefast(); setstate(0); break; case 14: graphics.createtextbox("", -1, 3, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(280); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, im1_instructions_textbox1); graphics.textboxapplyposition(); setstate(0); break; case 15: { //leaving the naughty corner int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[obj.getplayer()].tile = 0; } setstate(0); break; } case 16: { //entering the naughty corner int i = obj.getplayer(); if(INBOUNDS_VEC(i, obj.entities) && obj.entities[i].tile == 0) { obj.entities[i].tile = 144; music.playef(Sound_CRY); } setstate(0); break; } case 17: //Arrow key tutorial obj.removetrigger(17); if (BUTTONGLYPHS_keyboard_is_active()) { graphics.createtextbox("", -1, 187, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(100); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, arrowkey_textbox); graphics.textboxapplyposition(); } setstate(0); break; case 20: if (!obj.flags[1]) { obj.flags[1] = true; setstate(0); graphics.textboxremove(); } obj.removetrigger(20); break; case 21: if (!obj.flags[2]) { obj.flags[2] = true; setstate(0); graphics.textboxremove(); } obj.removetrigger(21); break; case 22: if (!obj.flags[3]) { graphics.textboxremovefast(); obj.flags[3] = true; setstate(0); graphics.createtextbox("", -1, 25, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtimer(60); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, flip_textbox); graphics.textboxapplyposition(); } obj.removetrigger(22); break; case 30: //Generic "run script" if (!obj.flags[4]) { obj.flags[4] = true; startscript = true; newscript="firststeps"; setstate(0); } obj.removetrigger(30); setstate(0); break; case 31: //state = 55; setstatedelay(50); setstate(0); setstatedelay(0); if (!obj.flags[6]) { obj.flags[6] = true; obj.flags[5] = true; startscript = true; newscript="communicationstation"; setstate(0); setstatedelay(0); } obj.removetrigger(31); break; case 32: //Generic "run script" if (!obj.flags[7]) { obj.flags[7] = true; startscript = true; newscript="teleporterback"; setstate(0); } obj.removetrigger(32); setstate(0); break; case 33: //Generic "run script" if (!obj.flags[9]) { obj.flags[9] = true; startscript = true; newscript="rescueblue"; setstate(0); } obj.removetrigger(33); setstate(0); break; case 34: //Generic "run script" if (!obj.flags[10]) { obj.flags[10] = true; startscript = true; newscript="rescueyellow"; setstate(0); } obj.removetrigger(34); setstate(0); break; case 35: //Generic "run script" if (!obj.flags[11]) { obj.flags[11] = true; startscript = true; newscript="rescuegreen"; setstate(0); } obj.removetrigger(35); setstate(0); break; case 36: //Generic "run script" if (!obj.flags[8]) { obj.flags[8] = true; startscript = true; newscript="rescuered"; setstate(0); } obj.removetrigger(36); setstate(0); break; case 37: //Generic "run script" if (companion == 0) { startscript = true; newscript="int2_yellow"; setstate(0); } obj.removetrigger(37); setstate(0); break; case 38: //Generic "run script" if (companion == 0) { startscript = true; newscript="int2_red"; setstate(0); } obj.removetrigger(38); setstate(0); break; case 39: //Generic "run script" if (companion == 0) { startscript = true; newscript="int2_green"; setstate(0); } obj.removetrigger(39); setstate(0); break; case 40: //Generic "run script" if (companion == 0) { startscript = true; newscript="int2_blue"; setstate(0); } obj.removetrigger(40); setstate(0); break; case 41: //Generic "run script" if (!obj.flags[60]) { obj.flags[60] = true; 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"; } setstate(0); } obj.removetrigger(41); setstate(0); break; case 42: //Generic "run script" if (!obj.flags[62]) { obj.flags[62] = true; 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"; } setstate(0); } obj.removetrigger(42); setstate(0); break; case 43: //Generic "run script" if (!obj.flags[63]) { obj.flags[63] = true; 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"; } setstate(0); } obj.removetrigger(43); setstate(0); break; case 44: //Generic "run script" if (!obj.flags[64]) { obj.flags[64] = true; 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"; } setstate(0); } obj.removetrigger(44); setstate(0); break; case 45: //Generic "run script" if (!obj.flags[65]) { obj.flags[65] = true; 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"; } setstate(0); } obj.removetrigger(45); setstate(0); break; case 46: //Generic "run script" if (!obj.flags[66]) { obj.flags[66] = true; 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"; } setstate(0); } obj.removetrigger(46); setstate(0); break; case 47: //Generic "run script" if (!obj.flags[69]) { obj.flags[69] = true; startscript = true; newscript="trenchwarfare"; setstate(0); } obj.removetrigger(47); setstate(0); break; case 48: //Generic "run script" if (!obj.flags[70]) { obj.flags[70] = true; startscript = true; newscript="trinketcollector"; setstate(0); } obj.removetrigger(48); setstate(0); break; case 49: //Start final level music if (!obj.flags[71]) { obj.flags[71] = true; music.niceplay(Music_PREDESTINEDFATEREMIX); setstate(0); } obj.removetrigger(49); setstate(0); break; case 50: music.playef(Sound_VIOLET); graphics.createtextbox("", 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay("Help! Can anyone hear this message?"); graphics.textboxtimer(60); incstate(); setstatedelay(100); break; case 51: music.playef(Sound_VIOLET); graphics.createtextbox("", 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay("Verdigris? Are you out there? Are you ok?"); graphics.textboxtimer(60); incstate(); setstatedelay(100); break; case 52: music.playef(Sound_VIOLET); graphics.createtextbox("", 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay("Please help us! We've crashed and need assistance!"); graphics.textboxtimer(60); incstate(); setstatedelay(100); break; case 53: music.playef(Sound_VIOLET); graphics.createtextbox("", 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay("Hello? Anyone out there?"); graphics.textboxtimer(60); incstate(); setstatedelay(100); break; case 54: music.playef(Sound_VIOLET); graphics.createtextbox("", 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay("This is Doctor Violet from the D.S.S. Souleye! Please respond!"); graphics.textboxtimer(60); incstate(); setstatedelay(100); break; case 55: music.playef(Sound_VIOLET); graphics.createtextbox("", 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay("Please... Anyone..."); graphics.textboxtimer(60); incstate(); setstatedelay(100); break; case 56: music.playef(Sound_VIOLET); graphics.createtextbox("", 5, 8, TEXT_COLOUR("purple")); graphics.textboxcommsrelay("Please be alright, everyone..."); graphics.textboxtimer(60); setstate(50); setstatedelay(100); break; case 80: //Used to return to menu from the game if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 81: quittomenu(); music.play(Music_PRESENTINGVVVVVV); //should be after quittomenu() setstate(0); break; case 82: //Time Trial Complete! obj.removetrigger(82); if (map.custommode && !map.custommodeforreal) { returntoeditor(); ed.show_note(loc::gettext("Time trial completed")); break; } if (translator_exploring) { translator_exploring_allowtele = true; setstate(0); break; } hascontrol = false; if (timetrialcheater) { SDL_zeroa(obj.collect); } timetrialresulttime = help.hms_to_seconds(hours, minutes, seconds); timetrialresultframes = frames; timetrialresulttrinkets = trinkets(); timetrialresultshinytarget = timetrialshinytarget; timetrialresultpar = timetrialpar; timetrialresultdeaths = deathcounts; timetrialrank = 0; if (timetrialresulttime <= timetrialpar) timetrialrank++; if (trinkets() >= timetrialshinytarget) timetrialrank++; if (deathcounts == 0) timetrialrank++; if (timetrialresulttime < besttimes[timetriallevel] || (timetrialresulttime == besttimes[timetriallevel] && timetrialresultframes < bestframes[timetriallevel]) || besttimes[timetriallevel]==-1) { besttimes[timetriallevel] = timetrialresulttime; bestframes[timetriallevel] = timetrialresultframes; } if (timetrialresulttrinkets > 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) { switch (timetriallevel) { case TimeTrial_SPACESTATION1: unlockAchievement("vvvvvvtimetrial_station1_fixed"); break; case TimeTrial_LABORATORY: unlockAchievement("vvvvvvtimetrial_lab_fixed"); break; case TimeTrial_TOWER: unlockAchievement("vvvvvvtimetrial_tower_fixed"); break; case TimeTrial_SPACESTATION2: unlockAchievement("vvvvvvtimetrial_station2_fixed"); break; case TimeTrial_WARPZONE: unlockAchievement("vvvvvvtimetrial_warp_fixed"); break; case TimeTrial_FINALLEVEL: unlockAchievement("vvvvvvtimetrial_final_fixed"); } } } savestatsandsettings(); graphics.fademode = FADE_START_FADEOUT; music.fadeout(); incstate(); break; case 83: frames--; if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 84: quittomenu(); createmenu(Menu::timetrialcomplete); setstate(0); break; case 85: //Cutscene skip version of final level change obj.removetrigger(85); //Init final stretch incstate(); music.playef(Sound_FLASH); music.play(Music_POSITIVEFORCE); obj.flags[72] = true; screenshake = 10; flashlight = 5; map.finalstretch = true; map.warpx = false; map.warpy = false; map.background = 6; map.final_colormode = true; map.final_colorframe = 1; setstate(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); setstate(0); break; case 91: //Generic "run script" startscript = true; newscript="startexpolevel_lab"; obj.removetrigger(91); setstate(0); break; case 92: //Generic "run script" startscript = true; newscript="startexpolevel_warp"; obj.removetrigger(92); setstate(0); break; case 93: //Generic "run script" startscript = true; newscript="startexpolevel_tower"; obj.removetrigger(93); setstate(0); break; case 94: //Generic "run script" startscript = true; newscript="startexpolevel_station2"; obj.removetrigger(94); setstate(0); break; case 95: //Generic "run script" startscript = true; newscript="startexpolevel_final"; obj.removetrigger(95); setstate(0); break; case 96: //Used to return to gravitron to game if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 97: returntolab(); setstate(0); break; case 100: // // Meeting crewmate in the warpzone // obj.removetrigger(100); if (!obj.flags[4]) { obj.flags[4] = true; incstate(); } break; case 101: { int i = obj.getplayer(); hascontrol = false; if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onroof > 0 && gravitycontrol == 1) { gravitycontrol = 0; music.playef(Sound_UNFLIP); } if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onground > 0) { incstate(); } } break; case 102: { companion = 6; int i = obj.getcompanion(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 0; obj.entities[i].state = 1; } advancetext = true; hascontrol = false; graphics.createtextbox("Captain! I've been so worried!", 60, 90, 164, 255, 164); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VERDIGRIS); } break; case 104: graphics.createtextbox("I'm glad you're ok!", 135, 152, TEXT_COLOUR("cyan")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 106: { graphics.createtextbox("I've been trying to find a", 74, 70, 164, 255, 164); graphics.addline("way out, but I keep going"); graphics.addline("around in circles..."); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_CRY); graphics.textboxactive(); int i = obj.getcompanion(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 54; obj.entities[i].state = 0; } } break; case 108: graphics.createtextbox("Don't worry! I have a", 125, 152, TEXT_COLOUR("cyan")); graphics.addline("teleporter key!"); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 110: { int i = obj.getcompanion(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 0; obj.entities[i].state = 1; } graphics.createtextbox("Follow me!", 185, 154, TEXT_COLOUR("cyan")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VIRIDIAN); graphics.textboxactive(); } break; case 112: graphics.textboxremove(); hascontrol = true; advancetext = false; setstate(0); break; case 115: // // Test script for space station, totally delete me! // hascontrol = false; incstate(); break; case 116: advancetext = true; hascontrol = false; graphics.createtextbox("Sorry Eurogamers! Teleporting around", 60 - 20, 200, 255, 64, 64); graphics.addline("the map doesn't work in this version!"); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); incstate(); break; case 118: graphics.textboxremove(); hascontrol = true; advancetext = false; setstate(0); break; case 120: // // Meeting crewmate in the space station // obj.removetrigger(120); if (!obj.flags[5]) { obj.flags[5] = true; incstate(); } break; case 121: { int i = obj.getplayer(); hascontrol = false; if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onground > 0 && gravitycontrol == 0) { gravitycontrol = 1; music.playef(Sound_UNFLIP); } if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].onroof > 0) { incstate(); } } break; case 122: { companion = 7; int i = obj.getcompanion(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 6; obj.entities[i].state = 1; } advancetext = true; hascontrol = false; graphics.createtextbox("Captain! You're ok!", 60-10, 90-40, TEXT_COLOUR("yellow")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VITELLARY); break; } case 124: { graphics.createtextbox("I've found a teleporter, but", 60-20, 90 - 40, TEXT_COLOUR("yellow")); graphics.addline("I can't get it to go anywhere..."); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_CRY); graphics.textboxactive(); break; } case 126: graphics.createtextbox("I can help with that!", 125, 152-40, TEXT_COLOUR("cyan")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 128: graphics.createtextbox("I have the teleporter", 130, 152-35, TEXT_COLOUR("cyan")); graphics.addline("codex for our ship!"); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 130: { graphics.createtextbox("Yey! Let's go home!", 60-30, 90-35, TEXT_COLOUR("yellow")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VITELLARY); graphics.textboxactive(); int i = obj.getcompanion(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 6; obj.entities[i].state = 1; } break; } case 132: graphics.textboxremove(); hascontrol = true; advancetext = false; setstate(0); break; case 200: //Init final stretch incstate(); music.playef(Sound_FLASH); obj.flags[72] = true; 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"; setstate(0); break; // WARNING: If updating this code, make sure to update Map.cpp mapclass::twoframedelayfix() case 300: case 301: case 302: case 303: case 304: case 305: case 306: case 307: case 308: case 309: case 310: case 311: case 312: case 313: case 314: case 315: case 316: case 317: case 318: case 319: case 320: case 321: case 322: case 323: case 324: case 325: case 326: case 327: case 328: case 329: case 330: case 331: case 332: case 333: case 334: case 335: case 336: startscript = true; newscript="custom_"+customscript[state - 300]; obj.removetrigger(state); setstate(0); break; case 1000: graphics.showcutscenebars = true; hascontrol = false; completestop = true; incstate(); setstatedelay(15); break; case 1001: //Found a trinket! advancetext = true; incstate(); graphics.createtextboxflipme("", 50, 85, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundtrinket_textbox1); graphics.textboxapplyposition(); graphics.createtextboxflipme("", 50, 95, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxindex(graphics.textboxes.size() - 2); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundtrinket_textbox2); graphics.textboxapplyposition(); break; case 1002: if (!advancetext) { // Prevent softlocks if we somehow don't have advancetext incstate(); } break; case 1003: graphics.textboxremove(); hascontrol = true; advancetext = false; completestop = false; setstate(0); if (music.currentsong > -1) { music.fadeMusicVolumeIn(3000); } graphics.showcutscenebars = false; break; case 1010: graphics.showcutscenebars = true; hascontrol = false; completestop = true; incstate(); setstatedelay(15); break; case 1011: //Found a crewmate! advancetext = true; incstate(); graphics.createtextboxflipme("", 50, 85, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundcrewmate_textbox1); graphics.textboxapplyposition(); graphics.createtextboxflipme("", 50, 95, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxindex(graphics.textboxes.size() - 2); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundcrewmate_textbox2); graphics.textboxapplyposition(); break; case 1012: if (!advancetext) { // Prevent softlocks if we somehow don't have advancetext incstate(); } break; case 1013: graphics.textboxremove(); hascontrol = true; advancetext = false; completestop = false; setstate(0); if(cl.numcrewmates()-crewmates()==0) { if(map.custommodeforreal) { graphics.fademode = FADE_START_FADEOUT; setstate(1014); } else { returntoeditor(); ed.show_note(loc::gettext("Level completed")); } } else { if (cl.levmusic > 0) { music.fadeMusicVolumeIn(3000); } } graphics.showcutscenebars = false; break; case 1014: frames--; if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 1015: //Update level stats /* FIXME: Have to add check to not save stats for the dumb hack * `special/stdin.vvvvvv` filename... see elsewhere, grep for * `special/stdin`! */ if(cl.numcrewmates()-crewmates()==0 && customlevelfilename != "levels/special/stdin.vvvvvv") { //Finished level if (trinkets() >= cl.numtrinkets()) { //and got all the trinkets! updatecustomlevelstats(customlevelfilename, 3); } else { updatecustomlevelstats(customlevelfilename, 1); } } quittomenu(); music.play(Music_PRESENTINGVVVVVV); //should be after quittomenu() setstate(0); break; case 2000: //Game Saved! savetele_textbox(); setstate(0); break; case 2500: music.play(Music_PAUSE); //Activating a teleporter (appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 2501: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; //we're done here! music.playef(Sound_TELEPORT); break; case 2502: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_CREW_CYAN; obj.entities[i].invis = false; int j = obj.getteleporter(); if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; } obj.entities[i].ay = -6; obj.entities[i].ax = 6; obj.entities[i].vy = -6; obj.entities[i].vx = 6; } i = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 1; obj.entities[i].colour = EntityColour_TELEPORTER_ACTIVE; } break; } case 2503: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 2504: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { //obj.entities[i].xp += 10; } break; } case 2505: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 8; } break; } case 2506: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 6; } break; } case 2507: { incstate(); break; } case 2508: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 2; } break; } case 2509: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 1; } break; } case 2510: advancetext = true; hascontrol = false; graphics.createtextbox("Hello?", 125+24, 152-20, TEXT_COLOUR("cyan")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 2512: advancetext = true; hascontrol = false; graphics.createtextbox("Is anyone there?", 125+8, 152-24, TEXT_COLOUR("cyan")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); incstate(); music.playef(Sound_VIRIDIAN); graphics.textboxactive(); break; case 2514: graphics.textboxremove(); hascontrol = true; advancetext = false; setstate(0); music.play(Music_POTENTIALFORANYTHING); break; case 3000: //Activating a teleporter (long version for level complete) incstate(); setstatedelay(30); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 3001: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; music.playef(Sound_FLASH); break; case 3002: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; music.playef(Sound_FLASH); break; case 3003: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; music.playef(Sound_FLASH); break; case 3004: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; //we're done here! music.playef(Sound_TELEPORT); break; case 3005: { //Activating a teleporter 2 incstate(); setstatedelay(50); switch(companion) { case 6: setstate(3006); break; //Warp Zone case 7: setstate(3020); break; //Space Station case 8: setstate(3040); break; //Lab case 9: setstate(3060); break; //Tower case 10: setstate(3080); break; //Intermission 2 case 11: setstate(3085); break; //Intermission 1 } if (translator_exploring_allowtele) { setstate(3090); } int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_CREW_CYAN; obj.entities[i].invis = true; } i = obj.getcompanion(); if(INBOUNDS_VEC(i, obj.entities)) { obj.disableentity(i); } i = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 1; obj.entities[i].colour = EntityColour_TELEPORTER_INACTIVE; } break; } case 3006: //Level complete! (warp zone) unlocknum(Unlock_WARPZONE_COMPLETE); lastsaved = 4; music.play(Music_PATHCOMPLETE); incstate(); setstatedelay(75); levelcomplete_textbox(); break; case 3007: incstate(); setstatedelay(45); crewmate_textbox(13); break; case 3008: incstate(); setstatedelay(45); remaining_textbox(); break; case 3009: incstate(); setstatedelay(0); actionprompt_textbox(); break; case 3010: if (jumppressed) { incstate(); setstatedelay(30); graphics.textboxremove(); } break; case 3011: setstate(3070); setstatedelay(0); break; case 3020: //Level complete! (Space Station 2) unlocknum(Unlock_SPACESTATION2_COMPLETE); lastsaved = 2; music.play(Music_PATHCOMPLETE); incstate(); setstatedelay(75); levelcomplete_textbox(); break; case 3021: incstate(); setstatedelay(45); crewmate_textbox(14); break; case 3022: incstate(); setstatedelay(45); remaining_textbox(); break; case 3023: incstate(); setstatedelay(0); actionprompt_textbox(); break; case 3024: if (jumppressed) { incstate(); setstatedelay(30); graphics.textboxremove(); } break; case 3025: setstate(3070); setstatedelay(0); break; case 3040: //Level complete! (Lab) unlocknum(Unlock_LABORATORY_COMPLETE); lastsaved = 5; music.play(Music_PATHCOMPLETE); incstate(); setstatedelay(75); levelcomplete_textbox(); break; case 3041: incstate(); setstatedelay(45); crewmate_textbox(16); break; case 3042: incstate(); setstatedelay(45); remaining_textbox(); break; case 3043: incstate(); setstatedelay(0); actionprompt_textbox(); break; case 3044: if (jumppressed) { incstate(); setstatedelay(30); graphics.textboxremove(); } break; case 3045: setstate(3070); setstatedelay(0); break; case 3050: //Level complete! (Space Station 1) unlocknum(Unlock_SPACESTATION1_COMPLETE); lastsaved = 1; music.play(Music_PATHCOMPLETE); incstate(); setstatedelay(75); levelcomplete_textbox(); break; case 3051: incstate(); setstatedelay(45); crewmate_textbox(20); break; case 3052: incstate(); setstatedelay(45); remaining_textbox(); break; case 3053: incstate(); setstatedelay(0); actionprompt_textbox(); break; case 3054: if (jumppressed) { incstate(); setstatedelay(30); graphics.textboxremove(); teleportscript = ""; } break; case 3055: graphics.fademode = FADE_START_FADEOUT; incstate(); setstatedelay(10); break; case 3056: if (graphics.fademode == FADE_FULLY_BLACK) { startscript = true; if (crewrescued() == 6) { newscript = "startlevel_final"; } else { if (nocutscenes) { newscript="bigopenworldskip"; } else { newscript = "bigopenworld"; } } setstate(0); } break; case 3060: //Level complete! (Tower) unlocknum(Unlock_TOWER_COMPLETE); lastsaved = 3; music.play(Music_PATHCOMPLETE); incstate(); setstatedelay(75); levelcomplete_textbox(); break; case 3061: incstate(); setstatedelay(45); crewmate_textbox(15); break; case 3062: incstate(); setstatedelay(45); remaining_textbox(); break; case 3063: incstate(); setstatedelay(0); actionprompt_textbox(); break; case 3064: if (jumppressed) { incstate(); setstatedelay(30); graphics.textboxremove(); } break; case 3065: setstate(3070); setstatedelay(0); break; case 3070: graphics.fademode = FADE_START_FADEOUT; incstate(); break; case 3071: if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } 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] = true; if (crewstats[4]) obj.flags[26] = true; if (crewstats[5]) obj.flags[24] = true; } else if (lastsaved == 3) { if (crewstats[2]) obj.flags[50] = true; if (crewstats[4]) obj.flags[49] = true; if (crewstats[5]) obj.flags[48] = true; } else if (lastsaved == 4) { if (crewstats[2]) obj.flags[54] = true; if (crewstats[3]) obj.flags[55] = true; if (crewstats[5]) obj.flags[56] = true; } else if (lastsaved == 5) { if (crewstats[2]) obj.flags[37] = true; if (crewstats[3]) obj.flags[38] = true; if (crewstats[4]) obj.flags[39] = true; } //We're pitch black now, make a decision companion = 0; if (crewrescued() == 6) { startscript = true; newscript="startlevel_final"; setstate(0); } else if (crewrescued() == 4) { companion = 11; supercrewmate = true; scmprogress = 0; startscript = true; newscript = "intermission_1"; obj.flags[19] = true; if (lastsaved == 2) obj.flags[32] = true; if (lastsaved == 3) obj.flags[35] = true; if (lastsaved == 4) obj.flags[34] = true; if (lastsaved == 5) obj.flags[33] = true; setstate(0); } else if (crewrescued() == 5) { startscript = true; newscript = "intermission_2"; obj.flags[20] = true; if (lastsaved == 2) obj.flags[32] = true; if (lastsaved == 3) obj.flags[35] = true; if (lastsaved == 4) obj.flags[34] = true; if (lastsaved == 5) obj.flags[33] = true; setstate(0); } else { startscript = true; newscript="regularreturn"; setstate(0); } break; case 3080: //returning from an intermission, very like 3070 if (inintermission) { graphics.fademode = FADE_START_FADEOUT; companion = 0; setstate(3100); } else { unlocknum(Unlock_INTERMISSION2_COMPLETE); graphics.fademode = FADE_START_FADEOUT; companion = 0; incstate(); } break; case 3081: if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 3082: map.finalmode = false; startscript = true; newscript="regularreturn"; setstate(0); break; case 3085: //returning from an intermission, very like 3070 //return to menu from here if (inintermission) { companion = 0; supercrewmate = false; incstate(); graphics.fademode = FADE_START_FADEOUT; music.fadeout(); setstate(3100); } else { unlocknum(Unlock_INTERMISSION1_COMPLETE); graphics.fademode = FADE_START_FADEOUT; companion = 0; supercrewmate = false; incstate(); } break; case 3086: if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 3087: map.finalmode = false; startscript = true; newscript="regularreturn"; setstate(0); break; case 3090: /* Teleporting in translator_exploring should be just like * the intermission replays: simply return to the menu */ companion = 0; supercrewmate = false; graphics.fademode = FADE_START_FADEOUT; music.fadeout(); setstate(3100); break; case 3091: /* Different Final Level ending for translator_exploring */ music.fadeout(); incstate(); setstatedelay(60); break; case 3092: graphics.fademode = FADE_START_FADEOUT; setstate(3100); break; case 3100: if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 3101: quittomenu(); music.play(Music_PRESENTINGVVVVVV); //should be after quittomenu(); setstate(0); break; case 3500: music.fadeout(); incstate(); setstatedelay(120); break; case 3501: //Game complete! unlockAchievement("vvvvvvgamecomplete"); unlocknum(UnlockTrophy_GAME_COMPLETE); crewstats[0] = true; incstate(); setstatedelay(75); music.play(Music_PLENARY); graphics.createtextboxflipme("", -1, 12, TEXT_COLOUR("cyan")); graphics.addline(" "); graphics.addline(""); graphics.addline(""); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); graphics.setimage(TEXTIMAGE_GAMECOMPLETE); graphics.setlinegap(0); graphics.textboxapplyposition(); break; case 3502: incstate(); setstatedelay(45+15); graphics.createtextboxflipme("", -1, 64, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox2); graphics.textboxapplyposition(); saveframes = frames; saveseconds = help.hms_to_seconds(hours, minutes, seconds); break; case 3503: incstate(); setstatedelay(45); graphics.createtextboxflipme("", 170, 84, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox3); graphics.textboxapplyposition(); graphics.createtextboxflipme("", 180, 84, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox4); graphics.textboxapplyposition(); break; case 3504: incstate(); setstatedelay(45+15); graphics.createtextboxflipme("", 170, 96, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox5); graphics.textboxapplyposition(); graphics.createtextboxflipme("", 180, 96, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox6); graphics.textboxapplyposition(); break; case 3505: incstate(); setstatedelay(45); graphics.createtextboxflipme("", 170, 123, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox7); graphics.textboxapplyposition(); graphics.createtextboxflipme(help.String(totalflips), 180, 123, TEXT_COLOUR("transparent")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); break; case 3506: incstate(); setstatedelay(45+15); graphics.createtextboxflipme("", 170, 135, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox9); graphics.textboxapplyposition(); graphics.createtextboxflipme(help.String(deathcounts), 180, 135, TEXT_COLOUR("transparent")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_INTERFACE | PR_RTL_XFLIP); break; case 3507: incstate(); setstatedelay(45+15); graphics.createtextboxflipme("", -1, 158, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox11); graphics.textboxapplyposition(); graphics.createtextboxflipme("", -1, 170, TEXT_COLOUR("transparent")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, gamecomplete_textbox12); graphics.textboxapplyposition(); break; case 3508: incstate(); setstatedelay(0); actionprompt_textbox(); break; case 3509: if (jumppressed) { incstate(); setstatedelay(30); graphics.textboxremove(); } break; case 3510: //Save stats and stuff here if (!obj.flags[73]) { //flip mode complete unlockAchievement("vvvvvvgamecompleteflip"); unlocknum(UnlockTrophy_FLIPMODE_COMPLETE); } #ifndef MAKEANDPLAY if (!map.custommode) { if (bestgamedeaths == -1) { bestgamedeaths = deathcounts; } else { if (deathcounts < bestgamedeaths) { bestgamedeaths = deathcounts; } } } #endif if (bestgamedeaths > -1) { if (bestgamedeaths <= 500) { unlockAchievement("vvvvvvcomplete500"); } if (bestgamedeaths <= 250) { unlockAchievement("vvvvvvcomplete250"); } if (bestgamedeaths <= 100) { unlockAchievement("vvvvvvcomplete100"); } if (bestgamedeaths <= 50) { unlockAchievement("vvvvvvcomplete50"); } } if (nodeathmode || nodeatheligible) { unlockAchievement("vvvvvvmaster"); //bloody hell unlocknum(UnlockTrophy_NODEATHMODE_COMPLETE); } if (nodeathmode) { setstate(3520); setstatedelay(0); } else { setstatedelay(120); incstate(); } savestatsandsettings(); break; case 3511: { //Activating a teleporter (long version for level complete) int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_TELEPORTER_FLASHING; } incstate(); setstatedelay(30); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; } case 3512: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; music.playef(Sound_FLASH); break; case 3513: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; music.playef(Sound_FLASH); break; case 3514: //Activating a teleporter 2 incstate(); setstatedelay(15); flashlight = 5; music.playef(Sound_FLASH); break; case 3515: { //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_CREW_CYAN; obj.entities[i].invis = true; } //we're done here! music.playef(Sound_TELEPORT); setstatedelay(60); break; } case 3516: graphics.fademode = FADE_START_FADEOUT; incstate(); break; case 3517: if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); setstatedelay(30); } break; case 3518: graphics.fademode = FADE_START_FADEIN; setstate(0); setstatedelay(30); map.finalmode = false; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; map.finalstretch = false; obj.flags[72] = false; graphics.setbars(320); teleport_to_new_area = true; teleportscript = "gamecomplete"; break; case 3520: //NO DEATH MODE COMPLETE JESUS hascontrol = false; crewstats[0] = true; graphics.fademode = FADE_START_FADEOUT; incstate(); break; case 3521: if (graphics.fademode == FADE_FULLY_BLACK) { incstate(); } break; case 3522: copyndmresults(); quittomenu(); createmenu(Menu::nodeathmodecomplete); setstate(0); break; case 4000: //Activating a teleporter (short version) state++; // Increment manually -- gamestate modification might be locked at this point statedelay = 10; flashlight = 5; screenshake = 10; music.playef(Sound_FLASH); break; case 4001: //Activating a teleporter 2 state++; statedelay = 0; flashlight = 5; screenshake = 0; //we're done here! music.playef(Sound_TELEPORT); break; case 4002: { //Activating a teleporter 2 state++; statedelay = 10; int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_CREW_CYAN; obj.entities[i].invis = true; } i = obj.getteleporter(); if(INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 1; obj.entities[i].colour = EntityColour_TELEPORTER_INACTIVE; } break; } case 4003: state = 0; statedelay = 0; teleport_to_new_area = true; unlockstate(); break; case 4010: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4011: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4012: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4014: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4015: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 8; } break; } case 4016: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 6; } break; } case 4017: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 3; } break; } case 4018: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 1; } break; } case 4019: { if (intimetrial || nodeathmode || inintermission) { } else { savetele(); } int i = obj.getteleporter(); activetele = true; if (INBOUNDS_VEC(i, obj.entities)) { teleblock.x = obj.entities[i].xp - 32; teleblock.y = obj.entities[i].yp - 32; } teleblock.w = 160; teleblock.h = 160; hascontrol = true; advancetext = false; setstate(0); break; } case 4020: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4021: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4022: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 12; } break; } case 4024: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 12; } break; } case 4025: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4026: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 8; } break; } case 4027: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 5; } break; } case 4028: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 2; } break; } case 4029: hascontrol = true; advancetext = false; setstate(0); break; case 4030: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4031: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4032: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 12; } break; } case 4034: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 12; } break; } case 4035: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 10; } break; } case 4036: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 8; } break; } case 4037: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 5; } break; } case 4038: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 2; } break; } case 4039: hascontrol = true; advancetext = false; setstate(0); break; case 4040: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4041: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4042: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 12; obj.entities[i].yp -= 15; } break; } case 4044: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 12; obj.entities[i].yp -= 10; } break; } case 4045: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 12; obj.entities[i].yp -= 10; } break; } case 4046: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 8; obj.entities[i].yp -= 8; } break; } case 4047: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 6; obj.entities[i].yp -= 8; } break; } case 4048: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 3; } break; } case 4049: hascontrol = true; advancetext = false; setstate(0); break; case 4050: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4051: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4052: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 4; obj.entities[i].yp -= 15; } break; } case 4054: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 4; obj.entities[i].yp -= 10; } break; } case 4055: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 4; obj.entities[i].yp -= 10; } break; } case 4056: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 4; obj.entities[i].yp -= 8; } break; } case 4057: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 2; obj.entities[i].yp -= 8; } break; } case 4058: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 1; } break; } case 4059: hascontrol = true; advancetext = false; setstate(0); break; case 4060: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4061: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4062: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 28; obj.entities[i].yp -= 8; } break; } case 4064: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 28; obj.entities[i].yp -= 8; } break; } case 4065: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 25; } break; } case 4066: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 25; } break; } case 4067: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 20; } break; } case 4068: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp -= 16; } break; } case 4069: hascontrol = true; advancetext = false; setstate(0); break; case 4070: //Activating a teleporter (special for final script, player has colour changed to match rescued crewmate) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4071: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4072: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].invis = false; obj.entities[i].dir = 1; obj.entities[i].colour = graphics.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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4074: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4075: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 8; } break; } case 4076: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 6; } break; } case 4077: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 3; } break; } case 4078: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 1; } break; } case 4079: setstate(0); startscript = true; newscript = "finallevel_teleporter"; break; case 4080: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4081: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4082: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4084: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4085: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 8; } break; } case 4086: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 6; } break; } case 4087: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 3; } break; } case 4088: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 1; } break; } case 4089: startscript = true; newscript = "gamecomplete_ending"; setstate(0); break; case 4090: //Activating a teleporter (default appear) incstate(); setstatedelay(15); flashlight = 5; screenshake = 90; music.playef(Sound_FLASH); break; case 4091: //Activating a teleporter 2 incstate(); setstatedelay(0); flashlight = 5; screenshake = 0; music.playef(Sound_TELEPORT); break; case 4092: { //Activating a teleporter 2 incstate(); setstatedelay(5); int i = obj.getplayer(); int j = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[i].xp = obj.entities[j].xp+44; obj.entities[i].yp = obj.entities[j].yp+44; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[j].tile = 2; obj.entities[j].colour = EntityColour_TELEPORTER_ACTIVE; } obj.entities[i].colour = EntityColour_CREW_CYAN; 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: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4094: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 10; } break; } case 4095: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 8; } break; } case 4096: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 6; } break; } case 4097: { incstate(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 3; } break; } case 4098: { incstate(); setstatedelay(15); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp += 1; } break; } case 4099: if (nocutscenes) { startscript = true; newscript = "levelonecompleteskip"; } else { startscript = true; newscript = "levelonecomplete_ending"; } setstate(0); break; } } } void Game::gethardestroom(void) { if (currentroomdeaths > hardestroomdeaths) { hardestroomdeaths = currentroomdeaths; hardestroom_x = roomx; hardestroom_y = roomy; hardestroom_finalstretch = map.finalstretch; if (map.roomname[0] == '\0') { hardestroom = map.hiddenname; hardestroom_specialname = true; } else { hardestroom = map.roomname; hardestroom_specialname = map.roomname_special; } } } void Game::deletestats(void) { if (!FILESYSTEM_delete("saves/unlock.vvv")) { vlog_error("Error deleting saves/unlock.vvv"); } else { for (int i = 0; i < numunlock; i++) { unlock[i] = false; unlocknotify[i] = false; } for (int i = 0; i < numtrials; i++) { besttimes[i] = -1; bestframes[i] = -1; besttrinkets[i] = -1; bestlives[i] = -1; bestrank[i] = -1; } swnrecord = 0; swnbestrank = 0; bestgamedeaths = -1; #ifndef MAKEANDPLAY graphics.setflipmode = false; #endif stat_trinkets = 0; } } void Game::deletesettings(void) { if (!FILESYSTEM_delete("saves/settings.vvv")) { vlog_error("Error deleting saves/settings.vvv"); } } void Game::unlocknum( int t ) { #ifdef MAKEANDPLAY UNUSED(t); #else if (map.custommode) { //Don't let custom levels unlock things! return; } unlock[t] = true; savestatsandsettings(); #endif } static bool stats_loaded = false; void Game::loadstats(struct ScreenSettings* screen_settings) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; tinyxml2::XMLElement* dataNode; stats_loaded = true; if (!FILESYSTEM_loadTiXml2Document("saves/unlock.vvv", doc)) { // Save unlock.vvv only. Maybe we have a settings.vvv laying around too, // and we don't want to overwrite that! savestats(screen_settings); return; } if (doc.Error()) { vlog_error("Error parsing unlock.vvv: %s", doc.ErrorStr()); return; } dataNode = hDoc .FirstChildElement() .FirstChildElement("Data") .FirstChildElement() .ToElement(); for (pElem = dataNode; pElem != NULL; pElem=pElem->NextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; if (pText == NULL) { pText = ""; } LOAD_ARRAY(unlock) LOAD_ARRAY(unlocknotify) LOAD_ARRAY(besttimes) LOAD_ARRAY(bestframes) LOAD_ARRAY(besttrinkets) LOAD_ARRAY(bestlives) LOAD_ARRAY(bestrank) if (SDL_strcmp(pKey, "bestgamedeaths") == 0) { bestgamedeaths = help.Int(pText); } if (SDL_strcmp(pKey, "stat_trinkets") == 0) { stat_trinkets = help.Int(pText); } if (SDL_strcmp(pKey, "swnbestrank") == 0) { swnbestrank = help.Int(pText); } if (SDL_strcmp(pKey, "swnrecord") == 0) { swnrecord = help.Int(pText); } } deserializesettings(dataNode, screen_settings); } void Game::deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSettings* screen_settings) { // Don't duplicate controller buttons! controllerButton_flip.clear(); controllerButton_map.clear(); controllerButton_esc.clear(); controllerButton_restart.clear(); controllerButton_interact.clear(); for (tinyxml2::XMLElement* pElem = dataNode; pElem != NULL; pElem = pElem->NextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText(); if (pText == NULL) { pText = ""; } if (SDL_strcmp(pKey, "fullscreen") == 0) { screen_settings->fullscreen = help.Int(pText); } if (SDL_strcmp(pKey, "stretch") == 0) { int mode = help.Int(pText); if (mode < 0 || mode >= NUM_SCALING_MODES) { /* Pick a sane default. */ mode = SCALING_INTEGER; } screen_settings->scalingMode = mode; } if (SDL_strcmp(pKey, "useLinearFilter") == 0) { screen_settings->linearFilter = help.Int(pText); } if (SDL_strcmp(pKey, "window_display") == 0) { screen_settings->windowDisplay = help.Int(pText); } if (SDL_strcmp(pKey, "window_width") == 0) { screen_settings->windowWidth = help.Int(pText); } if (SDL_strcmp(pKey, "window_height") == 0) { screen_settings->windowHeight = help.Int(pText); } if (SDL_strcmp(pKey, "noflashingmode") == 0) { noflashingmode = help.Int(pText); } if (SDL_strcmp(pKey, "colourblindmode") == 0) { colourblindmode = help.Int(pText); } if (SDL_strcmp(pKey, "setflipmode") == 0) { graphics.setflipmode = help.Int(pText); } if (SDL_strcmp(pKey, "invincibility") == 0) { map.invincibility = help.Int(pText); } if (SDL_strcmp(pKey, "slowdown") == 0) { slowdown = help.Int(pText); } if (SDL_strcmp(pKey, "advanced_smoothing") == 0) { screen_settings->badSignal = help.Int(pText); } if (SDL_strcmp(pKey, "usingmmmmmm") == 0) { music.usingmmmmmm = (bool) help.Int(pText); } if (SDL_strcmp(pKey, "ghostsenabled") == 0) { ghostsenabled = help.Int(pText); } if (SDL_strcmp(pKey, "skipfakeload") == 0) { skipfakeload = help.Int(pText); } if (SDL_strcmp(pKey, "disablepause") == 0) { disablepause = help.Int(pText); } if (SDL_strcmp(pKey, "disableaudiopause") == 0) { disableaudiopause = help.Int(pText); } if (SDL_strcmp(pKey, "over30mode") == 0) { over30mode = help.Int(pText); } if (SDL_strcmp(pKey, "inputdelay") == 0) { inputdelay = help.Int(pText); } if (SDL_strcmp(pKey, "glitchrunnermode") == 0) { GlitchrunnerMode_set(GlitchrunnerMode_string_to_enum(pText)); } if (SDL_strcmp(pKey, "showingametimer") == 0) { showingametimer = help.Int(pText); } if (SDL_strcmp(pKey, "vsync") == 0) { screen_settings->useVsync = help.Int(pText); } if (SDL_strcmp(pKey, "notextoutline") == 0) { graphics.notextoutline = help.Int(pText); } if (SDL_strcmp(pKey, "translucentroomname") == 0) { graphics.translucentroomname = help.Int(pText); } if (SDL_strcmp(pKey, "musicvolume") == 0) { music.user_music_volume = help.Int(pText); } if (SDL_strcmp(pKey, "soundvolume") == 0) { music.user_sound_volume = help.Int(pText); } if (SDL_strcmp(pKey, "separate_interact") == 0) { separate_interact = help.Int(pText); } if (SDL_strcmp(pKey, "flipButton") == 0) { SDL_GameControllerButton newButton; if (GetButtonFromString(pText, &newButton)) { controllerButton_flip.push_back(newButton); } } if (SDL_strcmp(pKey, "enterButton") == 0) { SDL_GameControllerButton newButton; if (GetButtonFromString(pText, &newButton)) { controllerButton_map.push_back(newButton); } } if (SDL_strcmp(pKey, "escButton") == 0) { SDL_GameControllerButton newButton; if (GetButtonFromString(pText, &newButton)) { controllerButton_esc.push_back(newButton); } } if (SDL_strcmp(pKey, "restartButton") == 0) { SDL_GameControllerButton newButton; if (GetButtonFromString(pText, &newButton)) { controllerButton_restart.push_back(newButton); } } if (SDL_strcmp(pKey, "interactButton") == 0) { SDL_GameControllerButton newButton; if (GetButtonFromString(pText, &newButton)) { controllerButton_interact.push_back(newButton); } } if (SDL_strcmp(pKey, "controllerSensitivity") == 0) { key.sensitivity = help.Int(pText); } if (SDL_strcmp(pKey, "lang") == 0) { loc::lang = std::string(pText); } if (SDL_strcmp(pKey, "lang_set") == 0) { loc::lang_set = help.Int(pText); } if (SDL_strcmp(pKey, "english_sprites") == 0) { loc::english_sprites = help.Int(pText); } if (SDL_strcmp(pKey, "new_level_font") == 0) { loc::new_level_font = std::string(pText); } if (SDL_strcmp(pKey, "roomname_translator") == 0 && loc::show_translator_menu) { roomname_translator::set_enabled(help.Int(pText)); } if (SDL_strcmp(pKey, "checkpoint_saving") == 0) { checkpoint_saving = help.Int(pText); } } setdefaultcontrollerbuttons(); } bool Game::savestats(bool sync /*= true*/) { struct ScreenSettings screen_settings; SDL_zero(screen_settings); gameScreen.GetSettings(&screen_settings); return savestats(&screen_settings, sync); } bool Game::savestats(const struct ScreenSettings* screen_settings, bool sync /*= true*/) { tinyxml2::XMLDocument doc; bool already_exists; if (!stats_loaded) { vlog_warn("Stats not loaded! Not writing unlock.vvv."); return false; } already_exists = FILESYSTEM_loadTiXml2Document("saves/unlock.vvv", doc); if (!already_exists) { vlog_info("No unlock.vvv found. Creating new file"); } else if (doc.Error()) { vlog_error("Error parsing existing unlock.vvv: %s", doc.ErrorStr()); vlog_info("Creating new unlock.vvv"); } xml::update_declaration(doc); tinyxml2::XMLElement * root = xml::update_element(doc, "Save"); xml::update_comment(root, " Save file " ); tinyxml2::XMLElement * dataNode = xml::update_element(root, "Data"); std::string s_unlock; for(size_t i = 0; i < SDL_arraysize(unlock); i++ ) { s_unlock += help.String(unlock[i]) + ","; } xml::update_tag(dataNode, "unlock", s_unlock.c_str()); std::string s_unlocknotify; for(size_t i = 0; i < SDL_arraysize(unlocknotify); i++ ) { s_unlocknotify += help.String(unlocknotify[i]) + ","; } xml::update_tag(dataNode, "unlocknotify", s_unlocknotify.c_str()); std::string s_besttimes; for(size_t i = 0; i < SDL_arraysize(besttimes); i++ ) { s_besttimes += help.String(besttimes[i]) + ","; } xml::update_tag(dataNode, "besttimes", s_besttimes.c_str()); std::string s_bestframes; for (size_t i = 0; i < SDL_arraysize(bestframes); i++) { s_bestframes += help.String(bestframes[i]) + ","; } xml::update_tag(dataNode, "bestframes", s_bestframes.c_str()); std::string s_besttrinkets; for(size_t i = 0; i < SDL_arraysize(besttrinkets); i++ ) { s_besttrinkets += help.String(besttrinkets[i]) + ","; } xml::update_tag(dataNode, "besttrinkets", s_besttrinkets.c_str()); std::string s_bestlives; for(size_t i = 0; i < SDL_arraysize(bestlives); i++ ) { s_bestlives += help.String(bestlives[i]) + ","; } xml::update_tag(dataNode, "bestlives", s_bestlives.c_str()); std::string s_bestrank; for(size_t i = 0; i < SDL_arraysize(bestrank); i++ ) { s_bestrank += help.String(bestrank[i]) + ","; } xml::update_tag(dataNode, "bestrank", s_bestrank.c_str()); xml::update_tag(dataNode, "bestgamedeaths", bestgamedeaths); xml::update_tag(dataNode, "stat_trinkets", stat_trinkets); xml::update_tag(dataNode, "swnbestrank", swnbestrank); xml::update_tag(dataNode, "swnrecord", swnrecord); serializesettings(dataNode, screen_settings); return FILESYSTEM_saveTiXml2Document("saves/unlock.vvv", doc, sync); } bool Game::savestatsandsettings(void) { const bool stats_saved = savestats(false); const bool settings_saved = savesettings(); return stats_saved && settings_saved; // Not the same as `savestats() && savesettings()`! } void Game::savestatsandsettings_menu(void) { // Call Game::savestatsandsettings(), but upon failure, go to the save error screen if (!savestatsandsettings() && !silence_settings_error) { createmenu(Menu::errorsavingsettings); map.nexttowercolour(); } } void Game::serializesettings(tinyxml2::XMLElement* dataNode, const struct ScreenSettings* screen_settings) { tinyxml2::XMLDocument& doc = xml::get_document(dataNode); xml::update_tag(dataNode, "fullscreen", (int) screen_settings->fullscreen); xml::update_tag(dataNode, "stretch", screen_settings->scalingMode); xml::update_tag(dataNode, "useLinearFilter", (int) screen_settings->linearFilter); xml::update_tag(dataNode, "window_display", screen_settings->windowDisplay); xml::update_tag(dataNode, "window_width", screen_settings->windowWidth); xml::update_tag(dataNode, "window_height", screen_settings->windowHeight); xml::update_tag(dataNode, "noflashingmode", noflashingmode); xml::update_tag(dataNode, "colourblindmode", colourblindmode); xml::update_tag(dataNode, "setflipmode", graphics.setflipmode); xml::update_tag(dataNode, "invincibility", map.invincibility); xml::update_tag(dataNode, "slowdown", slowdown); xml::update_tag(dataNode, "advanced_smoothing", (int) screen_settings->badSignal); xml::update_tag(dataNode, "usingmmmmmm", music.usingmmmmmm); xml::update_tag(dataNode, "ghostsenabled", (int) ghostsenabled); xml::update_tag(dataNode, "skipfakeload", (int) skipfakeload); xml::update_tag(dataNode, "disablepause", (int) disablepause); xml::update_tag(dataNode, "disableaudiopause", (int) disableaudiopause); xml::update_tag(dataNode, "notextoutline", (int) graphics.notextoutline); xml::update_tag(dataNode, "translucentroomname", (int) graphics.translucentroomname); xml::update_tag(dataNode, "over30mode", (int) over30mode); xml::update_tag(dataNode, "inputdelay", (int) inputdelay); xml::update_tag( dataNode, "glitchrunnermode", GlitchrunnerMode_enum_to_string(GlitchrunnerMode_get()) ); xml::update_tag(dataNode, "showingametimer", (int) showingametimer); xml::update_tag(dataNode, "vsync", (int) screen_settings->useVsync); xml::update_tag(dataNode, "musicvolume", music.user_music_volume); xml::update_tag(dataNode, "soundvolume", music.user_sound_volume); xml::update_tag(dataNode, "separate_interact", (int) separate_interact); // Delete all controller buttons we had previously. // dataNode->FirstChildElement() shouldn't be NULL at this point... // we've already added a bunch of elements for (tinyxml2::XMLElement* element = dataNode->FirstChildElement(); element != NULL; /* Increment code handled separately */) { const char* name = element->Name(); if (SDL_strcmp(name, "flipButton") == 0 || SDL_strcmp(name, "enterButton") == 0 || SDL_strcmp(name, "escButton") == 0 || SDL_strcmp(name, "restartButton") == 0 || SDL_strcmp(name, "interactButton") == 0) { // Can't just doc.DeleteNode(element) and then go to next, // element->NextSiblingElement() will be NULL. // Instead, store pointer of element we want to delete. Then // increment `element`. And THEN delete the element. tinyxml2::XMLElement* delete_this = element; element = element->NextSiblingElement(); doc.DeleteNode(delete_this); continue; } element = element->NextSiblingElement(); } // Now add them for (size_t i = 0; i < controllerButton_flip.size(); i += 1) { tinyxml2::XMLElement* msg = doc.NewElement("flipButton"); msg->LinkEndChild(doc.NewText(help.String((int) controllerButton_flip[i]).c_str())); dataNode->LinkEndChild(msg); } for (size_t i = 0; i < controllerButton_map.size(); i += 1) { tinyxml2::XMLElement* msg = doc.NewElement("enterButton"); msg->LinkEndChild(doc.NewText(help.String((int) controllerButton_map[i]).c_str())); dataNode->LinkEndChild(msg); } for (size_t i = 0; i < controllerButton_esc.size(); i += 1) { tinyxml2::XMLElement* msg = doc.NewElement("escButton"); msg->LinkEndChild(doc.NewText(help.String((int) controllerButton_esc[i]).c_str())); dataNode->LinkEndChild(msg); } for (size_t i = 0; i < controllerButton_restart.size(); i += 1) { tinyxml2::XMLElement* msg = doc.NewElement("restartButton"); msg->LinkEndChild(doc.NewText(help.String((int) controllerButton_restart[i]).c_str())); dataNode->LinkEndChild(msg); } for (size_t i = 0; i < controllerButton_interact.size(); i += 1) { tinyxml2::XMLElement* msg = doc.NewElement("interactButton"); msg->LinkEndChild(doc.NewText(help.String((int) controllerButton_interact[i]).c_str())); dataNode->LinkEndChild(msg); } xml::update_tag(dataNode, "controllerSensitivity", key.sensitivity); xml::update_tag(dataNode, "lang", loc::lang.c_str()); xml::update_tag(dataNode, "lang_set", (int) loc::lang_set); xml::update_tag(dataNode, "english_sprites", (int) loc::english_sprites); xml::update_tag(dataNode, "new_level_font", loc::new_level_font.c_str()); xml::update_tag(dataNode, "roomname_translator", (int) roomname_translator::enabled); xml::update_tag(dataNode, "checkpoint_saving", (int) checkpoint_saving); } static bool settings_loaded = false; void Game::loadsettings(struct ScreenSettings* screen_settings) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* dataNode; settings_loaded = true; if (!FILESYSTEM_loadTiXml2Document("saves/settings.vvv", doc)) { savesettings(screen_settings); return; } if (doc.Error()) { vlog_error("Error parsing settings.vvv: %s", doc.ErrorStr()); return; } dataNode = hDoc .FirstChildElement() .FirstChildElement("Data") .FirstChildElement() .ToElement(); deserializesettings(dataNode, screen_settings); } bool Game::savesettings(void) { struct ScreenSettings screen_settings; SDL_zero(screen_settings); gameScreen.GetSettings(&screen_settings); return savesettings(&screen_settings); } bool Game::savesettings(const struct ScreenSettings* screen_settings) { tinyxml2::XMLDocument doc; bool already_exists; if (!settings_loaded) { vlog_warn("Settings not loaded! Not writing settings.vvv."); return false; } already_exists = FILESYSTEM_loadTiXml2Document("saves/settings.vvv", doc); if (!already_exists) { vlog_info("No settings.vvv found. Creating new file"); } else if (doc.Error()) { vlog_error("Error parsing existing settings.vvv: %s", doc.ErrorStr()); vlog_info("Creating new settings.vvv"); } xml::update_declaration(doc); tinyxml2::XMLElement* root = xml::update_element(doc, "Settings"); xml::update_comment(root, " Settings (duplicated from unlock.vvv) "); tinyxml2::XMLElement* dataNode = xml::update_element(root, "Data"); serializesettings(dataNode, screen_settings); return FILESYSTEM_saveTiXml2Document("saves/settings.vvv", doc); } void Game::customstart(void) { jumpheld = true; savex = edsavex; savey = edsavey; saverx = edsaverx; savery = edsavery; savegc = edsavegc; savedir = edsavedir; //Worldmap Start savepoint = 0; gravitycontrol = savegc; setstate(0); deathseq = -1; lifeseq = 0; } void Game::start(void) { jumpheld = true; savex = 232; savey = 113; saverx = 104; savery = 110; savegc = 0; savedir = 1; //Worldmap Start savepoint = 0; gravitycontrol = savegc; setstate(0); deathseq = -1; lifeseq = 0; if (!nocutscenes) { music.play(Music_PAUSE); } } void Game::deathsequence(void) { int i; if (supercrewmate && scmhurt) { i = obj.getscm(); } else { i = obj.getplayer(); } if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_DEAD; obj.entities[i].invis = false; } if (deathseq == 30) { if (nodeathmode) { music.fadeout(); gameoverdelay = 60; /* Fix a bug being able to play music on the Game Over screen */ music.nicefade = false; } deathcounts++; music.playef(Sound_CRY); if (INBOUNDS_VEC(i, obj.entities) && !noflashingmode) { obj.entities[i].invis = true; } if (map.finalmode) { if (roomx - 41 >= 0 && roomx - 41 < 20 && roomy - 48 >= 0 && roomy - 48 < 20) { map.roomdeathsfinal[roomx - 41 + (20 * (roomy - 48))]++; currentroomdeaths = map.roomdeathsfinal[roomx - 41 + (20 * (roomy - 48))]; } } else { if (roomx - 100 >= 0 && roomx - 100 < 20 && roomy - 100 >= 0 && roomy - 100 < 20) { map.roomdeaths[roomx - 100 + (20*(roomy - 100))]++; currentroomdeaths = map.roomdeaths[roomx - 100 + (20 * (roomy - 100))]; } } } if (INBOUNDS_VEC(i, obj.entities) && !noflashingmode) { 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 (INBOUNDS_VEC(i, obj.entities) && deathseq <= 1) obj.entities[i].invis = false; } else { gameoverdelay--; } } void Game::startspecial( int t ) { 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; setstate(0); deathseq = -1; lifeseq = 0; } void Game::starttrial( int t ) { 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; setstate(0); deathseq = -1; lifeseq = 0; } void Game::loadquick(void) { tinyxml2::XMLDocument doc; if (!FILESYSTEM_loadTiXml2Document("saves/qsave.vvv", doc)) return; readmaingamesave("qsave.vvv", doc); } void Game::readmaingamesave(const char* savename, tinyxml2::XMLDocument& doc) { tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (doc.Error()) { vlog_error("Error parsing %s: %s", savename, doc.ErrorStr()); return; } /* Even if we want the default hardest room to be Welcome Aboard, there are pre-2.4 * saves with JUST which should take priority over the coords */ hardestroom_x = -1; hardestroom_y = -1; hardestroom_specialname = false; hardestroom_finalstretch = false; for (pElem = hDoc .FirstChildElement() .FirstChildElement("Data") .FirstChildElement() .ToElement(); pElem != NULL; pElem = pElem->NextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText(); if(pText == NULL) { pText = ""; } LOAD_ARRAY_RENAME(worldmap, map.explored) LOAD_ARRAY_RENAME(flags, obj.flags) LOAD_ARRAY(crewstats) LOAD_ARRAY_RENAME(collect, obj.collect) if (SDL_strcmp(pKey, "finalmode") == 0) { map.finalmode = help.Int(pText); } if (SDL_strcmp(pKey, "finalstretch") == 0) { map.finalstretch = help.Int(pText); } if (SDL_strcmp(pKey, "savex") == 0) { savex = help.Int(pText); } else if (SDL_strcmp(pKey, "savey") == 0) { savey = help.Int(pText); } else if (SDL_strcmp(pKey, "saverx") == 0) { saverx = help.Int(pText); } else if (SDL_strcmp(pKey, "savery") == 0) { savery = help.Int(pText); } else if (SDL_strcmp(pKey, "savegc") == 0) { savegc = help.Int(pText); } else if (SDL_strcmp(pKey, "savedir") == 0) { savedir= help.Int(pText); } else if (SDL_strcmp(pKey, "savepoint") == 0) { savepoint = help.Int(pText); } else if (SDL_strcmp(pKey, "companion") == 0) { companion = help.Int(pText); } else if (SDL_strcmp(pKey, "lastsaved") == 0) { lastsaved = help.Int(pText); } else if (SDL_strcmp(pKey, "teleportscript") == 0) { teleportscript = pText; } else if (SDL_strcmp(pKey, "supercrewmate") == 0) { supercrewmate = help.Int(pText); } else if (SDL_strcmp(pKey, "scmprogress") == 0) { scmprogress = help.Int(pText); } else if (SDL_strcmp(pKey, "frames") == 0) { frames = help.Int(pText); } else if (SDL_strcmp(pKey, "seconds") == 0) { seconds = help.Int(pText); } else if (SDL_strcmp(pKey, "minutes") == 0) { minutes = help.Int(pText); } else if (SDL_strcmp(pKey, "hours") == 0) { hours = help.Int(pText); } else if (SDL_strcmp(pKey, "deathcounts") == 0) { deathcounts = help.Int(pText); } else if (SDL_strcmp(pKey, "totalflips") == 0) { totalflips = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom") == 0) { hardestroom = pText; } else if (SDL_strcmp(pKey, "hardestroomdeaths") == 0) { hardestroomdeaths = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_x") == 0) { hardestroom_x = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_y") == 0) { hardestroom_y = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_specialname") == 0) { hardestroom_specialname = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_finalstretch") == 0) { hardestroom_finalstretch = help.Int(pText); } else if (SDL_strcmp(pKey, "currentsong") == 0) { int song = help.Int(pText); if (song != -1) { music.play(song); } } else if (SDL_strcmp(pKey, "showtargets") == 0) { map.showtargets = help.Int(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]) map.showtargets = true; if (obj.flags[42]) map.showtrinkets = true; } void Game::customloadquick(const std::string& savfile) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; std::string levelfile; if (cliplaytest) { savex = playx; savey = playy; saverx = playrx; savery = playry; savegc = playgc; if (playmusic > -1) { music.play(playmusic); } return; } levelfile = savfile.substr(7); if (!FILESYSTEM_loadTiXml2Document(("saves/"+levelfile+".vvv").c_str(), doc)) { vlog_error("%s.vvv not found", levelfile.c_str()); return; } if (doc.Error()) { vlog_error("Error parsing %s.vvv: %s", levelfile.c_str(), doc.ErrorStr()); return; } // Like readmaingamesave(...), old saves have just hardestroom_x = -1; hardestroom_y = -1; hardestroom_specialname = false; hardestroom_finalstretch = false; for (pElem = hDoc .FirstChildElement() .FirstChildElement("Data") .FirstChildElement() .ToElement(); pElem != NULL; pElem = pElem->NextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText() ; if(pText == NULL) { pText = ""; } LOAD_ARRAY_RENAME(worldmap, map.explored) LOAD_ARRAY_RENAME(flags, obj.flags) LOAD_ARRAY_RENAME(moods, obj.customcrewmoods) LOAD_ARRAY(crewstats) LOAD_ARRAY_RENAME(collect, obj.collect) LOAD_ARRAY_RENAME(customcollect, obj.customcollect) if (SDL_strcmp(pKey, "finalmode") == 0) { map.finalmode = help.Int(pText); } if (SDL_strcmp(pKey, "finalstretch") == 0) { map.finalstretch = help.Int(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 (SDL_strcmp(pKey, "savex") == 0) { savex = help.Int(pText); } else if (SDL_strcmp(pKey, "savey") == 0) { savey = help.Int(pText); } else if (SDL_strcmp(pKey, "saverx") == 0) { saverx = help.Int(pText); } else if (SDL_strcmp(pKey, "savery") == 0) { savery = help.Int(pText); } else if (SDL_strcmp(pKey, "savegc") == 0) { savegc = help.Int(pText); } else if (SDL_strcmp(pKey, "savedir") == 0) { savedir= help.Int(pText); } else if (SDL_strcmp(pKey, "savepoint") == 0) { savepoint = help.Int(pText); } else if (SDL_strcmp(pKey, "savecolour") == 0) { savecolour = help.Int(pText); } else if (SDL_strcmp(pKey, "companion") == 0) { companion = help.Int(pText); } else if (SDL_strcmp(pKey, "lastsaved") == 0) { lastsaved = help.Int(pText); } else if (SDL_strcmp(pKey, "teleportscript") == 0) { teleportscript = pText; } else if (SDL_strcmp(pKey, "supercrewmate") == 0) { supercrewmate = help.Int(pText); } else if (SDL_strcmp(pKey, "scmprogress") == 0) { scmprogress = help.Int(pText); } else if (SDL_strcmp(pKey, "frames") == 0) { frames = help.Int(pText); } else if (SDL_strcmp(pKey, "seconds") == 0) { seconds = help.Int(pText); } else if (SDL_strcmp(pKey, "minutes") == 0) { minutes = help.Int(pText); } else if (SDL_strcmp(pKey, "hours") == 0) { hours = help.Int(pText); } else if (SDL_strcmp(pKey, "deathcounts") == 0) { deathcounts = help.Int(pText); } else if (SDL_strcmp(pKey, "totalflips") == 0) { totalflips = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom") == 0) { hardestroom = pText; } else if (SDL_strcmp(pKey, "hardestroomdeaths") == 0) { hardestroomdeaths = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_x") == 0) { hardestroom_x = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_y") == 0) { hardestroom_y = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_specialname") == 0) { hardestroom_specialname = help.Int(pText); } else if (SDL_strcmp(pKey, "hardestroom_finalstretch") == 0) { hardestroom_finalstretch = help.Int(pText); } else if (SDL_strcmp(pKey, "currentsong") == 0) { int song = help.Int(pText); if (song != -1) { music.play(song); } } else if (SDL_strcmp(pKey, "lang_custom") == 0) { loc::lang_custom = pText; if (pText[0] != '\0') { loc::loadtext_custom(NULL); } } else if (SDL_strcmp(pKey, "showminimap") == 0) { map.customshowmm = help.Int(pText); } else if (SDL_strcmp(pKey, "mapreveal") == 0) { map.revealmap = help.Int(pText); } else if (SDL_strcmp(pKey, "disabletemporaryaudiopause") == 0) { disabletemporaryaudiopause = help.Int(pText); } else if (SDL_strcmp(pKey, "showtrinkets") == 0) { map.showtrinkets = help.Int(pText); } else if (SDL_strcmp(pKey, "roomname") == 0) { map.setroomname(pText); map.roomnameset = true; map.roomname_special = true; } else if (SDL_strcmp(pKey, "currentregion") == 0) { map.currentregion = help.Int(pText); } else if (SDL_strcmp(pKey, "regions") == 0) { tinyxml2::XMLElement* pElem2; for (pElem2 = pElem->FirstChildElement(); pElem2 != NULL; pElem2 = pElem2->NextSiblingElement()) { int thisid = 0; int thisrx = 0; int thisry = 0; int thisrx2 = (cl.mapwidth - 1); int thisry2 = (cl.mapheight - 1); if (pElem2->Attribute("id")) { thisid = help.Int(pElem2->Attribute("id")); } for (tinyxml2::XMLElement* pElem3 = pElem2->FirstChildElement(); pElem3 != NULL; pElem3 = pElem3->NextSiblingElement()) { if (SDL_strcmp(pElem3->Value(), "rx") == 0 && pElem3->GetText() != NULL) { thisrx = help.Int(pElem3->GetText()); } if (SDL_strcmp(pElem3->Value(), "ry") == 0 && pElem3->GetText() != NULL) { thisry = help.Int(pElem3->GetText()); } if (SDL_strcmp(pElem3->Value(), "rx2") == 0 && pElem3->GetText() != NULL) { thisrx2 = help.Int(pElem3->GetText()); } if (SDL_strcmp(pElem3->Value(), "ry2") == 0 && pElem3->GetText() != NULL) { thisry2 = help.Int(pElem3->GetText()); } } map.setregion(thisid, thisrx, thisry, thisrx2, thisry2); } } } } static void loadthissummary( const char* filename, struct Game::Summary* summary, tinyxml2::XMLDocument& doc ) { tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (doc.Error()) { vlog_error("Error parsing %s: %s", filename, doc.ErrorStr()); return; } summary->exists = true; for (pElem = hDoc .FirstChildElement() .FirstChildElement("Data") .FirstChildElement() .ToElement(); pElem != NULL; pElem = pElem->NextSiblingElement()) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText(); if (pText == NULL) { pText = ""; } if (SDL_strcmp(pKey, "seconds") == 0) { summary->seconds = help.Int(pText); } else if (SDL_strcmp(pKey, "minutes") == 0) { summary->minutes = help.Int(pText); } else if (SDL_strcmp(pKey, "hours") == 0) { summary->hours = help.Int(pText); } else if (SDL_strcmp(pKey, "saverx") == 0) { summary->saverx = help.Int(pText); } else if (SDL_strcmp(pKey, "savery") == 0) { summary->savery = help.Int(pText); } else if (SDL_strcmp(pKey, "trinkets") == 0) { summary->trinkets = help.Int(pText); } LOAD_ARRAY_RENAME(crewstats, summary->crewstats) } } void Game::loadsummary(void) { tinyxml2::XMLDocument doc; SDL_zero(last_telesave); SDL_zero(last_quicksave); if (FILESYSTEM_loadTiXml2Document("saves/tsave.vvv", doc)) { loadthissummary("tsave.vvv", &last_telesave, doc); } if (FILESYSTEM_loadTiXml2Document("saves/qsave.vvv", doc)) { loadthissummary("qsave.vvv", &last_quicksave, doc); } } void Game::initteleportermode(void) { //Set the teleporter variable to the right position! teleport_to_teleporter = 0; for (size_t i = 0; i < map.teleporters.size(); i++) { if (roomx == map.teleporters[i].x + 100 && roomy == map.teleporters[i].y + 100) { teleport_to_teleporter = i; } } } bool Game::savetele(void) { if (map.custommode || inspecial()) { //Don't trash save data! return false; } tinyxml2::XMLDocument doc; bool already_exists = FILESYSTEM_loadTiXml2Document("saves/tsave.vvv", doc); if (!already_exists) { vlog_info("No tsave.vvv found. Creating new file"); } else if (doc.Error()) { vlog_error("Error parsing existing tsave.vvv: %s", doc.ErrorStr()); vlog_info("Creating new tsave.vvv"); } last_telesave = writemaingamesave(doc); if(!FILESYSTEM_saveTiXml2Document("saves/tsave.vvv", doc)) { vlog_error("Could Not Save game!"); vlog_error("Failed: %s%s", saveFilePath, "tsave.vvv"); return false; } vlog_info("Game saved"); return true; } bool Game::savequick(void) { if (map.custommode || inspecial()) { //Don't trash save data! return false; } tinyxml2::XMLDocument doc; bool already_exists = FILESYSTEM_loadTiXml2Document("saves/qsave.vvv", doc); if (!already_exists) { vlog_info("No qsave.vvv found. Creating new file"); } else if (doc.Error()) { vlog_error("Error parsing existing qsave.vvv: %s", doc.ErrorStr()); vlog_info("Creating new qsave.vvv"); } last_quicksave = writemaingamesave(doc); if(!FILESYSTEM_saveTiXml2Document("saves/qsave.vvv", doc)) { vlog_error("Could Not Save game!"); vlog_error("Failed: %s%s", saveFilePath, "qsave.vvv"); return false; } vlog_info("Game saved"); return true; } // Returns summary of save struct Game::Summary Game::writemaingamesave(tinyxml2::XMLDocument& doc) { //TODO make this code a bit cleaner. struct Game::Summary summary; SDL_zero(summary); if (map.custommode || inspecial()) { //Don't trash save data! return summary; } xml::update_declaration(doc); tinyxml2::XMLElement * root = xml::update_element(doc, "Save"); xml::update_comment(root, " Save file " ); tinyxml2::XMLElement * msgs = xml::update_element(root, "Data"); //Flags, map and stats std::string mapExplored; for(size_t i = 0; i < SDL_arraysize(map.explored); i++ ) { mapExplored += help.String(map.explored[i]) + ","; } xml::update_tag(msgs, "worldmap", mapExplored.c_str()); std::string flags; for(size_t i = 0; i < SDL_arraysize(obj.flags); i++ ) { flags += help.String((int) obj.flags[i]) + ","; } xml::update_tag(msgs, "flags", flags.c_str()); std::string crewstatsString; for(size_t i = 0; i < SDL_arraysize(crewstats); i++ ) { crewstatsString += help.String(crewstats[i]) + ","; } xml::update_tag(msgs, "crewstats", crewstatsString.c_str()); std::string collect; for(size_t i = 0; i < SDL_arraysize(obj.collect); i++ ) { collect += help.String((int) obj.collect[i]) + ","; } xml::update_tag(msgs, "collect", collect.c_str()); //Position xml::update_tag(msgs, "savex", savex); xml::update_tag(msgs, "savey", savey); xml::update_tag(msgs, "saverx", saverx); xml::update_tag(msgs, "savery", savery); xml::update_tag(msgs, "savegc", savegc); xml::update_tag(msgs, "savedir", savedir); xml::update_tag(msgs, "savepoint", savepoint); int n_trinkets = trinkets(); xml::update_tag(msgs, "trinkets", n_trinkets); //Special stats if (music.nicefade) { xml::update_tag(msgs, "currentsong", music.nicechange); } else { xml::update_tag(msgs, "currentsong", music.currentsong); } xml::update_tag(msgs, "showtargets", (int) map.showtargets); xml::update_tag(msgs, "teleportscript", teleportscript.c_str()); xml::update_tag(msgs, "companion", companion); xml::update_tag(msgs, "lastsaved", lastsaved); xml::update_tag(msgs, "supercrewmate", (int) supercrewmate); xml::update_tag(msgs, "scmprogress", scmprogress); xml::update_tag(msgs, "frames", frames); xml::update_tag(msgs, "seconds", seconds); xml::update_tag(msgs, "minutes", minutes); xml::update_tag(msgs, "hours", hours); xml::update_tag(msgs, "deathcounts", deathcounts); xml::update_tag(msgs, "totalflips", totalflips); xml::update_tag(msgs, "hardestroom", hardestroom.c_str()); xml::update_tag(msgs, "hardestroomdeaths", hardestroomdeaths); xml::update_tag(msgs, "hardestroom_x", hardestroom_x); xml::update_tag(msgs, "hardestroom_y", hardestroom_y); xml::update_tag(msgs, "hardestroom_specialname", (int) hardestroom_specialname); xml::update_tag(msgs, "hardestroom_finalstretch", (int) hardestroom_finalstretch); xml::update_tag(msgs, "finalmode", (int) map.finalmode); xml::update_tag(msgs, "finalstretch", (int) map.finalstretch); std::string legacy_summary = std::string(map.currentarea(saverx, savery)) + ", " + timestring(); xml::update_tag(msgs, "summary", legacy_summary.c_str()); summary.exists = true; summary.seconds = seconds; summary.minutes = minutes; summary.hours = hours; summary.saverx = saverx; summary.savery = savery; summary.trinkets = n_trinkets; SDL_memcpy(summary.crewstats, crewstats, sizeof(summary.crewstats)); return summary; } bool Game::customsavequick(const std::string& savfile) { const std::string levelfile = savfile.substr(7); tinyxml2::XMLDocument doc; bool already_exists = FILESYSTEM_loadTiXml2Document(("saves/" + levelfile + ".vvv").c_str(), doc); if (!already_exists) { vlog_info("No %s.vvv found. Creating new file", levelfile.c_str()); } else if (doc.Error()) { vlog_error("Error parsing existing %s.vvv: %s", levelfile.c_str(), doc.ErrorStr()); vlog_info("Creating new %s.vvv", levelfile.c_str()); } xml::update_declaration(doc); tinyxml2::XMLElement * root = xml::update_element(doc, "Save"); xml::update_comment(root, " Save file "); tinyxml2::XMLElement * msgs = xml::update_element(root, "Data"); //Flags, map and stats std::string mapExplored; for(size_t i = 0; i < SDL_arraysize(map.explored); i++ ) { mapExplored += help.String(map.explored[i]) + ","; } xml::update_tag(msgs, "worldmap", mapExplored.c_str()); std::string flags; for(size_t i = 0; i < SDL_arraysize(obj.flags); i++ ) { flags += help.String((int) obj.flags[i]) + ","; } xml::update_tag(msgs, "flags", flags.c_str()); std::string moods; for(size_t i = 0; i < SDL_arraysize(obj.customcrewmoods); i++ ) { moods += help.String(obj.customcrewmoods[i]) + ","; } xml::update_tag(msgs, "moods", moods.c_str()); std::string crewstatsString; for(size_t i = 0; i < SDL_arraysize(crewstats); i++ ) { crewstatsString += help.String(crewstats[i]) + ","; } xml::update_tag(msgs, "crewstats", crewstatsString.c_str()); std::string collect; for(size_t i = 0; i < SDL_arraysize(obj.collect); i++ ) { collect += help.String((int) obj.collect[i]) + ","; } xml::update_tag(msgs, "collect", collect.c_str()); std::string customcollect; for(size_t i = 0; i < SDL_arraysize(obj.customcollect); i++ ) { customcollect += help.String((int) obj.customcollect[i]) + ","; } xml::update_tag(msgs, "customcollect", customcollect.c_str()); //Position xml::update_tag(msgs, "savex", savex); xml::update_tag(msgs, "savey", savey); xml::update_tag(msgs, "saverx", saverx); xml::update_tag(msgs, "savery", savery); xml::update_tag(msgs, "savegc", savegc); xml::update_tag(msgs, "savedir", savedir); xml::update_tag(msgs, "savepoint", savepoint); xml::update_tag(msgs, "savecolour", savecolour); xml::update_tag(msgs, "trinkets", trinkets()); xml::update_tag(msgs, "crewmates", crewmates()); xml::update_tag(msgs, "currentregion", map.currentregion); tinyxml2::XMLElement* msg = xml::update_element_delete_contents(msgs, "regions"); for (size_t i = 0; i < SDL_arraysize(map.region); i++) { if (map.region[i].isvalid) { tinyxml2::XMLElement* region_el; region_el = doc.NewElement("region"); region_el->SetAttribute("id", (help.String(i).c_str())); tinyxml2::XMLElement* rx_el; rx_el = doc.NewElement("rx"); rx_el->LinkEndChild(doc.NewText(help.String(map.region[i].rx).c_str())); region_el->LinkEndChild(rx_el); tinyxml2::XMLElement* ry_el; ry_el = doc.NewElement("ry"); ry_el->LinkEndChild(doc.NewText(help.String(map.region[i].ry).c_str())); region_el->LinkEndChild(ry_el); tinyxml2::XMLElement* rx2_el; rx2_el = doc.NewElement("rx2"); rx2_el->LinkEndChild(doc.NewText(help.String(map.region[i].rx2).c_str())); region_el->LinkEndChild(rx2_el); tinyxml2::XMLElement* ry2_el; ry2_el = doc.NewElement("ry2"); ry2_el->LinkEndChild(doc.NewText(help.String(map.region[i].ry2).c_str())); region_el->LinkEndChild(ry2_el); msg->LinkEndChild(region_el); } } //Special stats if (music.nicefade) { xml::update_tag(msgs, "currentsong", music.nicechange ); } else { xml::update_tag(msgs, "currentsong", music.currentsong); } xml::update_tag(msgs, "lang_custom", loc::lang_custom.c_str()); xml::update_tag(msgs, "teleportscript", teleportscript.c_str()); xml::update_tag(msgs, "companion", companion); xml::update_tag(msgs, "lastsaved", lastsaved); xml::update_tag(msgs, "supercrewmate", (int) supercrewmate); xml::update_tag(msgs, "scmprogress", scmprogress); xml::update_tag(msgs, "frames", frames); xml::update_tag(msgs, "seconds", seconds); xml::update_tag(msgs, "minutes", minutes); xml::update_tag(msgs, "hours", hours); xml::update_tag(msgs, "deathcounts", deathcounts); xml::update_tag(msgs, "totalflips", totalflips); xml::update_tag(msgs, "hardestroom", hardestroom.c_str()); xml::update_tag(msgs, "hardestroomdeaths", hardestroomdeaths); xml::update_tag(msgs, "hardestroom_x", hardestroom_x); xml::update_tag(msgs, "hardestroom_y", hardestroom_y); xml::update_tag(msgs, "hardestroom_specialname", (int) hardestroom_specialname); xml::update_tag(msgs, "hardestroom_finalstretch", (int) hardestroom_finalstretch); xml::update_tag(msgs, "showminimap", (int) map.customshowmm); xml::update_tag(msgs, "mapreveal", (int) map.revealmap); xml::update_tag(msgs, "disabletemporaryaudiopause", (int) disabletemporaryaudiopause); xml::update_tag(msgs, "showtrinkets", (int) map.showtrinkets); if (map.roomnameset) { xml::update_tag(msgs, "roomname", map.roomname); } else { // If there's roomname tags, remove them. There will probably only always be one, but just in case... tinyxml2::XMLElement* element; while ((element = msgs->FirstChildElement("roomname")) != NULL) { doc.DeleteNode(element); } } std::string legacy_summary = customleveltitle + ", " + timestring(); xml::update_tag(msgs, "summary", legacy_summary.c_str()); if(!FILESYSTEM_saveTiXml2Document(("saves/"+levelfile+".vvv").c_str(), doc)) { vlog_error("Could Not Save game!"); vlog_error("Failed: %s%s%s", saveFilePath, levelfile.c_str(), ".vvv"); return false; } vlog_info("Game saved"); return true; } void Game::loadtele(void) { tinyxml2::XMLDocument doc; if (!FILESYSTEM_loadTiXml2Document("saves/tsave.vvv", doc)) return; readmaingamesave("tsave.vvv", doc); } std::string Game::unrescued(void) { //Randomly return the name of an unrescued crewmate //Localization is handled with regular cutscene dialogue 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(void) { if (timetrialcountdown > 0) { return; } 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 ) { return timetstring(help.hms_to_seconds(hrs, min, sec)); } std::string Game::timestring(void) { return giventimestring(hours, minutes, seconds); } std::string Game::resulttimestring(void) { //given result time in seconds: char output[SCREEN_WIDTH_CHARS + 1]; help.format_time(output, sizeof(output), timetrialresulttime, timetrialresultframes, true); return output; } std::string Game::timetstring( int t ) { //given par time in seconds: char output[SCREEN_WIDTH_CHARS + 1]; help.format_time(output, sizeof(output), t, -1, true); return output; } void Game::timestringcenti(char* buffer, const size_t buffer_size) { help.format_time(buffer, buffer_size, help.hms_to_seconds(hours, minutes, seconds), frames, true); } void Game::returnmenu(void) { if (menustack.empty()) { vlog_error("Error: returning to previous menu frame on empty stack!"); return; } /* FIXME: Super bad kludge, don't hardcode this! */ if (currentmenuname == Menu::ed_music) { music.fadeout(); } else if (currentmenuname == Menu::gamecompletecontinue || currentmenuname == Menu::timetrialcomplete3 || currentmenuname == Menu::gameover2 || currentmenuname == Menu::nodeathmodecomplete2) { music.play(Music_PRESENTINGVVVVVV); } enum Menu::MenuName camefrom = currentmenuname; MenuStackFrame& frame = menustack[menustack.size()-1]; //Store this in case createmenu() removes the stack frame int previousoption = frame.option; createmenu(frame.name, true); currentmenuoption = previousoption; //Remove the stackframe now, but createmenu() might have already gotten to it //if we were returning to the main menu if (!menustack.empty()) { menustack.pop_back(); } /* FIXME: Even more horrible kludge! */ if (camefrom == Menu::timetrialcomplete3) { if (can_unlock_ndm()) { unlock_ndm(); } } } void Game::returntomenu(enum Menu::MenuName t) { if (currentmenuname == t) { createmenu(t, true); return; } //Unwind the menu stack until we reach our desired menu int i = menustack.size() - 1; while (i >= 0) { //If we pop it off we can't reference it anymore, so check for it now bool is_the_menu_we_want = menustack[i].name == t; returnmenu(); if (is_the_menu_we_want) { break; } i--; } } void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) { if (t == Menu::mainmenu && !menutestmode) { //Either we've just booted up the game or returned from gamemode //Whichever it is, we shouldn't have a stack, //and most likely don't have a current stackframe menustack.clear(); } else if (!samemenu) { MenuStackFrame frame; frame.option = currentmenuoption; frame.name = currentmenuname; menustack.push_back(frame); currentmenuoption = 0; } currentmenuname = t; menuyoff = 0; int maxspacing = 30; // maximum value for menuspacing, can only become lower. menucountdown = 0; menuoptions.clear(); switch (t) { case Menu::mainmenu: if (ingame_titlemode) { /* We shouldn't be here! */ SDL_assert(0 && "Entering main menu from in-game options!"); break; } #if !defined(MAKEANDPLAY) option(loc::gettext("play")); #endif option(loc::gettext("levels")); option(loc::gettext("options")); if (loc::show_translator_menu) { option(loc::gettext("translator")); } option(loc::gettext("credits")); option(loc::gettext("quit")); menuyoff = -10; maxspacing = 15; break; case Menu::playerworlds: option(loc::gettext("play a level")); option(loc::gettext("level editor"), !editor_disabled); if (!editor_disabled) { option(loc::gettext("open level folder"), FILESYSTEM_openDirectoryEnabled()); option(loc::gettext("show level folder path")); } option(loc::gettext("return")); menuyoff = -40; maxspacing = 15; break; case Menu::confirmshowlevelspath: option(loc::gettext("no, don't show me")); option(loc::gettext("yes, reveal the path")); menuyoff = -10; break; case Menu::showlevelspath: option(loc::gettext("return to levels")); menuyoff = 60; break; case Menu::levellist: if(cl.ListOfMetaData.size()==0) { option(loc::gettext("ok")); menuyoff = -20; } else { for(int i=0; i<(int) cl.ListOfMetaData.size(); i++) // FIXME: int/size_t! -flibit { if(i>=levelpage*8 && i< (levelpage*8)+8) { const std::string filename = cl.ListOfMetaData[i].filename.substr(7); int score = 0; if (customlevelstats.count(filename) > 0) { score = customlevelstats[filename]; } const char* prefix; switch (score) { case 0: { static const char tmp[] = " "; prefix = tmp; break; } case 1: { static const char tmp[] = " * "; prefix = tmp; break; } case 3: { static const char tmp[] = "** "; prefix = tmp; break; } default: SDL_assert(0 && "Unhandled menu text prefix!"); prefix = ""; break; } const char* title = cl.ListOfMetaData[i].title.c_str(); if (cl.ListOfMetaData[i].title_is_gettext) { title = loc::gettext(title); } /* We have to make sure the stars and spaces are consistently on the * correct side of the title, no matter what bidi characters are in there. * So just always let the bidi engine handle it, with a few control chars. */ char text[MENU_TEXT_BYTES]; SDL_snprintf( text, sizeof(text), "%s%s%s%s%s", // LRM or RLM depending on UI language, to make the stars aligned to left or right UTF8_encode(font::is_rtl(PR_FONT_INTERFACE) ? 0x200F : 0x200E).bytes, prefix, // FIRST STRONG ISOLATE, to start an isolated block oriented however bidi sees fit UTF8_encode(0x2068).bytes, title, // POP DIRECTIONAL ISOLATE, exit isolated level title UTF8_encode(0x2069).bytes ); for (size_t ii = 0; text[ii] != '\0'; ++ii) { text[ii] = SDL_tolower(text[ii]); } option( text, true, (cl.ListOfMetaData[i].title_is_gettext ? PR_FONT_INTERFACE : PR_FONT_IDX( cl.ListOfMetaData[i].level_main_font_idx, font::is_rtl(PR_FONT_INTERFACE) )) | PR_RTL_XFLIP ); } } if (cl.ListOfMetaData.size() > 8) { if((size_t) ((levelpage*8)+8) = 3 && !unlocknotify[Unlock_TIMETRIAL_SPACESTATION1]) { temp++; } if (unlock[Unlock_LABORATORY_COMPLETE] && stat_trinkets >= 6 && !unlocknotify[Unlock_TIMETRIAL_LABORATORY]) { temp++; } if (unlock[Unlock_TOWER_COMPLETE] && stat_trinkets >= 9 && !unlocknotify[Unlock_TIMETRIAL_TOWER]) { temp++; } if (unlock[Unlock_SPACESTATION2_COMPLETE] && stat_trinkets >= 12 && !unlocknotify[Unlock_TIMETRIAL_SPACESTATION2]) { temp++; } if (unlock[Unlock_WARPZONE_COMPLETE] && stat_trinkets >= 15 && !unlocknotify[Unlock_TIMETRIAL_WARPZONE]) { temp++; } if (unlock[UnlockTrophy_GAME_COMPLETE] && stat_trinkets >= 18 && !unlocknotify[Unlock_TIMETRIAL_FINALLEVEL]) { temp++; } if (temp > 0) { //you've unlocked a time trial! if (unlock[Unlock_SPACESTATION1_COMPLETE] && stat_trinkets >= 3) { unlocknotify[Unlock_TIMETRIAL_SPACESTATION1] = true; unlock[Unlock_TIMETRIAL_SPACESTATION1] = true; } if (unlock[Unlock_LABORATORY_COMPLETE] && stat_trinkets >= 6) { unlocknotify[Unlock_TIMETRIAL_LABORATORY] = true; unlock[Unlock_TIMETRIAL_LABORATORY] = true; } if (unlock[Unlock_TOWER_COMPLETE] && stat_trinkets >= 9) { unlocknotify[Unlock_TIMETRIAL_TOWER] = true; unlock[Unlock_TIMETRIAL_TOWER] = true; } if (unlock[Unlock_SPACESTATION2_COMPLETE] && stat_trinkets >= 12) { unlocknotify[Unlock_TIMETRIAL_SPACESTATION2] = true; unlock[Unlock_TIMETRIAL_SPACESTATION2] = true; } if (unlock[Unlock_WARPZONE_COMPLETE] && stat_trinkets >= 15) { unlocknotify[Unlock_TIMETRIAL_WARPZONE] = true; unlock[Unlock_TIMETRIAL_WARPZONE] = true; } if (unlock[UnlockTrophy_GAME_COMPLETE] && stat_trinkets >= 18) { unlocknotify[Unlock_TIMETRIAL_FINALLEVEL] = true; unlock[Unlock_TIMETRIAL_FINALLEVEL] = true; } if (temp == 1) { createmenu(Menu::unlocktimetrial, true); savestatsandsettings(); } else if (temp > 1) { createmenu(Menu::unlocktimetrials, true); savestatsandsettings(); } } else { //Alright, we haven't unlocked any time trials. How about no death mode? if (can_unlock_ndm()) { unlock_ndm(); } //Alright then! Flip mode? else if (unlock[UnlockTrophy_GAME_COMPLETE] && !unlocknotify[Unlock_FLIPMODE]) { unlock[Unlock_FLIPMODE] = true; unlocknotify[Unlock_FLIPMODE] = true; createmenu(Menu::unlockflipmode, true); savestatsandsettings(); } //What about the intermission levels? else if (unlock[Unlock_INTERMISSION2_COMPLETE] && !unlocknotify[Unlock_INTERMISSION_REPLAYS]) { unlock[Unlock_INTERMISSION_REPLAYS] = true; unlocknotify[Unlock_INTERMISSION_REPLAYS] = true; createmenu(Menu::unlockintermission, true); savestatsandsettings(); } else { if (save_exists()) { option(loc::gettext("continue")); } else { option(loc::gettext("new game")); } //ok, secret lab! no notification, but test: if (unlock[Unlock_SECRETLAB]) { option(loc::gettext("secret lab")); } option(loc::gettext("play modes")); if (save_exists()) { option(loc::gettext("new game")); } option(loc::gettext("return")); if (unlock[Unlock_SECRETLAB]) { menuyoff = -30; } else { menuyoff = -40; } } } break; } case Menu::unlocktimetrial: case Menu::unlocktimetrials: case Menu::unlocknodeathmode: case Menu::unlockintermission: case Menu::unlockflipmode: option(loc::gettext("proceed")); menuyoff = 70; break; case Menu::newgamewarning: option(loc::gettext("start new game")); option(loc::gettext("return")); menuyoff = 64; break; case Menu::playmodes: option(loc::gettext("time trials"), !nocompetitive_unless_translator()); option(loc::gettext("intermissions"), unlock[Unlock_INTERMISSION_REPLAYS]); option(loc::gettext("no death mode"), unlock[Unlock_NODEATHMODE] && !nocompetitive()); option(loc::gettext("flip mode"), unlock[Unlock_FLIPMODE]); option(loc::gettext("return")); menuyoff = 8; maxspacing = 20; break; case Menu::intermissionmenu: option(loc::gettext("play intermission 1")); option(loc::gettext("play intermission 2")); option(loc::gettext("return")); menuyoff = -35; break; case Menu::playint1: start_translator_exploring = false; option(loc::gettext_case("Vitellary", 1)); option(loc::gettext_case("Vermilion", 1)); option(loc::gettext_case("Verdigris", 1)); option(loc::gettext_case("Victoria", 1)); option(loc::gettext("return")); menuyoff = 10; break; case Menu::playint2: start_translator_exploring = false; option(loc::gettext_case("Vitellary", 1)); option(loc::gettext_case("Vermilion", 1)); option(loc::gettext_case("Verdigris", 1)); option(loc::gettext_case("Victoria", 1)); option(loc::gettext("return")); menuyoff = 10; break; case Menu::continuemenu: map.settowercolour(3); option(loc::gettext("continue from teleporter")); option(loc::gettext("continue from quicksave")); option(loc::gettext("return")); menuyoff = 20; break; case Menu::startnodeathmode: option(loc::gettext("disable cutscenes")); option(loc::gettext("enable cutscenes")); option(loc::gettext("return")); menuyoff = 40; break; case Menu::gameover: menucountdown = 120; menudest=Menu::gameover2; break; case Menu::gameover2: option(loc::gettext("return to play menu")); menuyoff = 80; break; case Menu::unlockmenutrials: option(loc::gettext("space station 1"), !unlock[Unlock_TIMETRIAL_SPACESTATION1]); option(loc::gettext("the laboratory"), !unlock[Unlock_TIMETRIAL_LABORATORY]); option(loc::gettext("the tower"), !unlock[Unlock_TIMETRIAL_TOWER]); option(loc::gettext("space station 2"), !unlock[Unlock_TIMETRIAL_SPACESTATION2]); option(loc::gettext("the warp zone"), !unlock[Unlock_TIMETRIAL_WARPZONE]); option(loc::gettext("the final level"), !unlock[Unlock_TIMETRIAL_FINALLEVEL]); option(loc::gettext("return")); menuyoff = 0; break; case Menu::timetrials: option(loc::gettext(unlock[Unlock_TIMETRIAL_SPACESTATION1] ? "space station 1" : "???"), unlock[Unlock_TIMETRIAL_SPACESTATION1]); option(loc::gettext(unlock[Unlock_TIMETRIAL_LABORATORY] ? "the laboratory" : "???"), unlock[Unlock_TIMETRIAL_LABORATORY]); option(loc::gettext(unlock[Unlock_TIMETRIAL_TOWER] ? "the tower" : "???"), unlock[Unlock_TIMETRIAL_TOWER]); option(loc::gettext(unlock[Unlock_TIMETRIAL_SPACESTATION2] ? "space station 2" : "???"), unlock[Unlock_TIMETRIAL_SPACESTATION2]); option(loc::gettext(unlock[Unlock_TIMETRIAL_WARPZONE] ? "the warp zone" : "???"), unlock[Unlock_TIMETRIAL_WARPZONE]); option(loc::gettext(unlock[Unlock_TIMETRIAL_FINALLEVEL] ? "the final level" : "???"), unlock[Unlock_TIMETRIAL_FINALLEVEL]); option(loc::gettext("return")); menuyoff = 0; maxspacing = 15; break; case Menu::nodeathmodecomplete: menucountdown = 90; menudest = Menu::nodeathmodecomplete2; break; case Menu::nodeathmodecomplete2: option(loc::gettext("return to play menu")); menuyoff = 70; break; case Menu::timetrialcomplete: menucountdown = 90; menudest=Menu::timetrialcomplete2; break; case Menu::timetrialcomplete2: menucountdown = 60; menudest=Menu::timetrialcomplete3; break; case Menu::timetrialcomplete3: option(loc::gettext("return to play menu")); option(loc::gettext("try again")); menuyoff = 70; break; case Menu::gamecompletecontinue: option(loc::gettext("return to play menu")); menuyoff = 70; break; case Menu::errorsavingsettings: option(loc::gettext("ok")); option(loc::gettext("silence")); menuyoff = 10; break; case Menu::errorloadinglevel: case Menu::warninglevellist: option(loc::gettext("ok")); menuyoff = 50; break; } // Automatically center the menu. We must check the width of the menu with the initial horizontal spacing. // If it's too wide, reduce the horizontal spacing by 5 and retry. // Try to limit the menu width to 272 pixels: 320 minus 16*2 for square brackets, minus 8*2 padding. // The square brackets fall outside the menu width (i.e. selected menu options are printed 16 pixels to the left) bool done_once = false; int menuwidth = 0; for (; !done_once || (menuwidth > 272 && menuspacing > 0); maxspacing -= 5) { done_once = true; menuspacing = maxspacing; menuwidth = 0; for (size_t i = 0; i < menuoptions.size(); i++) { int width = i*menuspacing + font::len(menuoptions[i].print_flags, menuoptions[i].text); if (width > menuwidth) menuwidth = width; } } menuxoff = (320-menuwidth)/2; } bool Game::can_unlock_ndm(void) { int temp = 0; if (bestrank[TimeTrial_SPACESTATION1] >= 2) temp++; if (bestrank[TimeTrial_LABORATORY] >= 2) temp++; if (bestrank[TimeTrial_TOWER] >= 2) temp++; if (bestrank[TimeTrial_SPACESTATION2] >= 2) temp++; if (bestrank[TimeTrial_WARPZONE] >= 2) temp++; if (bestrank[TimeTrial_FINALLEVEL] >= 2) temp++; return temp >= 4 && !unlocknotify[Unlock_NODEATHMODE]; } void Game::unlock_ndm(void) { unlocknotify[Unlock_NODEATHMODE] = true; unlock[Unlock_NODEATHMODE] = true; createmenu(Menu::unlocknodeathmode, true); savestatsandsettings(); } void Game::deletequick(void) { if (inspecial() || map.custommode) { return; } if (!FILESYSTEM_delete("saves/qsave.vvv")) { vlog_error("Error deleting saves/qsave.vvv"); } else { SDL_zero(last_quicksave); } } void Game::deletetele(void) { if (inspecial() || map.custommode) { return; } if (!FILESYSTEM_delete("saves/tsave.vvv")) { vlog_error("Error deleting saves/tsave.vvv"); } else { SDL_zero(last_telesave); } } void Game::customdeletequick(const std::string& file) { const std::string path = "saves/" + file.substr(7) + ".vvv"; if (!FILESYSTEM_delete(path.c_str())) { vlog_error("Error deleting %s", path.c_str()); } } void Game::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; } } int Game::crewrescued(void) { int temp = 0; for (size_t i = 0; i < SDL_arraysize(crewstats); i++) { if (crewstats[i]) { temp++; } } return temp; } void Game::resetgameclock(void) { frames = 0; seconds = 0; minutes = 0; hours = 0; } int Game::trinkets(void) { int temp = 0; for (size_t i = 0; i < SDL_arraysize(obj.collect); i++) { if (obj.collect[i]) { temp++; } } return temp; } int Game::crewmates(void) { int temp = 0; for (size_t i = 0; i < SDL_arraysize(obj.customcollect); i++) { if (obj.customcollect[i]) { temp++; } } return temp; } bool Game::anything_unlocked(void) { for (size_t i = 0; i < SDL_arraysize(unlock); i++) { if (unlock[i] && (i == 8 // Secret Lab || (i >= 9 && i <= 14) // any Time Trial || i == 16 // Intermission replays || i == 17 // No Death Mode || i == 18)) // Flip Mode { return true; } } return false; } bool Game::save_exists(void) { return last_telesave.exists || last_quicksave.exists; } static void hardreset(void) { script.hardreset(); } static void returntoeditor_callback(void) { extern Game game; game.returntoeditor(); ed.show_note(loc::gettext("Level quits to menu")); } void Game::quittomenu(void) { if (gamestate != EDITORMODE && map.custommode && !map.custommodeforreal) { /* We are playtesting! Go back to the editor * instead of losing unsaved changes. */ /* This needs to be deferred, otherwise some state would persist. */ DEFER_CALLBACK(returntoeditor_callback); return; } gamestate = TITLEMODE; graphics.fademode = FADE_START_FADEIN; FILESYSTEM_unmountAssets(); loc::unloadtext_custom(); font::unload_custom(); cliplaytest = false; graphics.titlebg.tdrawback = true; graphics.flipmode = false; //Don't be stuck on the summary screen, //or "who do you want to play the level with?" //or "do you want cutscenes?" //or the confirm-load-quicksave menu if (translator_cutscene_test) { returntomenu(Menu::translator_options_cutscenetest); } else if (translator_exploring) { returntomenu(Menu::translator_options_exploregame); } else if (intimetrial) { returntomenu(Menu::timetrials); } else if (inintermission) { returntomenu(Menu::intermissionmenu); } else if (nodeathmode) { returntomenu(Menu::playmodes); } else if (map.custommode) { if (map.custommodeforreal) { returntomenu(Menu::levellist); } else { //Returning from editor editor_disabled = !BUTTONGLYPHS_keyboard_is_available(); returntomenu(Menu::playerworlds); } } else if (save_exists() || anything_unlocked()) { returntomenu(Menu::play); if (!insecretlab) { //Select "continue" currentmenuoption = 0; } } else { createmenu(Menu::mainmenu); } /* We might not be at the end of the frame yet. * If we hardreset() now, some state might still persist. */ DEFER_CALLBACK(hardreset); } void Game::returntolab(void) { gamestate = GAMEMODE; graphics.fademode = FADE_START_FADEIN; map.gotoroom(119, 107); int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].xp = 132; obj.entities[player].yp = 137; } gravitycontrol = 0; savepoint = 0; saverx = 119; savery = 107; savex = 132; savey = 137; savegc = 0; if (INBOUNDS_VEC(player, obj.entities)) { savedir = obj.entities[player].dir; } music.play(Music_PIPEDREAM); } static void resetbg(void) { graphics.backgrounddrawn = false; } void Game::returntoeditor(void) { gamestate = EDITORMODE; graphics.textboxes.clear(); hascontrol = true; advancetext = false; completestop = false; setstate(0); graphics.showcutscenebars = false; graphics.fademode = FADE_NONE; ed.keydelay = 6; ed.settingskey = true; ed.old_note_timer = 0; ed.note_timer = 0; ed.roomnamehide = 0; // Might've been changed in a script font::set_level_font(cl.level_font_name.c_str()); DEFER_CALLBACK(resetbg); music.fadeout(); //If warpdir() is used during playtesting, we need to set it back after! for (int j = 0; j < cl.maxheight; j++) { for (int i = 0; i < cl.maxwidth; i++) { cl.roomproperties[i+(j*cl.maxwidth)].warpdir=ed.kludgewarpdir[i+(j*cl.maxwidth)]; } } graphics.titlebg.scrolldir = 0; graphics.backgrounddrawn = false; graphics.foregrounddrawn = false; } static void returntoingametemp(void) { extern Game game; game.returntomenu(game.kludge_ingametemp); } static void returntoedsettings(void) { extern Game game; game.returntomenu(Menu::ed_settings); } static void nextbgcolor(void) { map.nexttowercolour(); } static void setfademode(void) { graphics.fademode = graphics.ingame_fademode; } static void setflipmode(void) { graphics.flipmode = graphics.setflipmode; } void Game::returntoingame(void) { ingame_titlemode = false; mapheld = true; if (ingame_editormode) { ingame_editormode = false; DEFER_CALLBACK(returntoedsettings); gamestate = EDITORMODE; ed.settingskey = true; } else { DEFER_CALLBACK(returntoingametemp); gamestate = MAPMODE; DEFER_CALLBACK(setflipmode); DEFER_CALLBACK(setfademode); if (!map.custommode && !graphics.setflipmode) { obj.flags[73] = true; } } DEFER_CALLBACK(nextbgcolor); if (nocompetitive()) { invalidate_ndm_trophy(); } } void Game::unlockAchievement(const char* name) { #ifdef MAKEANDPLAY UNUSED(name); #else if (map.custommode) { return; } vlog_debug("Achievement \"%s\" unlocked.", name); NETWORK_unlockAchievement(name); #endif } void Game::mapmenuchange(const enum GameGamestate newgamestate, const bool user_initiated) { if (user_initiated && graphics.resumegamemode) { return; } prevgamestate = gamestate; gamestate = newgamestate; graphics.resumegamemode = false; mapheld = true; gameScreen.recacheTextures(); if (prevgamestate == GAMEMODE) { graphics.menuoffset = 240; } else { graphics.menuoffset = 0; } graphics.oldmenuoffset = graphics.menuoffset; } void Game::copyndmresults(void) { ndmresultcrewrescued = crewrescued(); ndmresulttrinkets = trinkets(); ndmresulthardestroom = hardestroom; ndmresulthardestroom_x = hardestroom_x; ndmresulthardestroom_y = hardestroom_y; ndmresulthardestroom_specialname = hardestroom_specialname; SDL_memcpy(ndmresultcrewstats, crewstats, sizeof(ndmresultcrewstats)); } void Game::invalidate_ndm_trophy(void) { if (nodeatheligible) { vlog_debug("NDM trophy is invalidated!"); } nodeatheligible = false; } static inline int get_framerate(const int slowdown, const int deathseq) { if (deathseq != -1) { return 34; } switch (slowdown) { case 30: return 34; case 24: return 41; case 18: return 55; case 12: return 83; } return 34; } int Game::get_timestep(void) { if ((gamestate == GAMEMODE || (gamestate == TELEPORTERMODE && !useteleporter)) && level_debugger::is_active() && !level_debugger::is_pausing() && key.isDown(SDLK_f)) { return 1; } switch (gamestate) { case GAMEMODE: return get_framerate(slowdown, deathseq); default: return 34; } } bool Game::physics_frozen(void) { return roomname_translator::is_pausing() || level_debugger::is_pausing(); } bool Game::incompetitive(void) { return ( !map.custommode && swnmode && (swngame == SWN_SUPERGRAVITRON || swngame == SWN_START_SUPERGRAVITRON_STEP_1 || swngame == SWN_START_SUPERGRAVITRON_STEP_2) ) || intimetrial || nodeathmode; } bool Game::nocompetitive(void) { return slowdown < 30 || map.invincibility; } bool Game::nocompetitive_unless_translator(void) { return slowdown < 30 || (map.invincibility && !roomname_translator::enabled); } void Game::sabotage_time_trial(void) { timetrialcheater = true; hours++; deathcounts += 100; timetrialparlost = true; } bool Game::isingamecompletescreen(void) { return (state >= 3501 && state <= 3518) || (state >= 3520 && state <= 3522); } ================================================ FILE: desktop_version/src/Game.h ================================================ #ifndef GAME_H #define GAME_H #include #include #include #include #include "Font.h" #include "ScreenSettings.h" /* FIXME: Can't forward declare this enum in C++, unfortunately. * In C, enum sizes are always the same, so you can forward declare them. * In C++ instead, enum sizes are based on how many enums there are. * You cannot specify the underlying type until C++11. * But bumping the standard opens up a can of worms. I'd rather just move to C. -Misa */ #include "Enums.h" // Forward decl without including all of namespace tinyxml2 { class XMLDocument; class XMLElement; } /* 40 chars (160 bytes) covers the entire screen, + 1 more for null terminator */ #define MENU_TEXT_BYTES 161 struct MenuOption { char text[MENU_TEXT_BYTES]; bool active; uint32_t print_flags; }; //Menu IDs namespace Menu { enum MenuName { mainmenu, playerworlds, confirmshowlevelspath, showlevelspath, levellist, quickloadlevel, deletequicklevel, youwannaquit, errornostart, errorsavingsettings, errorloadinglevel, warninglevellist, graphicoptions, ed_settings, ed_desc, ed_music, ed_quit, ed_font, options, gameplayoptions, speedrunneroptions, setglitchrunner, advancedoptions, audiooptions, accessibility, controller, language, translator_main, translator_options, translator_options_limitscheck, translator_options_stats, translator_options_exploregame, translator_options_cutscenetest, translator_maintenance, translator_maintenance_sync, translator_error_setlangwritedir, cleardatamenu, clearcustomdatamenu, setinvincibility, setslowdown, unlockmenu, credits, credits2, credits25, credits3, credits4, credits5, credits6, credits_localisations_implementation, credits_localisations_translations, play, unlocktimetrial, unlocktimetrials, unlocknodeathmode, unlockintermission, unlockflipmode, newgamewarning, playmodes, intermissionmenu, playint1, playint2, continuemenu, startnodeathmode, gameover, gameover2, unlockmenutrials, timetrials, nodeathmodecomplete, nodeathmodecomplete2, timetrialcomplete, timetrialcomplete2, timetrialcomplete3, gamecompletecontinue }; } enum SLIDERMODE { SLIDER_NONE, SLIDER_MUSICVOLUME, SLIDER_SOUNDVOLUME }; /* enums for swngame variable */ enum SWNMODE { SWN_GRAVITRON, SWN_SUPERGRAVITRON, SWN_START_GRAVITRON_STEP_3, SWN_START_GRAVITRON_STEP_2, SWN_START_GRAVITRON_STEP_1, SWN_FINISH_GRAVITRON_STEP_1, SWN_START_SUPERGRAVITRON_STEP_1, SWN_START_SUPERGRAVITRON_STEP_2, SWN_FINISH_GRAVITRON_STEP_2, SWN_NONE }; /* enums for unlock, unlocknotify arrays and unlocknum function */ enum { Unlock_SPACESTATION1_COMPLETE = 0, Unlock_LABORATORY_COMPLETE = 1, Unlock_TOWER_COMPLETE = 2, Unlock_SPACESTATION2_COMPLETE = 3, Unlock_WARPZONE_COMPLETE = 4, UnlockTrophy_GAME_COMPLETE = 5, Unlock_INTERMISSION1_COMPLETE = 6, Unlock_INTERMISSION2_COMPLETE = 7, Unlock_SECRETLAB = 8, Unlock_TIMETRIAL_SPACESTATION1 = 9, Unlock_TIMETRIAL_LABORATORY = 10, Unlock_TIMETRIAL_TOWER = 11, Unlock_TIMETRIAL_SPACESTATION2 = 12, Unlock_TIMETRIAL_WARPZONE = 13, Unlock_TIMETRIAL_FINALLEVEL = 14, Unlock_INTERMISSION_UNUSED = 15, Unlock_INTERMISSION_REPLAYS = 16, Unlock_NODEATHMODE = 17, Unlock_FLIPMODE = 18, UnlockTrophy_FLIPMODE_COMPLETE = 19, UnlockTrophy_NODEATHMODE_COMPLETE = 20 }; /* enums for bestrank, bestlives, besttrinkets, besttimes, bestframes arrays * and timetriallevel */ enum { TimeTrial_SPACESTATION1 = 0, TimeTrial_LABORATORY = 1, TimeTrial_TOWER = 2, TimeTrial_SPACESTATION2 = 3, TimeTrial_WARPZONE = 4, TimeTrial_FINALLEVEL = 5 }; struct MenuStackFrame { int option; enum Menu::MenuName name; }; class Game { char magic[16]; public: void init(void); void setdefaultcontrollerbuttons(void); int crewrescued(void); std::string unrescued(void); void resetgameclock(void); bool customsavequick(const std::string& savfile); bool savequick(void); void gameclock(void); std::string giventimestring(int hrs, int min, int sec); std::string timestring(void); std::string resulttimestring(void); std::string timetstring(int t); void timestringcenti(char* buffer, size_t buffer_size); void returnmenu(void); void returntomenu(enum Menu::MenuName t); void createmenu(enum Menu::MenuName t, bool samemenu = false); bool can_unlock_ndm(void); void unlock_ndm(void); void lifesequence(void); void gethardestroom(void); void levelcomplete_textbox(void); void crewmate_textbox(const int color); void remaining_textbox(void); void actionprompt_textbox(void); void show_save_fail(void); void checkpoint_save(void); void savetele_textbox(void); void setstate(int gamestate); void incstate(void); void setstatedelay(int delay); void lockstate(void); void unlockstate(void); void updatestate(void); void unlocknum(int t); void loadstats(struct ScreenSettings* screen_settings); bool savestats(const struct ScreenSettings* screen_settings, bool sync = true); bool savestats(bool sync = true); void deletestats(void); void deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSettings* screen_settings); void serializesettings(tinyxml2::XMLElement* dataNode, const struct ScreenSettings* screen_settings); void loadsettings(struct ScreenSettings* screen_settings); bool savesettings(const struct ScreenSettings* screen_settings); bool savesettings(void); bool savestatsandsettings(void); void savestatsandsettings_menu(void); void deletesettings(void); void deletequick(void); bool savetele(void); void loadtele(void); void deletetele(void); void customstart(void); void start(void); void startspecial(int t); void starttrial(int t); void swnpenalty(void); void deathsequence(void); void customloadquick(const std::string& savfile); void loadquick(void); void customdeletequick(const std::string& file); void loadsummary(void); static const int numcrew = 6; struct Summary { bool exists; int seconds; int minutes; int hours; int saverx; int savery; int trinkets; bool crewstats[numcrew]; }; struct Summary last_telesave, last_quicksave; bool save_exists(void); void readmaingamesave(const char* savename, tinyxml2::XMLDocument& doc); struct Summary writemaingamesave(tinyxml2::XMLDocument& doc); void initteleportermode(void); const char* saveFilePath; int roomx, roomy; int prevroomx, prevroomy; int savex, savey, saverx, savery; int savegc, savedir; int savecolour; //Added for port int edsavex, edsavey, edsaverx, edsavery; int edsavegc, edsavedir; //State logic stuff int state, statedelay; bool glitchrunkludge; enum GameGamestate gamestate; enum GameGamestate prevgamestate; //only used sometimes bool hascontrol, jumpheld; int jumppressed; int gravitycontrol; bool isingamecompletescreen(void); bool muted; int mutebutton; bool musicmuted; int musicmutebutton; int tapleft, tapright; //Menu interaction stuff void mapmenuchange(const enum GameGamestate newgamestate, const bool user_initiated); bool mapheld; int menupage; int lastsaved; int deathcounts; int framecounter; bool seed_use_sdl_getticks; bool editor_disabled; int frames, seconds, minutes, hours; bool gamesaved; bool gamesavefailed; std::string savetime; int saveframes, saveseconds; int savetrinkets; bool startscript; std::string newscript; bool checkpoint_saving; 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; int currentmenuoption ; bool menutestmode; enum Menu::MenuName currentmenuname; enum Menu::MenuName kludge_ingametemp; enum SLIDERMODE slidermode; int current_credits_list_index; int translator_credits_pagenum; int menuxoff, menuyoff; int menuspacing; std::vector menustack; void inline option(const char* text, bool active = true, uint32_t print_flags = PR_RTL_XFLIP) { MenuOption menuoption; SDL_strlcpy(menuoption.text, text, sizeof(menuoption.text)); menuoption.active = active; menuoption.print_flags = print_flags; menuoptions.push_back(menuoption); } int menucountdown; enum Menu::MenuName menudest; int creditposx, creditposy, creditposdelay; int oldcreditposx; SDL_GameControllerButton gpmenu_lastbutton; bool gpmenu_confirming; bool gpmenu_showremove; bool silence_settings_error; //Sine Wave Ninja Minigame bool swnmode; enum SWNMODE swngame; int swnstate, swnstate2, swnstate3, swnstate4, swndelay, swndeaths; int swntimer, swncolstate, swncoldelay; int swnrecord, swnbestrank, swnrank, swnmessage; //SuperCrewMate Stuff bool supercrewmate, scmhurt; int scmprogress; //Accessibility Options bool colourblindmode; bool noflashingmode; int slowdown; int get_timestep(void); bool physics_frozen(void); bool nodeathmode; int gameoverdelay; bool nocutscenes; int ndmresultcrewrescued; int ndmresulttrinkets; std::string ndmresulthardestroom; int ndmresulthardestroom_x; int ndmresulthardestroom_y; bool ndmresulthardestroom_specialname; void copyndmresults(void); bool nodeatheligible; void invalidate_ndm_trophy(void); //Time Trials bool intimetrial, timetrialparlost; int timetrialcountdown, timetrialshinytarget, timetriallevel; int timetrialpar, timetrialresulttime, timetrialresultframes, timetrialrank; bool timetrialcheater; int timetrialresultshinytarget, timetrialresulttrinkets, timetrialresultpar; int timetrialresultdeaths; bool start_translator_exploring; bool translator_exploring; bool translator_exploring_allowtele; bool translator_cutscene_test; size_t cutscenetest_menu_page; std::string cutscenetest_menu_play_id; int creditposition; int oldcreditposition; bool insecretlab; bool inintermission; bool crewstats[numcrew]; bool ndmresultcrewstats[numcrew]; bool alarmon; int alarmdelay; bool blackout; static const int numunlock = 25; bool unlock[numunlock]; bool unlocknotify[numunlock]; bool anything_unlocked(void); int stat_trinkets; int bestgamedeaths; static const int numtrials = 6; int besttimes[numtrials]; int bestframes[numtrials]; int besttrinkets[numtrials]; int bestlives[numtrials]; int bestrank[numtrials]; int screenshake, flashlight; bool advancetext, pausescript; int deathseq, lifeseq; int trinkets(void); int crewmates(void); int savepoint, teleportxpos; bool teleport; int edteleportent; bool completestop; float inertia; int companion; SDL_Rect teleblock; bool activetele; int readytotele; int oldreadytotele; int activity_r, activity_g, activity_b, activity_y; std::string activity_lastprompt; bool activity_gettext; bool backgroundtext; int activeactivity, act_fade; int prev_act_fade; bool press_left, press_right, press_action, press_map, press_interact; bool interactheld; bool separate_interact; //Some stats: int totalflips; std::string hardestroom; // don't change to C string unless you wanna handle when this string is loaded from the XML int hardestroomdeaths, currentroomdeaths; int hardestroom_x, hardestroom_y; bool hardestroom_specialname; bool hardestroom_finalstretch; bool quickrestartkludge; //Custom stuff std::string customscript[50]; int customcol; int levelpage; int playcustomlevel; std::string customleveltitle; std::string customlevelfilename; void clearcustomlevelstats(void); void loadcustomlevelstats(void); void savecustomlevelstats(void); void updatecustomlevelstats(std::string clevel, int cscore); void deletecustomlevelstats(void); // name -> score. 0 - not played, 1 - finished, 2 - all trinkets, 3 - finished, all trinkets std::map customlevelstats; std::vector controllerButton_map; std::vector controllerButton_flip; std::vector controllerButton_esc; std::vector controllerButton_restart; std::vector controllerButton_interact; bool skipfakeload; bool ghostsenabled; bool cliplaytest; int playx; int playy; int playrx; int playry; int playgc; int playmusic; std::string playassets; void quittomenu(void); void returntolab(void); bool fadetomenu; int fadetomenudelay; bool fadetolab; int fadetolabdelay; void returntoeditor(void); bool inline inspecial(void) { return inintermission || insecretlab || intimetrial || nodeathmode || translator_exploring; } bool incompetitive(void); bool nocompetitive(void); bool nocompetitive_unless_translator(void); void sabotage_time_trial(void); bool over30mode; bool showingametimer; bool ingame_titlemode; bool ingame_editormode; void returntoingame(void); void unlockAchievement(const char *name); bool disablepause; bool disableaudiopause; bool disabletemporaryaudiopause; bool inputdelay; bool statelocked; int old_skip_message_timer; int skip_message_timer; int old_mode_indicator_timer; int mode_indicator_timer; int old_screenshot_border_timer; int screenshot_border_timer; bool screenshot_saved_success; }; #ifndef GAME_DEFINITION extern Game game; #endif #endif /* GAME_H */ ================================================ FILE: desktop_version/src/GlitchrunnerMode.c ================================================ #include "GlitchrunnerMode.h" #include #include #define LOOKUP_TABLE \ FOREACH_ENUM(GlitchrunnerNone, "") \ FOREACH_ENUM(Glitchrunner2_0, "2.0") \ FOREACH_ENUM(Glitchrunner2_2, "2.2") \ const char* GlitchrunnerMode_enum_to_string(const enum GlitchrunnerMode mode) { switch (mode) { #define FOREACH_ENUM(MODE, STRING) \ case MODE: \ return STRING; LOOKUP_TABLE #undef FOREACH_ENUM /* Compiler raises warning about this enum not being handled. */ case GlitchrunnerNumVersions: break; } SDL_assert(0 && "Passed non-existent GlitchrunnerMode!"); return GlitchrunnerMode_enum_to_string(GlitchrunnerNone); } enum GlitchrunnerMode GlitchrunnerMode_string_to_enum(const char* string) { #define FOREACH_ENUM(MODE, STRING) \ if (SDL_strcmp(STRING, string) == 0) \ { \ return MODE; \ } LOOKUP_TABLE #undef FOREACH_ENUM return GlitchrunnerNone; } #undef LOOKUP_TABLE static enum GlitchrunnerMode current_mode = GlitchrunnerNone; void GlitchrunnerMode_set(const enum GlitchrunnerMode mode) { current_mode = mode; } enum GlitchrunnerMode GlitchrunnerMode_get(void) { return current_mode; } int GlitchrunnerMode_less_than_or_equal(const enum GlitchrunnerMode mode) { if (current_mode == GlitchrunnerNone) { return current_mode == mode; } return current_mode <= mode; } ================================================ FILE: desktop_version/src/GlitchrunnerMode.h ================================================ #ifndef GLITCHRUNNERMODE_H #define GLITCHRUNNERMODE_H #ifdef __cplusplus extern "C" { #endif /* Have fun speedrunners! <3 Misa */ /* When a version is added, update the lookup table in GlitchrunnerMode.c */ enum GlitchrunnerMode { GlitchrunnerNone, Glitchrunner2_0, Glitchrunner2_2, /* 2.1 is same as 2.2 */ GlitchrunnerNumVersions }; const char* GlitchrunnerMode_enum_to_string(enum GlitchrunnerMode mode); enum GlitchrunnerMode GlitchrunnerMode_string_to_enum(const char* string); void GlitchrunnerMode_set(enum GlitchrunnerMode mode); enum GlitchrunnerMode GlitchrunnerMode_get(void); int GlitchrunnerMode_less_than_or_equal(enum GlitchrunnerMode mode); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* GLITCHRUNNERMODE_H */ ================================================ FILE: desktop_version/src/Graphics.cpp ================================================ #define GRAPHICS_DEFINITION #include "Graphics.h" #include #include "Alloc.h" #include "Constants.h" #include "CustomLevels.h" #include "Editor.h" #include "Entity.h" #include "Exit.h" #include "FileSystemUtils.h" #include "Font.h" #include "GraphicsUtil.h" #include "IMERender.h" #include "Localization.h" #include "Map.h" #include "Maths.h" #include "Music.h" #include "RoomnameTranslator.h" #include "Screen.h" #include "Script.h" #include "UtilityClass.h" #include "VFormat.h" #include "Vlogging.h" void Graphics::init(void) { flipmode = false; setRect(tiles_rect, 0, 0, 8, 8); setRect(sprites_rect, 0, 0, 32, 32); setRect(footerrect, 0, 230, 320, 10); setRect(tele_rect, 0, 0, 96, 96); // We initialise a few things linestate = 0; trinketcolset = false; showcutscenebars = false; setbars(0); notextoutline = false; flipmode = false; setflipmode = false; // Initialize backgrounds for (int i = 0; i < numstars; i++) { const SDL_Rect star = {(int) (fRandom() * 320), (int) (fRandom() * 240), 2, 2}; stars[i] = star; starsspeed[i] = 4 + (fRandom() * 4); } for (int i = 0; i < numbackboxes; i++) { 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); } backboxes[i] = bb; backboxvx[i] = bvx; backboxvy[i] = bvy; } backboxmult = 0.5 + ((fRandom() * 100) / 200); backoffset = 0; foregrounddrawn = false; backgrounddrawn = false; warpskip = 0; spcol = 0; spcoldel = 0; rcol = 0; crewframe = 0; crewframedelay = 4; menuoffset = 0; oldmenuoffset = 0; resumegamemode = false; //Fading stuff SDL_memset(fadebars, 0, sizeof(fadebars)); setfade(0); fademode = FADE_NONE; ingame_fademode = FADE_NONE; // initialize everything else to zero m = 0; linedelay = 0; gameTexture = NULL; gameplayTexture = NULL; menuTexture = NULL; ghostTexture = NULL; tempShakeTexture = NULL; backgroundTexture = NULL; foregroundTexture = NULL; tempScreenshot = NULL; tempScreenshot2x = NULL; towerbg = TowerBG(); titlebg = TowerBG(); trinketr = 0; trinketg = 0; trinketb = 0; translucentroomname = false; alpha = 1.0f; screenshake_x = 0; screenshake_y = 0; SDL_zero(col_crewred); SDL_zero(col_crewyellow); SDL_zero(col_crewgreen); SDL_zero(col_crewcyan); SDL_zero(col_crewblue); SDL_zero(col_crewpurple); SDL_zero(col_crewinactive); SDL_zero(col_clock); SDL_zero(col_trinket); col_tr = 0; col_tg = 0; col_tb = 0; kludgeswnlinewidth = false; tiles1_mounted = false; tiles2_mounted = false; minimap_mounted = false; gamecomplete_mounted = false; levelcomplete_mounted = false; flipgamecomplete_mounted = false; fliplevelcomplete_mounted = false; } void Graphics::destroy(void) { #define CLEAR_ARRAY(name) \ for (size_t i = 0; i < name.size(); i += 1) \ { \ VVV_freefunc(SDL_FreeSurface, name[i]); \ } \ name.clear(); CLEAR_ARRAY(sprites_surf) CLEAR_ARRAY(flipsprites_surf) #undef CLEAR_ARRAY } static SDL_Surface* tempFilterSrc = NULL; static SDL_Surface* tempFilterDest = NULL; void Graphics::create_buffers(void) { #define CREATE_TEXTURE_WITH_DIMENSIONS(w, h) \ SDL_CreateTexture( \ gameScreen.m_renderer, \ SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, \ (w), (h) \ ) #define CREATE_TEXTURE \ CREATE_TEXTURE_WITH_DIMENSIONS(SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS) #define CREATE_SCROLL_TEXTURE \ CREATE_TEXTURE_WITH_DIMENSIONS(SCREEN_WIDTH_PIXELS + 16, SCREEN_WIDTH_PIXELS + 16) gameTexture = CREATE_TEXTURE; gameplayTexture = CREATE_TEXTURE; menuTexture = CREATE_TEXTURE; ghostTexture = CREATE_TEXTURE; tempShakeTexture = CREATE_TEXTURE; foregroundTexture = CREATE_TEXTURE; backgroundTexture = CREATE_SCROLL_TEXTURE; tempScrollingTexture = CREATE_SCROLL_TEXTURE; towerbg.texture = CREATE_SCROLL_TEXTURE; titlebg.texture = CREATE_SCROLL_TEXTURE; #undef CREATE_SCROLL_TEXTURE #undef CREATE_TEXTURE #undef CREATE_TEXTURE_WITH_DIMENSIONS SDL_SetTextureScaleMode( gameTexture, gameScreen.isFiltered ? SDL_ScaleModeLinear : SDL_ScaleModeNearest ); SDL_SetTextureScaleMode( tempShakeTexture, gameScreen.isFiltered ? SDL_ScaleModeLinear : SDL_ScaleModeNearest ); } void Graphics::destroy_buffers(void) { VVV_freefunc(SDL_DestroyTexture, gameTexture); VVV_freefunc(SDL_DestroyTexture, gameplayTexture); VVV_freefunc(SDL_DestroyTexture, menuTexture); VVV_freefunc(SDL_DestroyTexture, ghostTexture); VVV_freefunc(SDL_DestroyTexture, tempShakeTexture); VVV_freefunc(SDL_DestroyTexture, foregroundTexture); VVV_freefunc(SDL_DestroyTexture, backgroundTexture); VVV_freefunc(SDL_DestroyTexture, tempScrollingTexture); VVV_freefunc(SDL_DestroyTexture, towerbg.texture); VVV_freefunc(SDL_DestroyTexture, titlebg.texture); VVV_freefunc(SDL_FreeSurface, tempFilterSrc); VVV_freefunc(SDL_FreeSurface, tempFilterDest); VVV_freefunc(SDL_FreeSurface, tempScreenshot); VVV_freefunc(SDL_FreeSurface, tempScreenshot2x); } void Graphics::drawspritesetcol(int x, int y, int t, int c) { draw_grid_tile(grphx.im_sprites, t, x, y, sprites_rect.w, sprites_rect.h, getcol(c)); } void Graphics::updatetitlecolours(void) { col_crewred = getcol(15); col_crewyellow = getcol(14); col_crewgreen = getcol(13); col_crewcyan = getcol(0); col_crewblue = getcol(16); col_crewpurple = getcol(20); col_crewinactive = getcol(19); col_clock = getcol(18); col_trinket = getcol(18); } void Graphics::map_tab(int opt, const char* text, bool selected /*= false*/) { int x = opt*80 + 40; if (selected) { char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select_tight.c_str(), "label:str", text); font::print(PR_CEN | PR_CJK_LOW | PR_RTL_XFLIP, x, 220, buffer, 196, 196, 255 - help.glow); } else { font::print(PR_CEN | PR_CJK_LOW | PR_RTL_XFLIP, x, 220, text, 64, 64, 64); } } void Graphics::map_option(int opt, int num_opts, const std::string& text, bool selected /*= false*/) { int x = 80 + opt*32; int y = 136; // start from middle of menu int yoff = -(num_opts * 12) / 2; // could be simplified to -num_opts * 6, this conveys my intent better though yoff += opt * 12; if (flipmode) { y -= yoff; // going down, which in Flip Mode means going up y -= 40; } else { y += yoff; // going up } if (selected) { std::string text_upper(loc::toupper(text)); char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select.c_str(), "label:str", text_upper.c_str()); // Account for brackets x -= (font::len(0, buffer) - font::len(0, text_upper.c_str())) / 2; font::print(PR_RTL_XFLIP, x, y, buffer, 196, 196, 255 - help.glow); } else { font::print(PR_RTL_XFLIP, x, y, loc::remove_toupper_escape_chars(text), 96, 96, 96); } } void Graphics::printcrewname( int x, int y, int t ) { //Print the name of crew member t in the right colour const uint32_t flags = flipmode ? PR_CJK_LOW : PR_CJK_HIGH; switch(t) { case 0: font::print(flags, x, y, loc::gettext("Viridian"), 16, 240, 240); break; case 1: font::print(flags, x, y, loc::gettext("Violet"), 240, 16, 240); break; case 2: font::print(flags, x, y, loc::gettext("Vitellary"), 240, 240, 16); break; case 3: font::print(flags, x, y, loc::gettext("Vermilion"), 240, 16, 16); break; case 4: font::print(flags, x, y, loc::gettext("Verdigris"), 16, 240, 16); break; case 5: font::print(flags, x, y, loc::gettext("Victoria"), 16, 16, 240); break; } } void Graphics::printcrewnamedark( int x, int y, int t ) { //Print the name of crew member t as above, but in black and white const uint32_t flags = flipmode ? PR_CJK_LOW : PR_CJK_HIGH; switch(t) { case 0: font::print(flags, x, y, loc::gettext("Viridian"), 128,128,128); break; case 1: font::print(flags, x, y, loc::gettext("Violet"), 128,128,128); break; case 2: font::print(flags, x, y, loc::gettext("Vitellary"), 128,128,128); break; case 3: font::print(flags, x, y, loc::gettext("Vermilion"), 128,128,128); break; case 4: font::print(flags, x, y, loc::gettext("Verdigris"), 128,128,128); break; case 5: font::print(flags, x, y, loc::gettext("Victoria"), 128,128,128); break; } } void Graphics::printcrewnamestatus( int x, int y, int t, bool rescued ) { //Print the status of crew member t in the right colour int r, g, b; char gender; switch(t) { case 0: r = 12; g = 140, b = 140; gender = 3; break; case 1: r = 140; g = 12; b = 140; gender = 2; break; case 2: r = 140; g = 140; b = 12; gender = 1; break; case 3: r = 140; g = 12; b = 12; gender = 1; break; case 4: r = 12; g = 140; b = 12; gender = 1; break; case 5: r = 12; g = 12; b = 140; gender = 2; break; default: return; } const char* status_text; if (gender == 3 && rescued) { status_text = loc::gettext("(that's you!)"); } else if (rescued) { status_text = loc::gettext_case("Rescued!", gender); } else { r = 64; g = 64; b = 64; status_text = loc::gettext_case("Missing...", gender); } font::print(flipmode ? PR_CJK_HIGH : PR_CJK_LOW, x, y, status_text, r, g, b); } void Graphics::print_level_creator( uint32_t print_flags, const int y, const std::string& creator, const uint8_t r, const uint8_t g, const uint8_t b ) { /* We now display a face instead of "by {author}" for several reasons: * - "by" may be in a different language than the author and look weird ("por various people") * - "by" will be longer in different languages and break the limit that levels assume * - "by" and author may need mutually incompatible fonts, e.g. Japanese level in Korean VVVVVV * - avoids likely grammar problems: male/female difference, name inflection in user-written text... * - it makes sense to make it a face * - if anyone is sad about this decision, the happy face will cheer them up anyway :D */ int width_for_face = 17; int total_width = width_for_face + font::len(print_flags, creator.c_str()); int face_x, text_x, sprite_x; int offset_x = -7; if (!font::is_rtl(print_flags)) { face_x = (SCREEN_WIDTH_PIXELS - total_width) / 2; text_x = face_x + width_for_face; sprite_x = 0; } else { face_x = (SCREEN_WIDTH_PIXELS + total_width) / 2; text_x = face_x - width_for_face; face_x -= 10; // sprite origin sprite_x = 96; print_flags |= PR_RIGHT; } set_texture_color_mod(grphx.im_sprites, r, g, b); draw_texture_part(grphx.im_sprites, face_x + offset_x, y - 3, sprite_x, 0, 24, 12, 1, 1); set_texture_color_mod(grphx.im_sprites, 255, 255, 255); font::print(print_flags, text_x, y, creator, r, g, b); } int Graphics::set_render_target(SDL_Texture* texture) { const int result = SDL_SetRenderTarget(gameScreen.m_renderer, texture); if (result != 0) { WHINE_ONCE_ARGS(("Could not set render target: %s", SDL_GetError())); } return result; } int Graphics::set_texture_color_mod(SDL_Texture* texture, const Uint8 r, const Uint8 g, const Uint8 b) { const int result = SDL_SetTextureColorMod(texture, r, g, b); if (result != 0) { WHINE_ONCE_ARGS(("Could not set texture color mod: %s", SDL_GetError())); } return result; } int Graphics::set_texture_alpha_mod(SDL_Texture* texture, const Uint8 alpha) { const int result = SDL_SetTextureAlphaMod(texture, alpha); if (result != 0) { WHINE_ONCE_ARGS(("Could not set texture alpha mod: %s", SDL_GetError())); } return result; } int Graphics::query_texture(SDL_Texture* texture, Uint32* format, int* access, int* w, int* h) { const int result = SDL_QueryTexture(texture, format, access, w, h); if (result != 0) { WHINE_ONCE_ARGS(("Could not query texture: %s", SDL_GetError())); } return result; } int Graphics::set_blendmode(const SDL_BlendMode blendmode) { const int result = SDL_SetRenderDrawBlendMode(gameScreen.m_renderer, blendmode); if (result != 0) { WHINE_ONCE_ARGS(("Could not set draw mode: %s", SDL_GetError())); } return result; } int Graphics::set_blendmode(SDL_Texture* texture, const SDL_BlendMode blendmode) { const int result = SDL_SetTextureBlendMode(texture, blendmode); if (result != 0) { WHINE_ONCE_ARGS(("Could not set texture blend mode: %s", SDL_GetError())); } return result; } int Graphics::clear(const int r, const int g, const int b, const int a) { set_color(r, g, b, a); const int result = SDL_RenderClear(gameScreen.m_renderer); if (result != 0) { WHINE_ONCE_ARGS(("Could not clear current render target: %s", SDL_GetError())); } return result; } int Graphics::clear(void) { return clear(0, 0, 0, 255); } bool Graphics::substitute(SDL_Texture** texture) { /* Either keep the given texture the same and return false, * or substitute it for a translation and return true. */ if (loc::english_sprites) { return false; } SDL_Texture* subst = NULL; if (*texture == grphx.im_sprites) { subst = grphx.im_sprites_translated; } else if (*texture == grphx.im_flipsprites) { subst = grphx.im_flipsprites_translated; } if (subst == NULL) { return false; } // Apply the same colors as on the original Uint8 r, g, b, a; SDL_GetTextureColorMod(*texture, &r, &g, &b); SDL_GetTextureAlphaMod(*texture, &a); set_texture_color_mod(subst, r, g, b); set_texture_alpha_mod(subst, a); *texture = subst; return true; } void Graphics::post_substitute(SDL_Texture* subst) { set_texture_color_mod(subst, 255, 255, 255); set_texture_alpha_mod(subst, 255); } int Graphics::copy_texture(SDL_Texture* texture, const SDL_Rect* src, const SDL_Rect* dest) { bool is_substituted = substitute(&texture); const int result = SDL_RenderCopy(gameScreen.m_renderer, texture, src, dest); if (result != 0) { WHINE_ONCE_ARGS(("Could not copy texture: %s", SDL_GetError())); } if (is_substituted) { post_substitute(texture); } return result; } int Graphics::copy_texture(SDL_Texture* texture, const SDL_Rect* src, const SDL_Rect* dest, const double angle, const SDL_Point* center, const SDL_RendererFlip flip) { bool is_substituted = substitute(&texture); const int result = SDL_RenderCopyEx(gameScreen.m_renderer, texture, src, dest, angle, center, flip); if (result != 0) { WHINE_ONCE_ARGS(("Could not copy texture: %s", SDL_GetError())); } if (is_substituted) { post_substitute(texture); } return result; } int Graphics::set_color(const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a) { const int result = SDL_SetRenderDrawColor(gameScreen.m_renderer, r, g, b, a); if (result != 0) { WHINE_ONCE_ARGS(("Could not set draw color: %s", SDL_GetError())); } return result; } int Graphics::set_color(const Uint8 r, const Uint8 g, const Uint8 b) { return set_color(r, g, b, 255); } int Graphics::set_color(const SDL_Color color) { return set_color(color.r, color.g, color.b, color.a); } int Graphics::fill_rect(const SDL_Rect* rect) { const int result = SDL_RenderFillRect(gameScreen.m_renderer, rect); if (result != 0) { WHINE_ONCE_ARGS(("Could not draw filled rectangle: %s", SDL_GetError())); } return result; } int Graphics::fill_rect(const SDL_Rect* rect, const int r, const int g, const int b, const int a) { set_color(r, g, b, a); return fill_rect(rect); } int Graphics::fill_rect(const SDL_Rect* rect, const int r, const int g, const int b) { return fill_rect(rect, r, g, b, 255); } int Graphics::fill_rect(const int r, const int g, const int b) { return fill_rect(NULL, r, g, b, 255); } int Graphics::fill_rect(const SDL_Rect* rect, const SDL_Color color) { return fill_rect(rect, color.r, color.g, color.b, color.a); } int Graphics::fill_rect(const int x, const int y, const int w, const int h, const int r, const int g, const int b, const int a) { const SDL_Rect rect = {x, y, w, h}; return fill_rect(&rect, r, g, b, a); } int Graphics::fill_rect(const int x, const int y, const int w, const int h, const int r, const int g, const int b) { return fill_rect(x, y, w, h, r, g, b, 255); } int Graphics::fill_rect(const SDL_Color color) { return fill_rect(NULL, color); } int Graphics::fill_rect(const int x, const int y, const int w, const int h, const SDL_Color color) { return fill_rect(x, y, w, h, color.r, color.g, color.b, color.a); } int Graphics::draw_rect(const SDL_Rect* rect) { const int result = SDL_RenderDrawRect(gameScreen.m_renderer, rect); if (result != 0) { WHINE_ONCE_ARGS(("Could not draw rectangle: %s", SDL_GetError())); } return result; } int Graphics::draw_rect(const SDL_Rect* rect, const int r, const int g, const int b, const int a) { set_color(r, g, b, a); return draw_rect(rect); } int Graphics::draw_rect(const SDL_Rect* rect, const int r, const int g, const int b) { return draw_rect(rect, r, g, b, 255); } int Graphics::draw_rect(const SDL_Rect* rect, const SDL_Color color) { return draw_rect(rect, color.r, color.g, color.b, color.a); } int Graphics::draw_rect(const int x, const int y, const int w, const int h, const int r, const int g, const int b, const int a) { const SDL_Rect rect = {x, y, w, h}; return draw_rect(&rect, r, g, b, a); } int Graphics::draw_rect(const int x, const int y, const int w, const int h, const int r, const int g, const int b) { return draw_rect(x, y, w, h, r, g, b, 255); } int Graphics::draw_rect(const int x, const int y, const int w, const int h, const SDL_Color color) { return draw_rect(x, y, w, h, color.r, color.g, color.b, color.a); } int Graphics::draw_line(const int x, const int y, const int x2, const int y2) { const int result = SDL_RenderDrawLine(gameScreen.m_renderer, x, y, x2, y2); if (result != 0) { WHINE_ONCE_ARGS(("Could not draw line: %s", SDL_GetError())); } return result; } int Graphics::draw_points(const SDL_Point* points, const int count) { const int result = SDL_RenderDrawPoints(gameScreen.m_renderer, points, count); if (result != 0) { WHINE_ONCE_ARGS(("Could not draw points: %s", SDL_GetError())); } return result; } int Graphics::draw_points(const SDL_Point* points, const int count, const int r, const int g, const int b) { set_color(r, g, b); return draw_points(points, count); } void Graphics::draw_sprite(const int x, const int y, const int t, const int r, const int g, const int b) { draw_grid_tile(grphx.im_sprites, t, x, y, sprites_rect.w, sprites_rect.h, r, g, b); } void Graphics::draw_sprite(const int x, const int y, const int t, const SDL_Color color) { draw_grid_tile(grphx.im_sprites, t, x, y, sprites_rect.w, sprites_rect.h, color); } void Graphics::draw_flipsprite(const int x, const int y, const int t, const SDL_Color color) { draw_grid_tile(grphx.im_flipsprites, t, x, y, sprites_rect.w, sprites_rect.h, color); } void Graphics::scroll_texture(SDL_Texture* texture, SDL_Texture* temp, const int x, const int y) { SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer); SDL_Rect texture_rect = {0, 0, 0, 0}; SDL_QueryTexture(texture, NULL, NULL, &texture_rect.w, &texture_rect.h); const SDL_Rect src = {0, 0, texture_rect.w, texture_rect.h}; const SDL_Rect dest = {x, y, texture_rect.w, texture_rect.h}; set_render_target(temp); clear(); copy_texture(texture, &src, &dest); set_render_target(target); copy_texture(temp, &src, &src); } bool Graphics::shouldrecoloroneway(const int tilenum, const bool mounted) { return (tilenum >= 14 && tilenum <= 17 && (!mounted || cl.onewaycol_override)); } void Graphics::drawtile(int x, int y, int t) { if (shouldrecoloroneway(t, tiles1_mounted)) { draw_grid_tile(grphx.im_tiles_tint, t, x, y, tiles_rect.w, tiles_rect.h, cl.getonewaycol()); } else { draw_grid_tile(grphx.im_tiles, t, x, y, tiles_rect.w, tiles_rect.h); } } void Graphics::drawtile2(int x, int y, int t) { if (shouldrecoloroneway(t, tiles2_mounted)) { draw_grid_tile(grphx.im_tiles2_tint, t, x, y, tiles_rect.w, tiles_rect.h, cl.getonewaycol()); } else { draw_grid_tile(grphx.im_tiles2, t, x, y, tiles_rect.w, tiles_rect.h); } } void Graphics::drawtile3(int x, int y, int t, int off, int height_subtract /*= 0*/) { t += off * 30; // Can't use drawgridtile because we want to draw a slice of the tile, // so do the logic ourselves (except include height_subtract in the final call) int width; if (query_texture(grphx.im_tiles3, NULL, NULL, &width, NULL) != 0) { return; } const int x2 = (t % (width / 8)) * 8; const int y2 = (t / (width / 8)) * 8; draw_texture_part(grphx.im_tiles3, x, y, x2, y2, 8, 8 - height_subtract, 1, 1); } const char* Graphics::textbox_line( char* buffer, const size_t buffer_len, const size_t textbox_i, const size_t line_i ) { /* Gets a line in a textbox, accounting for filling button placeholders like {b_map}. * Takes a buffer as an argument, but DOESN'T ALWAYS write to that buffer. * Always use the return value! ^^ * Does not check boundaries. */ const char* line = textboxes[textbox_i].lines[line_i].c_str(); if (!textboxes[textbox_i].fill_buttons) { return line; } vformat_buf(buffer, buffer_len, line, "b_act:but," "b_int:but," "b_map:but," "b_res:but," "b_esc:but", vformat_button(ActionSet_InGame, Action_InGame_ACTION), vformat_button(ActionSet_InGame, Action_InGame_Interact), vformat_button(ActionSet_InGame, Action_InGame_Map), vformat_button(ActionSet_InGame, Action_InGame_Restart), vformat_button(ActionSet_InGame, Action_InGame_Esc) ); return buffer; } void Graphics::drawgui(void) { int text_sign; if (flipmode) { text_sign = -1; } else { text_sign = 1; } //Draw all the textboxes to the screen for (size_t i = 0; i < textboxes.size(); i++) { int text_yoff; int yp; int font_height = font::height(textboxes[i].print_flags); if (flipmode) { text_yoff = 8 + (textboxes[i].lines.size() - 1) * (font_height + textboxes[i].linegap); } else { text_yoff = 8; } yp = textboxes[i].yp; if (flipmode && textboxes[i].flipme) { yp = SCREEN_HEIGHT_PIXELS - yp - 16 - textboxes[i].lines.size() * (font_height + textboxes[i].linegap); } char buffer[SCREEN_WIDTH_CHARS + 1]; int w = textboxes[i].w; if (textboxes[i].fill_buttons) { /* If we can fill in buttons, the width of the box may change... * This is Violet's fault. She decided to say a button name out loud. */ int max = 0; for (size_t j = 0; j < textboxes[i].lines.size(); j++) { int len = font::len(textboxes[i].print_flags, textbox_line(buffer, sizeof(buffer), i, j)); if (len > max) { max = len; } } w = max + 16; } uint32_t print_flags = textboxes[i].print_flags | PR_CJK_LOW; int text_xp; if (font::is_rtl(print_flags)) { print_flags |= PR_RIGHT; text_xp = textboxes[i].xp + w - 8; } else { text_xp = textboxes[i].xp + 8; } const bool transparent = (textboxes[i].r | textboxes[i].g | textboxes[i].b) == 0; if (transparent) { /* To avoid the outlines for different lines overlapping the text itself, * first draw all the outlines and then draw the text. */ size_t j; for (j = 0; j < textboxes[i].lines.size(); j++) { const int x = text_xp; const int y = yp + text_yoff + text_sign * (j * (font_height + textboxes[i].linegap)); if (!textboxes[i].force_outline) { font::print(print_flags | PR_BOR, x, y, textbox_line(buffer, sizeof(buffer), i, j), 0, 0, 0); } else if (textboxes[i].outline) { // We're forcing an outline, so we'll have to draw it ourselves instead of relying on PR_BOR. font::print(print_flags, x - 1, y, textbox_line(buffer, sizeof(buffer), i, j), 0, 0, 0); font::print(print_flags, x + 1, y, textbox_line(buffer, sizeof(buffer), i, j), 0, 0, 0); font::print(print_flags, x, y - 1, textbox_line(buffer, sizeof(buffer), i, j), 0, 0, 0); font::print(print_flags, x, y + 1, textbox_line(buffer, sizeof(buffer), i, j), 0, 0, 0); } } for (j = 0; j < textboxes[i].lines.size(); j++) { font::print( print_flags, text_xp, yp + text_yoff + text_sign * (j * (font_height + textboxes[i].linegap)), textbox_line(buffer, sizeof(buffer), i, j), 196, 196, 255 - help.glow ); } } else { const float tl_lerp = lerp(textboxes[i].prev_tl, textboxes[i].tl); const int r = textboxes[i].r * tl_lerp; const int g = textboxes[i].g * tl_lerp; const int b = textboxes[i].b * tl_lerp; drawpixeltextbox(textboxes[i].xp, yp, w, textboxes[i].h, r, g, b); for (size_t j = 0; j < textboxes[i].lines.size(); j++) { font::print( print_flags | PR_BRIGHTNESS(tl_lerp*255), text_xp, yp + text_yoff + text_sign * (j * (font_height + textboxes[i].linegap)), textbox_line(buffer, sizeof(buffer), i, j), textboxes[i].r, textboxes[i].g, textboxes[i].b ); } } const bool opaque = textboxes[i].tl >= 1.0; const bool draw_overlays = opaque || transparent; if (!draw_overlays) { continue; } if (textboxes[i].image == TEXTIMAGE_LEVELCOMPLETE) { // Level complete const char* english = "Level Complete!"; const char* translation = loc::gettext(english); if (SDL_strcmp(english, translation) != 0 && !(flipmode && fliplevelcomplete_mounted) && !(!flipmode && levelcomplete_mounted) ) { int sc = 2; int y = 28; if (font::len(0, translation) > 144) { // We told translators how long it could be... Ah well, mitigate the damage. sc = 1; y += 4; } if (flipmode) { y = 240 - y - 8 * sc; } SDL_Color color = TEXT_COLOUR("cyan"); font::print((sc == 2 ? PR_2X : PR_1X) | PR_CEN, -1, y, translation, color.r, color.g, color.b); } else { if (flipmode) { drawimage(IMAGE_FLIPLEVELCOMPLETE, 0, 180, true); } else { drawimage(IMAGE_LEVELCOMPLETE, 0, 12, true); } } } else if (textboxes[i].image == TEXTIMAGE_GAMECOMPLETE) { // Game complete const char* english = "Game Complete!"; const char* translation = loc::gettext(english); if (SDL_strcmp(english, translation) != 0 && !(flipmode && flipgamecomplete_mounted) && !(!flipmode && gamecomplete_mounted) ) { int sc = 2; int y = 28; if (font::len(0, translation) > 144) { // We told translators how long it could be... Ah well, mitigate the damage. sc = 1; y += 4; } if (flipmode) { y = 240 - y - 8 * sc; } font::print((sc == 2 ? PR_2X : PR_1X) | PR_CEN, -1, y, translation, 196, 196, 243); } else { if (flipmode) { drawimage(IMAGE_FLIPGAMECOMPLETE, 0, 180, true); } else { drawimage(IMAGE_GAMECOMPLETE, 0, 12, true); } } } for (size_t index = 0; index < textboxes[i].sprites.size(); index++) { TextboxSprite* sprite = &textboxes[i].sprites[index]; int y = sprite->y + yp; if (flipmode) { y = yp + textboxes[i].h - sprite->y - sprites_rect.h; } draw_grid_tile( grphx.im_sprites, sprite->tile, sprite->x + textboxes[i].xp, y, sprites_rect.w, sprites_rect.h, getcol(sprite->col), 1, (flipmode ? -1 : 1) ); } } } void Graphics::updatetextboxes(void) { for (size_t i = 0; i < textboxes.size(); i++) { textboxes[i].update(); if (textboxes[i].tm == 2 && textboxes[i].tl <= 0.5) { textboxes.erase(textboxes.begin() + i); i--; continue; } if (textboxes[i].tl >= 1.0f && ((textboxes[i].r == 175 && textboxes[i].g == 175) || textboxes[i].r == 175 || textboxes[i].g == 175 || textboxes[i].b == 175) && (textboxes[i].r != 175 || textboxes[i].b != 175)) { textboxes[i].rand = fRandom() * 20; } } } void Graphics::drawimagecol( int t, int xp, int yp, const SDL_Color ct, bool cent/*= false*/ ) { if (!INBOUNDS_ARR(t, images) || images[t] == NULL) { return; } SDL_Rect trect; trect.x = xp; trect.y = yp; if (query_texture(images[t], NULL, NULL, &trect.w, &trect.h) != 0) { return; } if (cent) { trect.x = (int) ((SCREEN_WIDTH_PIXELS - trect.w) / 2); } set_texture_color_mod(images[t], ct.r, ct.g, ct.b); draw_texture(images[t], trect.x, trect.y); set_texture_color_mod(images[t], 255, 255, 255); } void Graphics::drawimage( int t, int xp, int yp, bool cent/*=false*/ ) { if (!INBOUNDS_ARR(t, images) || images[t] == NULL) { return; } SDL_Rect trect; trect.x = xp; trect.y = yp; if (query_texture(images[t], NULL, NULL, &trect.w, &trect.h) != 0) { return; } if (cent) { trect.x = (int) ((SCREEN_WIDTH_PIXELS - trect.w) / 2); } draw_texture(images[t], trect.x, trect.y); } void Graphics::drawpartimage(const int t, const int xp, const int yp, const int wp, const int hp) { if (!INBOUNDS_ARR(t, images) || images[t] == NULL) { return; } draw_texture_part(images[t], xp, yp, 0, 0, wp, hp, 1, 1); } void Graphics::draw_texture(SDL_Texture* image, const int x, const int y) { int w, h; if (query_texture(image, NULL, NULL, &w, &h) != 0) { return; } const SDL_Rect dstrect = {x, y, w, h}; copy_texture(image, NULL, &dstrect); } void Graphics::draw_texture_part(SDL_Texture* image, const int x, const int y, const int x2, const int y2, const int w, const int h, const int scalex, const int scaley) { const SDL_Rect srcrect = {x2, y2, w, h}; int flip = SDL_FLIP_NONE; if (scalex < 0) { flip |= SDL_FLIP_HORIZONTAL; } if (scaley < 0) { flip |= SDL_FLIP_VERTICAL; } const SDL_Rect dstrect = {x, y, w * SDL_abs(scalex), h * SDL_abs(scaley)}; copy_texture(image, &srcrect, &dstrect, 0, NULL, (SDL_RendererFlip) flip); } void Graphics::draw_grid_tile(SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height, const int scalex, const int scaley) { int tex_width; if (query_texture(texture, NULL, NULL, &tex_width, NULL) != 0) { return; } const int x2 = (t % (tex_width / width)) * width; const int y2 = (t / (tex_width / width)) * height; draw_texture_part(texture, x, y, x2, y2, width, height, scalex, scaley); } void Graphics::draw_grid_tile( SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height ) { draw_grid_tile(texture, t, x, y, width, height, 1, 1); } void Graphics::draw_grid_tile( SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height, const int r, const int g, const int b, const int a, const int scalex, const int scaley ) { set_texture_color_mod(texture, r, g, b); set_texture_alpha_mod(texture, a); draw_grid_tile(texture, t, x, y, width, height, scalex, scaley); set_texture_color_mod(texture, 255, 255, 255); set_texture_alpha_mod(texture, 255); } void Graphics::draw_grid_tile( SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height, const int r, const int g, const int b, const int a ) { draw_grid_tile(texture, t, x, y, width, height, r, g, b, a, 1, 1); } void Graphics::draw_grid_tile( SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height, const int r, const int g, const int b, const int scalex, const int scaley ) { draw_grid_tile(texture, t, x, y, width, height, r, g, b, 255, scalex, scaley); } void Graphics::draw_grid_tile( SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height, const int r, const int g, const int b ) { draw_grid_tile(texture, t, x, y, width, height, r, g, b, 255); } void Graphics::draw_grid_tile( SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height, const SDL_Color color, const int scalex, const int scaley ) { draw_grid_tile(texture, t, x, y, width, height, color.r, color.g, color.b, color.a, scalex, scaley); } void Graphics::draw_grid_tile( SDL_Texture* texture, const int t, const int x, const int y, const int width, const int height, const SDL_Color color ) { draw_grid_tile(texture, t, x, y, width, height, color, 1, 1); } void Graphics::draw_region_image(int t, int xp, int yp, int wp, int hp) { if (!INBOUNDS_ARR(t, customminimaps) || customminimaps[t] == NULL) { return; } draw_texture_part(customminimaps[t], xp, yp, 0, 0, wp, hp, 1, 1); } void Graphics::cutscenebars(void) { const int usethispos = lerp(oldcutscenebarspos, cutscenebarspos); if (showcutscenebars) { fill_rect(0, 0, usethispos, 16, 0, 0, 0); fill_rect(360 - usethispos, 224, usethispos, 16, 0, 0, 0); } else if (cutscenebarspos > 0) //disappearing { //draw fill_rect(0, 0, usethispos, 16, 0, 0, 0); fill_rect(360 - usethispos, 224, usethispos, 16, 0, 0, 0); } } void Graphics::cutscenebarstimer(void) { oldcutscenebarspos = cutscenebarspos; if (showcutscenebars) { cutscenebarspos += 25; cutscenebarspos = SDL_min(cutscenebarspos, 361); } else if (cutscenebarspos > 0) { //disappearing cutscenebarspos -= 25; cutscenebarspos = SDL_max(cutscenebarspos, 0); } } void Graphics::setbars(const int position) { cutscenebarspos = position; oldcutscenebarspos = position; } void Graphics::drawcrewman(int x, int y, int t, bool act, bool noshift /*=false*/) { if (!act) { if (noshift) { if (flipmode) { draw_sprite(x, y, 14, col_crewinactive); } else { draw_sprite(x, y, 12, col_crewinactive); } } else { if (flipmode) { draw_sprite(x - 8, y, 14, col_crewinactive); } else { draw_sprite(x - 8, y, 12, col_crewinactive); } } } else { if (flipmode) crewframe += 6; switch(t) { case 0: draw_sprite(x, y, crewframe, col_crewcyan); break; case 1: draw_sprite(x, y, crewframe, col_crewpurple); break; case 2: draw_sprite(x, y, crewframe, col_crewyellow); break; case 3: draw_sprite(x, y, crewframe, col_crewred); break; case 4: draw_sprite(x, y, crewframe, col_crewgreen); break; case 5: draw_sprite(x, y, crewframe, col_crewblue); break; } if (flipmode) crewframe -= 6; } } void Graphics::drawpixeltextbox( const int x, const int y, const int w, const int h, const int r, const int g, const int b ) { int k; fill_rect(x, y, w, h, r / 6, g / 6, b / 6); /* Horizontal tiles */ for (k = 0; k < w / 8 - 2; ++k) { drawcoloredtile(x + 8 + k * 8, y, 41, r, g, b); drawcoloredtile(x + 8 + k * 8, y + h - 8, 46, r, g, b); } if (w % 8 != 0) { /* Fill in horizontal gap */ drawcoloredtile(x + w - 16, y, 41, r, g, b); drawcoloredtile(x + w - 16, y + h - 8, 46, r, g, b); } /* Vertical tiles */ for (k = 0; k < h / 8 - 2; ++k) { drawcoloredtile(x, y + 8 + k * 8, 43, r, g, b); drawcoloredtile(x + w - 8, y + 8 + k * 8, 44, r, g, b); } if (h % 8 != 0) { /* Fill in vertical gap */ drawcoloredtile(x, y + h - 16, 43, r, g, b); drawcoloredtile(x + w - 8, y + h - 16, 44, r, g, b); } /* Corners */ 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::textboxactive(void) { //Remove all but the most recent textbox for (int i = 0; i < (int) textboxes.size(); i++) { if (m != i) textboxes[i].remove(); } } void Graphics::textboxremovefast(void) { //Remove all textboxes for (size_t i = 0; i < textboxes.size(); i++) { textboxes[i].removefast(); } } void Graphics::textboxremove(void) { //Remove all textboxes for (size_t i = 0; i < textboxes.size(); i++) { textboxes[i].remove(); } } void Graphics::textboxtimer(int t) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxtimer() out-of-bounds!"); return; } textboxes[m].timer = t; } void Graphics::addsprite(int x, int y, int tile, int col) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("addsprite() out-of-bounds!"); return; } textboxes[m].addsprite(x, y, tile, col); } void Graphics::setimage(TextboxImage image) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("setimage() out-of-bounds!"); return; } textboxes[m].setimage(image); } void Graphics::textboxoutline(bool enabled) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxoutline() out-of-bounds!"); return; } textboxes[m].force_outline = true; textboxes[m].outline = enabled; } void Graphics::addline( const std::string& t ) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("addline() out-of-bounds!"); return; } textboxes[m].addline(t); } void Graphics::setlarge(bool large) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("setlarge() out-of-bounds!"); return; } textboxes[m].large = large; } void Graphics::textboxapplyposition(void) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxapplyposition() out-of-bounds!"); return; } textboxes[m].applyposition(); } void Graphics::setlinegap(int customvalue) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("setlinegap() out-of-bounds!"); return; } textboxes[m].linegap = customvalue; textboxes[m].resize(); } int Graphics::getlinegap(void) { // Don't use linegaps in custom levels, for now anyway if (map.custommode) return 0; return 1; } void Graphics::textboxindex(const int index) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxindex() out-of-bounds!"); return; } textboxes[m].other_textbox_index = index; } void Graphics::createtextboxreal( const std::string& t, int xp, int yp, int r, int g, int b, bool flipme ) { m = textboxes.size(); if (m < 20) { textboxclass text(getlinegap()); text.lines.push_back(t); text.xp = xp; if (xp == -1) text.xp = 160 - ((font::len(PR_FONT_LEVEL, t.c_str()) / 2) + 8); text.yp = yp; text.initcol(r, g, b); text.flipme = flipme; text.resize(); textboxes.push_back(text); } } void Graphics::createtextbox( const std::string& t, int xp, int yp, SDL_Color color ) { createtextboxreal(t, xp, yp, color.r, color.g, color.b, false); } void Graphics::createtextbox( const std::string& t, int xp, int yp, int r, int g, int b ) { createtextboxreal(t, xp, yp, r, g, b, false); } void Graphics::createtextboxflipme( const std::string& t, int xp, int yp, SDL_Color color ) { createtextboxreal(t, xp, yp, color.r, color.g, color.b, true); } void Graphics::createtextboxflipme( const std::string& t, int xp, int yp, int r, int g, int b ) { createtextboxreal(t, xp, yp, r, g, b, true); } void Graphics::drawfade(void) { const int usethisamount = lerp(oldfadeamount, fadeamount); switch (fademode) { case FADE_FULLY_BLACK: case FADE_START_FADEIN: fill_rect(0, 0, 0); break; case FADE_FADING_OUT: for (size_t i = 0; i < SDL_arraysize(fadebars); i++) { fill_rect(fadebars[i], i * 16, usethisamount, 16, 0, 0, 0); } break; case FADE_FADING_IN: for (size_t i = 0; i < SDL_arraysize(fadebars); i++) { fill_rect(fadebars[i] - usethisamount, i * 16, 500, 16, 0, 0, 0); } break; case FADE_NONE: case FADE_START_FADEOUT: break; } } void Graphics::processfade(void) { oldfadeamount = fadeamount; switch (fademode) { case FADE_START_FADEOUT: for (size_t i = 0; i < SDL_arraysize(fadebars); i++) { fadebars[i] = -(int)(fRandom() * 12) * 8; } setfade(0); fademode = FADE_FADING_OUT; break; case FADE_FADING_OUT: fadeamount += 24; if (fadeamount > 416) { fademode = FADE_FULLY_BLACK; } break; case FADE_START_FADEIN: for (size_t i = 0; i < SDL_arraysize(fadebars); i++) { fadebars[i] = 320 + (int)(fRandom() * 12) * 8; } setfade(416); fademode = FADE_FADING_IN; break; case FADE_FADING_IN: fadeamount -= 24; if (fadeamount <= 0) { fademode = FADE_NONE; } break; case FADE_NONE: case FADE_FULLY_BLACK: break; } } void Graphics::setfade(const int amount) { fadeamount = amount; oldfadeamount = amount; } void Graphics::drawmenu(int cr, int cg, int cb, enum Menu::MenuName menu) { /* The MenuName is only used for some special cases, * like the levels list and the language screen. */ bool language_screen = menu == Menu::language && !loc::languagelist.empty(); unsigned int twocol_voptions; if (language_screen) { size_t n_options = game.menuoptions.size(); twocol_voptions = n_options - (n_options / 2); } for (size_t i = 0; i < game.menuoptions.size(); i++) { MenuOption& opt = game.menuoptions[i]; int fr, fg, fb; if (opt.active) { // Color it normally fr = cr; fg = cg; fb = cb; } else { // Color it gray fr = 128; fg = 128; fb = 128; } int x, y; if (language_screen) { int name_len = font::len(opt.print_flags, opt.text); x = (i < twocol_voptions ? 80 : 240) - name_len / 2; y = 36 + (i % twocol_voptions) * 12; } else { x = i * game.menuspacing + game.menuxoff; y = 140 + i * 12 + game.menuyoff; } if (menu == Menu::levellist) { size_t separator; if (cl.ListOfMetaData.size() > 8) { separator = 3; } else { separator = 1; } if (game.menuoptions.size() - i <= separator) { // We're on "next page", "previous page", or "return to menu". Draw them separated by a bit y += 8; } else { // Get out of the way of the level descriptions y += 4; } } if (menu == Menu::translator_options_cutscenetest) { size_t separator = 4; if (game.menuoptions.size() - i <= separator) { y += 4; } } char buffer[MENU_TEXT_BYTES]; if ((int) i == game.currentmenuoption && game.slidermode == SLIDER_NONE) { std::string opt_text; if (opt.active) { // Uppercase the text opt_text = loc::toupper(opt.text); } else { opt_text = loc::remove_toupper_escape_chars(opt.text); } vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select.c_str(), "label:str", opt_text.c_str()); // Account for brackets x -= (font::len(opt.print_flags, buffer) - font::len(opt.print_flags, opt_text.c_str())) / 2; } else { SDL_strlcpy(buffer, loc::remove_toupper_escape_chars(opt.text).c_str(), sizeof(buffer)); } font::print(opt.print_flags, x, y, buffer, fr, fg, fb); } } void Graphics::drawcoloredtile( const int x, const int y, const int t, const int r, const int g, const int b ) { draw_grid_tile(grphx.im_tiles_white, t, x, y, tiles_rect.w, tiles_rect.h, r, g, b); } bool Graphics::Hitest(SDL_Surface* surface1, SDL_Point p1, SDL_Surface* surface2, SDL_Point p2) { //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; SDL_Rect rect1 = {p1.x, p1.y, surface1->w, surface1->h}; SDL_Rect rect2 = {p2.x, p2.y, surface2->w, surface2->h}; bool intersection = help.intersects(rect1, rect2); if(intersection) { int r3_left = SDL_max(r1_left, r2_left); int r3_top = SDL_min(r1_top, r2_top); int r3_right = SDL_min(r1_right, r2_right); int r3_bottom= SDL_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++) { const SDL_Color pixel1 = ReadPixel(surface1, x - p1.x, y - p1.y); const SDL_Color pixel2 = ReadPixel(surface2, x - p2.x, y - p2.y); /* INTENTIONAL BUG! In previous versions, the game mistakenly * checked the red channel, not the alpha channel. * We preserve it here because some people abuse this. */ if (pixel1.r != 0 && pixel2.r != 0) { return true; } } } } return false; } void Graphics::drawgravityline(const int t, const int x, const int y, const int w, const int h) { if (!INBOUNDS_VEC(t, obj.entities)) { WHINE_ONCE("drawgravityline() out-of-bounds!"); return; } if (w <= 0 && h <= 0) { return; } set_color(obj.entities[t].realcol); draw_line(x, y, x + w, y + h); } void Graphics::drawtrophytext(void) { int brightness; if (obj.trophytext < 15) { const int usethismult = lerp(obj.oldtrophytext, obj.trophytext); brightness = (usethismult / 15.0) * 255; } else { brightness = 255; } /* These were originally all at the top of the screen, but might be too tight for localization. * It probably makes sense to make them all have a top text now, but for now this is probably fine. * Look at the Steam achievements, they have pretty logical titles that should probably be used. */ const char* top_text = NULL; const char* bottom_text = NULL; switch(obj.trophytype) { case 1: top_text = loc::gettext("SPACE STATION 1 MASTERED"); bottom_text = loc::gettext("Obtain a V Rank in this Time Trial"); break; case 2: top_text = loc::gettext("LABORATORY MASTERED"); bottom_text = loc::gettext("Obtain a V Rank in this Time Trial"); break; case 3: top_text = loc::gettext("THE TOWER MASTERED"); bottom_text = loc::gettext("Obtain a V Rank in this Time Trial"); break; case 4: top_text = loc::gettext("SPACE STATION 2 MASTERED"); bottom_text = loc::gettext("Obtain a V Rank in this Time Trial"); break; case 5: top_text = loc::gettext("WARP ZONE MASTERED"); bottom_text = loc::gettext("Obtain a V Rank in this Time Trial"); break; case 6: top_text = loc::gettext("FINAL LEVEL MASTERED"); bottom_text = loc::gettext("Obtain a V Rank in this Time Trial"); break; case 7: top_text = loc::gettext("GAME COMPLETE"); bottom_text = loc::gettext_case("Complete the game", 1); break; case 8: top_text = loc::gettext("FLIP MODE COMPLETE"); bottom_text = loc::gettext("Complete the game in flip mode"); break; case 9: bottom_text = loc::gettext("Win with less than 50 deaths"); break; case 10: bottom_text = loc::gettext("Win with less than 100 deaths"); break; case 11: bottom_text = loc::gettext("Win with less than 250 deaths"); break; case 12: bottom_text = loc::gettext("Win with less than 500 deaths"); break; case 13: bottom_text = loc::gettext("Last 5 seconds on the Super Gravitron"); break; case 14: bottom_text = loc::gettext("Last 10 seconds on the Super Gravitron"); break; case 15: bottom_text = loc::gettext("Last 15 seconds on the Super Gravitron"); break; case 16: bottom_text = loc::gettext("Last 20 seconds on the Super Gravitron"); break; case 17: bottom_text = loc::gettext("Last 30 seconds on the Super Gravitron"); break; case 18: bottom_text = loc::gettext("Last 1 minute on the Super Gravitron"); break; case 20: top_text = loc::gettext("MASTER OF THE UNIVERSE"); bottom_text = loc::gettext("Complete the game in no death mode"); break; } short lines; if (top_text != NULL) { font::string_wordwrap(0, top_text, 304, &lines); font::print_wrap(PR_CEN | PR_BRIGHTNESS(brightness) | PR_BOR, -1, 11 - (lines - 1) * 5, top_text, 196, 196, 255 - help.glow); } if (bottom_text != NULL) { font::string_wordwrap(0, bottom_text, 304, &lines); font::print_wrap(PR_CEN | PR_BRIGHTNESS(brightness) | PR_BOR, -1, 221 - (lines - 1) * 5, bottom_text, 196, 196, 255 - help.glow); } } void Graphics::drawentities(void) { const int yoff = map.towermode ? lerp(map.oldypos, map.ypos) : 0; if (!map.custommode) { for (int i = obj.entities.size() - 1; i >= 0; i--) { if (!obj.entities[i].ishumanoid()) { drawentity(i, yoff); } } for (int i = obj.entities.size() - 1; i >= 0; i--) { if (obj.entities[i].ishumanoid()) { drawentity(i, yoff); } } } else { for (int i = obj.entities.size() - 1; i >= 0; i--) { drawentity(i, yoff); } } } void Graphics::drawentity(const int i, const int yoff) { if (!INBOUNDS_VEC(i, obj.entities)) { WHINE_ONCE("drawentity() out-of-bounds!"); return; } if (obj.entities[i].invis) { return; } SDL_Point tpoint; SDL_Rect drawRect; bool custom_gray; // Special case for gray Warp Zone tileset! if (map.custommode) { const RoomProperty* const room = cl.getroomprop(game.roomx - 100, game.roomy - 100); custom_gray = room->tileset == 3 && room->tilecol == 6; } else { custom_gray = false; } SDL_Texture* sprites = flipmode ? grphx.im_flipsprites : grphx.im_sprites; SDL_Texture* tiles = (map.custommode && !map.finalmode) ? grphx.im_entcolours : grphx.im_tiles; SDL_Texture* tiles_tint = (map.custommode && !map.finalmode) ? grphx.im_entcolours_tint : grphx.im_tiles_tint; const int xp = lerp(obj.entities[i].lerpoldxp, obj.entities[i].xp); const int yp = lerp(obj.entities[i].lerpoldyp, obj.entities[i].yp); switch (obj.entities[i].size) { case 0: { // Sprites tpoint.x = xp; tpoint.y = yp - yoff; const SDL_Color ct = obj.entities[i].realcol; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, ct); // screenwrapping! SDL_Point wrappedPoint; bool wrapX = false; bool wrapY = false; wrappedPoint.x = tpoint.x; if (tpoint.x < 0) { wrapX = true; wrappedPoint.x += 320; } else if (tpoint.x > 288) { wrapX = true; wrappedPoint.x -= 320; } wrappedPoint.y = tpoint.y; if (tpoint.y < 8) { wrapY = true; wrappedPoint.y += 232; } else if (tpoint.y > 200) { wrapY = true; wrappedPoint.y -= 232; } const bool isInWrappingAreaOfTower = map.towermode && !map.minitowermode && map.ypos >= 500 && map.ypos <= 5000; if (wrapX && (map.warpx || isInWrappingAreaOfTower)) { drawRect = sprites_rect; drawRect.x += wrappedPoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, ct); } if (wrapY && map.warpy) { drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += wrappedPoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, ct); } if (wrapX && wrapY && map.warpx && map.warpy) { drawRect = sprites_rect; drawRect.x += wrappedPoint.x; drawRect.y += wrappedPoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, ct); } break; } case 1: // Tiles tpoint.x = xp; tpoint.y = yp - yoff; drawRect = tiles_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(grphx.im_tiles, obj.entities[i].drawframe, drawRect.x, drawRect.y, 8, 8); break; case 2: case 8: { // Special: Moving platform, 4 tiles or 8 tiles tpoint.x = xp; tpoint.y = yp - yoff; int thiswidth = 4; if (obj.entities[i].size == 8) { thiswidth = 8; } for (int ii = 0; ii < thiswidth; ii++) { drawRect = tiles_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; drawRect.x += 8 * ii; if (custom_gray) { draw_grid_tile(tiles_tint, obj.entities[i].drawframe, drawRect.x, drawRect.y, 8, 8); } else { draw_grid_tile(tiles, obj.entities[i].drawframe, drawRect.x, drawRect.y, 8, 8); } } break; } case 3: // Big chunky pixels! fill_rect(xp, yp - yoff, 4, 4, obj.entities[i].realcol); break; case 4: // Small pickups { const SDL_Color color = obj.entities[i].realcol; drawcoloredtile(xp, yp - yoff, obj.entities[i].tile, color.r, color.g, color.b); break; } case 5: // Horizontal Line { int oldw = obj.entities[i].w; if ((game.swngame == SWN_START_GRAVITRON_STEP_2 || kludgeswnlinewidth) && obj.getlineat(84 - 32) == i) { oldw -= 24; } drawgravityline(i, xp, yp - yoff, lerp(oldw, obj.entities[i].w) - 1, 0); break; } case 6: // Vertical Line drawgravityline(i, xp, yp - yoff, 0, obj.entities[i].h - 1); break; case 7: // Teleporter drawtele(xp, yp - yoff, obj.entities[i].drawframe, obj.entities[i].realcol); break; // case 8: // Special: Moving platform, 8 tiles // Note: This code is in the 4-tile code break; case 9: // Really Big Sprite! (2x2) { const SDL_Color ct = obj.entities[i].realcol; tpoint.x = xp; tpoint.y = yp - yoff; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, ct); tpoint.x = xp + 32; tpoint.y = yp - yoff; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe + 1, drawRect.x, drawRect.y, 32, 32, ct); tpoint.x = xp; tpoint.y = yp + 32 - yoff; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe + 12, drawRect.x, drawRect.y, 32, 32, ct); tpoint.x = xp + 32; tpoint.y = yp + 32 - yoff; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe + 13, drawRect.x, drawRect.y, 32, 32, ct); break; } case 10: // 2x1 Sprite { const SDL_Color ct = obj.entities[i].realcol; tpoint.x = xp; tpoint.y = yp - yoff; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, ct); tpoint.x = xp + 32; tpoint.y = yp - yoff; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe + 1, drawRect.x, drawRect.y, 32, 32, ct); break; } case 11: // The fucking elephant drawimagecol(IMAGE_ELEPHANT, xp, yp - yoff, obj.entities[i].realcol); break; case 12: // Regular sprites that don't wrap { tpoint.x = xp; tpoint.y = yp - yoff; const SDL_Color ct = obj.entities[i].realcol; drawRect = sprites_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(sprites, obj.entities[i].drawframe, drawRect.x, drawRect.y, 32, 32, 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) (-xp / 10); } else { tpoint.x = 5; } tpoint.y = tpoint.y + 4; drawRect = tiles_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(grphx.im_tiles_white, 1167, drawRect.x, drawRect.y, 8, 8, ct); } else if (obj.entities[i].xp > 340 && obj.entities[i].vx < 0) { if (obj.entities[i].xp > 420) { tpoint.x = 320 - (int) ((xp - 320) / 10); } else { tpoint.x = 310; } tpoint.y = tpoint.y+4; drawRect = tiles_rect; drawRect.x += tpoint.x; drawRect.y += tpoint.y; draw_grid_tile(grphx.im_tiles_white, 1166, drawRect.x, drawRect.y, 8, 8, ct); } break; } case 13: { // Special for epilogue: huge hero! draw_grid_tile(grphx.im_sprites, obj.entities[i].drawframe, xp, yp - yoff, sprites_rect.w, sprites_rect.h, obj.entities[i].realcol, 6, 6); break; } } } void Graphics::drawbackground( int t ) { switch(t) { case 1: // Starfield fill_rect(0, 0, 0); for (int i = 0; i < numstars; i++) { SDL_Rect star_rect = stars[i]; star_rect.x = lerp(star_rect.x + starsspeed[i], star_rect.x); if (starsspeed[i] <= 6) { fill_rect(&star_rect, getRGB(0x22,0x22,0x22)); } else { fill_rect(&star_rect, getRGB(0x55,0x55,0x55)); } } break; case 2: { SDL_Color bcol; SDL_Color bcol2; SDL_zero(bcol); SDL_zero(bcol2); // Lab switch (rcol) { // Akward ordering to match tileset case 0: bcol2 = getRGB(0, 16 * backboxmult, 16 * backboxmult); break; // Cyan case 1: bcol2 = getRGB(16 * backboxmult, 0, 0); break; // Red case 2: bcol2 = getRGB(16 * backboxmult, 0, 16 * backboxmult); break; // Purple case 3: bcol2 = getRGB(0, 0, 16 * backboxmult); break; // Blue case 4: bcol2 = getRGB(16 * backboxmult, 16 * backboxmult, 0); break; // Yellow case 5: bcol2 = getRGB(0, 16 * backboxmult, 0); break; // Green case 6: // crazy case switch (spcol) { case 0: bcol2 = getRGB(0, 16 * backboxmult, 16 * backboxmult); break; // Cyan case 1: bcol2 = getRGB(0, (spcoldel + 1) * backboxmult, 16 * backboxmult); break; // Cyan case 2: bcol2 = getRGB(0, 0, 16 * backboxmult); break; // Blue case 3: bcol2 = getRGB((16 - spcoldel) * backboxmult, 0, 16 * backboxmult); break; // Blue case 4: bcol2 = getRGB(16 * backboxmult, 0, 16 * backboxmult); break; // Purple case 5: bcol2 = getRGB(16 * backboxmult, 0, (spcoldel + 1) * backboxmult); break; // Purple case 6: bcol2 = getRGB(16 * backboxmult, 0, 0); break; // Red case 7: bcol2 = getRGB(16 * backboxmult, (16 - spcoldel) * backboxmult, 0); break; // Red case 8: bcol2 = getRGB(16 * backboxmult, 16 * backboxmult, 0); break; // Yellow case 9: bcol2 = getRGB((spcoldel + 1) * backboxmult, 16 * backboxmult, 0); break; // Yellow case 10: bcol2 = getRGB(0, 16 * backboxmult, 0); break; // Green case 11: bcol2 = getRGB(0, 16 * backboxmult, (16 - spcoldel) * backboxmult); break; // Green } break; } fill_rect(bcol2); for (int i = 0; i < numbackboxes; i++) { switch (rcol) { // Akward ordering to match tileset case 0: bcol = getRGB(16, 128 * backboxmult, 128 * backboxmult); break; // Cyan case 1: bcol = getRGB(128 * backboxmult, 16, 16); break; // Red case 2: bcol = getRGB(128 * backboxmult, 16, 128 * backboxmult); break; // Purple case 3: bcol = getRGB(16, 16, 128 * backboxmult); break; // Blue case 4: bcol = getRGB(128 * backboxmult, 128 * backboxmult, 16); break; // Yellow case 5: bcol = getRGB(16, 128 * backboxmult, 16); break; // Green case 6: // crazy case switch (spcol) { case 0: bcol = getRGB(16, 128 * backboxmult, 128 * backboxmult); break; // Cyan case 1: bcol = getRGB(16, ((spcoldel + 1) * 8) * backboxmult, 128 * backboxmult); break; // Cyan case 2: bcol = getRGB(16, 16, 128 * backboxmult); break; // Blue case 3: bcol = getRGB((128 - (spcoldel * 8)) * backboxmult, 16, 128 * backboxmult); break; // Blue case 4: bcol = getRGB(128 * backboxmult, 16, 128 * backboxmult); break; // Purple case 5: bcol = getRGB(128 * backboxmult, 16, ((spcoldel + 1) * 8) * backboxmult); break; // Purple case 6: bcol = getRGB(128 * backboxmult, 16, 16); break; // Red case 7: bcol = getRGB(128 * backboxmult, (128 - (spcoldel * 8)) * backboxmult, 16); break; // Red case 8: bcol = getRGB(128 * backboxmult, 128 * backboxmult, 16); break; // Yellow case 9: bcol = getRGB(((spcoldel + 1) * 8) * backboxmult, 128 * backboxmult, 16); break; // Yellow case 10: bcol = getRGB(16, 128 * backboxmult, 16); break; // Green case 11: bcol = getRGB(16, 128 * backboxmult, (128 - (spcoldel * 8)) * backboxmult); break; // Green } break; } SDL_Rect backboxrect = backboxes[i]; backboxrect.x = lerp(backboxes[i].x - backboxvx[i], backboxes[i].x); backboxrect.y = lerp(backboxes[i].y - backboxvy[i], backboxes[i].y); fill_rect(&backboxrect, bcol); backboxrect.x++; backboxrect.y++; backboxrect.w -= 2; backboxrect.h -= 2; fill_rect(&backboxrect, bcol2); } break; } case 3: //Warp zone (horizontal) { clear(); const int offset = (int) lerp(-3, 0); const SDL_Rect srcRect = {8 + offset, 0, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS}; copy_texture(backgroundTexture, &srcRect, NULL); break; } case 4: //Warp zone (vertical) { clear(); const int offset = (int) lerp(-3, 0); const SDL_Rect srcRect = {0, 8 + offset, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS}; copy_texture(backgroundTexture, &srcRect, NULL); break; } case 5: { // Warp zone, central SDL_Color warpbcol; SDL_Color warpfcol; switch(rcol) { // Akward ordering to match tileset case 0: warpbcol = getRGB(0x0A, 0x10, 0x0E); warpfcol = getRGB(0x10, 0x22, 0x21); break; // Cyan case 1: warpbcol = getRGB(0x11, 0x09, 0x0B); warpfcol = getRGB(0x22, 0x10, 0x11); break; // Red case 2: warpbcol = getRGB(0x0F, 0x0A, 0x10); warpfcol = getRGB(0x22,0x10,0x22); break; // Purple case 3: warpbcol = getRGB(0x0A, 0x0B, 0x10); warpfcol = getRGB(0x10, 0x10, 0x22); break; // Blue case 4: warpbcol = getRGB(0x10, 0x0D, 0x0A); warpfcol = getRGB(0x22, 0x1E, 0x10); break; // Yellow case 5: warpbcol = getRGB(0x0D, 0x10, 0x0A); warpfcol = getRGB(0x14, 0x22, 0x10); break; // Green case 6: warpbcol = getRGB(0x0A, 0x0A, 0x0A); warpfcol = getRGB(0x12, 0x12, 0x12); break; // Gray default: warpbcol = getRGB(0xFF, 0xFF, 0xFF); warpfcol = getRGB(0xFF, 0xFF, 0xFF); } for (int i = 10; i >= 0; i--) { const int temp = (i * 16) + backoffset; const SDL_Rect warprect = {160 - temp, 120 - temp, temp * 2, temp * 2}; if (i % 2 == warpskip) { fill_rect(&warprect, warpbcol); } else { fill_rect(&warprect, warpfcol); } } break; } case 6: // Final Starfield fill_rect(0, 0, 0); for (int i = 0; i < numstars; i++) { SDL_Rect star_rect = stars[i]; star_rect.y = lerp(star_rect.y + starsspeed[i], star_rect.y); if (starsspeed[i] <= 8) { fill_rect(&star_rect, getRGB(0x22, 0x22, 0x22)); } else { fill_rect(&star_rect, getRGB(0x55, 0x55, 0x55)); } } 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: fill_rect(0, 0, 0); break; } } void Graphics::updatebackground(int t) { switch (t) { case 1: // Starfield for (int i = 0; i < numstars; i++) { stars[i].x -= starsspeed[i]; if (stars[i].x < -10) { stars[i].x += 340; stars[i].y = (int) (fRandom() * 240); starsspeed[i] = 4 + (int) (fRandom() * 4); } } break; case 2: // Lab if (rcol == 6) { // crazy caze spcoldel--; if (spcoldel <= 0) { spcoldel = 15; spcol++; if (spcol >= 12) spcol = 0; } } for (int i = 0; i < numbackboxes; i++) { 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) { const int temp = 680 + (rcol * 3); backoffset += 3; if (backoffset >= 16) backoffset -= 16; SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer); set_render_target(backgroundTexture); if (backgrounddrawn) { scroll_texture(backgroundTexture, tempScrollingTexture, -3, 0); for (int j = 0; j < 15; j++) { for (int i = 0; i < 2; i++) { drawtile2(317 - backoffset + (i * 16), (j * 16), temp + 40); // 20*16 = 320 drawtile2(317 - backoffset + (i * 16) + 8, (j * 16), temp + 41); drawtile2(317 - backoffset + (i * 16), (j * 16) + 8, temp + 80); drawtile2(317 - backoffset + (i * 16) + 8, (j * 16) + 8, temp + 81); } } } else { // draw the whole thing for the first time! backoffset = 0; clear(); for (int j = 0; j < 15; j++) { for (int i = 0; i < 21; i++) { drawtile2((i * 16) - backoffset - 3, (j * 16), temp + 40); drawtile2((i * 16) - backoffset + 8 - 3, (j * 16), temp + 41); drawtile2((i * 16) - backoffset - 3, (j * 16) + 8, temp + 80); drawtile2((i * 16) - backoffset + 8 - 3, (j * 16) + 8, temp + 81); } } backgrounddrawn = true; } set_render_target(target); break; } case 4: // Warp zone (vertical) { const int temp = 760 + (rcol * 3); backoffset += 3; if (backoffset >= 16) backoffset -= 16; SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer); set_render_target(backgroundTexture); if (backgrounddrawn) { scroll_texture(backgroundTexture, tempScrollingTexture, 0, -3); for (int j = 0; j < 2; j++) { for (int i = 0; i < 21; i++) { drawtile2((i * 16), 237 - backoffset + (j * 16), temp + 40); // 14*17=240 - 3 drawtile2((i * 16) + 8, 237 - backoffset + (j * 16), temp + 41); drawtile2((i * 16), 237 - backoffset + (j * 16) + 8, temp + 80); drawtile2((i * 16) + 8, 237 - backoffset + (j * 16) + 8, temp + 81); } } } else { // draw the whole thing for the first time! backoffset = 0; clear(); for (int j = 0; j < 16; j++) { for (int i = 0; i < 21; i++) { drawtile2((i * 16), (j * 16) - backoffset - 3, temp + 40); drawtile2((i * 16) + 8, (j * 16) - backoffset - 3, temp + 41); drawtile2((i * 16), (j * 16) - backoffset + 8 - 3, temp + 80); drawtile2((i * 16) + 8, (j * 16) - backoffset + 8 - 3, temp + 81); } } backgrounddrawn = true; } set_render_target(target); break; } case 5: // Warp zone, central backoffset++; if (backoffset >= 16) { backoffset -= 16; warpskip = (warpskip + 1) % 2; } break; case 6: // Final Starfield for (int i = 0; i < numstars; i++) { 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; } } void Graphics::drawmap(void) { if (!foregrounddrawn) { SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer); set_render_target(foregroundTexture); set_blendmode(foregroundTexture, SDL_BLENDMODE_BLEND); clear(0, 0, 0, 0); for (int y = 0; y < 30; y++) { for (int x = 0; x < 40; x++) { int tile; int tileset; if (game.gamestate == EDITORMODE) { tile = cl.gettile(ed.levx, ed.levy, x, y); tileset = (cl.getroomprop(ed.levx, ed.levy)->tileset == 0) ? 0 : 1; } else { tile = map.contents[TILE_IDX(x, y)]; tileset = map.tileset; } if (tile > 0) { if (tileset == 0) { drawtile(x * 8, y * 8, tile); } else if (tileset == 1) { drawtile2(x * 8, y * 8, tile); } else if (tileset == 2) { drawtile3(x * 8, y * 8, tile, map.rcol); } } } } set_render_target(target); foregrounddrawn = true; } copy_texture(foregroundTexture, NULL, NULL); } void Graphics::drawfinalmap(void) { if (!foregrounddrawn) { SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer); set_render_target(foregroundTexture); set_blendmode(foregroundTexture, SDL_BLENDMODE_BLEND); clear(0, 0, 0, 0); if (map.tileset == 0) { for (int j = 0; j < 30; j++) { for (int i = 0; i < 40; i++) { if ((map.contents[TILE_IDX(i, j)]) > 0) drawtile(i * 8, j * 8, map.finalat(i, j)); } } } else if (map.tileset == 1) { for (int j = 0; j < 30; j++) { for (int i = 0; i < 40; i++) { if ((map.contents[TILE_IDX(i, j)]) > 0) drawtile2(i * 8, j * 8, map.finalat(i, j)); } } } set_render_target(target); foregrounddrawn = true; } copy_texture(foregroundTexture, NULL, NULL); } void Graphics::drawtowermap(void) { const int yoff = lerp(map.oldypos, map.ypos); for (int j = 0; j < 31; j++) { for (int i = 0; i < 40; i++) { const int temp = map.tower.at(i, j, yoff); if (temp > 0) { drawtile3(i * 8, (j * 8) - (yoff % 8), temp, towerbg.colstate); } } } } void Graphics::drawtowerspikes(void) { int spikeleveltop = lerp(map.oldspikeleveltop, map.spikeleveltop); int spikelevelbottom = lerp(map.oldspikelevelbottom, map.spikelevelbottom); for (int i = 0; i < 40; i++) { drawtile3(i * 8, -8+spikeleveltop, 9, towerbg.colstate); drawtile3(i * 8, 230-spikelevelbottom, 8, towerbg.colstate, 8 - spikelevelbottom); } } void Graphics::drawtowerbackground(const TowerBG& bg_obj) { clear(); const int offset = (int) lerp(-bg_obj.bscroll, 0); const SDL_Rect srcRect = {0, 8 + offset, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS}; copy_texture(bg_obj.texture, &srcRect, NULL); } void Graphics::updatetowerbackground(TowerBG& bg_obj) { if (bg_obj.bypos < 0) bg_obj.bypos += 120 * 8; SDL_Texture* target = SDL_GetRenderTarget(gameScreen.m_renderer); set_render_target(bg_obj.texture); if (bg_obj.tdrawback) { int off = bg_obj.scrolldir == 0 ? 0 : bg_obj.bscroll; //Draw the whole thing; needed for every colour cycle! clear(); for (int j = -1; j < 32; j++) { for (int i = 0; i < 40; i++) { const int temp = map.tower.backat(i, j, bg_obj.bypos); drawtile3(i * 8, (j * 8) - (bg_obj.bypos % 8) - off, temp, bg_obj.colstate); } } bg_obj.tdrawback = false; } else { // just update the bottom scroll_texture(bg_obj.texture, tempScrollingTexture, 0, -bg_obj.bscroll); if (bg_obj.scrolldir == 0) { for (int i = 0; i < 40; i++) { int temp = map.tower.backat(i, -1, bg_obj.bypos); drawtile3(i * 8, -1 * 8 - (bg_obj.bypos % 8), temp, bg_obj.colstate); temp = map.tower.backat(i, 0, bg_obj.bypos); drawtile3(i * 8, -(bg_obj.bypos % 8), temp, bg_obj.colstate); } } else { for (int i = 0; i < 40; i++) { int temp = map.tower.backat(i, 29, bg_obj.bypos); drawtile3(i * 8, 29 * 8 - (bg_obj.bypos % 8) - bg_obj.bscroll, temp, bg_obj.colstate); temp = map.tower.backat(i, 30, bg_obj.bypos); drawtile3(i * 8, 30 * 8 - (bg_obj.bypos % 8) - bg_obj.bscroll, temp, bg_obj.colstate); temp = map.tower.backat(i, 31, bg_obj.bypos); drawtile3(i * 8, 31 * 8 - (bg_obj.bypos % 8) - bg_obj.bscroll, temp, bg_obj.colstate); temp = map.tower.backat(i, 32, bg_obj.bypos); drawtile3(i * 8, 32 * 8 - (bg_obj.bypos % 8) - bg_obj.bscroll, temp, bg_obj.colstate); } } } set_render_target(target); } #define GETCOL_RANDOM (game.noflashingmode ? 0.5 : fRandom()) SDL_Color Graphics::getcol( int t ) { // Setup predefinied colours as per our zany palette switch(t) { // Player Normal case 0: return getRGB(160 - help.glow/2 - (int) (GETCOL_RANDOM * 20), 200 - help.glow/2, 220 - help.glow); // Player Hurt case 1: return getRGB(196 - (GETCOL_RANDOM * 64), 10, 10); // Enemies and stuff case 2: return getRGB(225 - (help.glow / 2), 75, 30); case 3: // Trinket if (!trinketcolset) { trinketr = 200 - (GETCOL_RANDOM * 64); trinketg = 200 - (GETCOL_RANDOM * 128); trinketb = 164 + (GETCOL_RANDOM * 60); trinketcolset = true; } return getRGB(trinketr, trinketg, trinketb); case 4: // Inactive savepoint { const int temp = (help.glow / 2) + (int) (GETCOL_RANDOM * 8); return getRGB(80 + temp, 80 + temp, 80 + temp); } case 5: // Active savepoint return getRGB(164 + (GETCOL_RANDOM * 64), 164 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64)); case 6: // Enemy : Red return getRGB(250 - help.glow / 2, 60 - help.glow / 2, 60 - help.glow / 2); case 7: // Enemy : Green return getRGB(100 - help.glow / 2 - (int) (GETCOL_RANDOM * 30), 250 - help.glow / 2, 100 - help.glow / 2 - (int) (GETCOL_RANDOM * 30)); case 8: // Enemy : Purple return getRGB(250 - help.glow / 2, 20, 128 - help.glow / 2 + (int) (GETCOL_RANDOM * 30)); case 9: // Enemy : Yellow return getRGB(250 - help.glow / 2, 250 - help.glow / 2, 20); case 10: // Warp point (white) return getRGB(255 - (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64)); case 11: // Enemy : Cyan return getRGB(20, 250 - help.glow / 2, 250 - help.glow / 2); case 12: // Enemy : Blue return getRGB(90 - help.glow / 2, 90 - help.glow / 2, 250 - help.glow / 2); // Crew Members // green case 13: return getRGB(120 - help.glow / 4 - (int) (GETCOL_RANDOM * 20), 220 - help.glow / 4, 120 - help.glow / 4); // Yellow case 14: return getRGB(220 - help.glow / 4 - (int) (GETCOL_RANDOM * 20), 210 - help.glow / 4, 120 - help.glow / 4); // pink case 15: return getRGB(255 - help.glow / 8, 70 - help.glow / 4, 70 - help.glow / 4); // Blue case 16: return getRGB(75, 75, 255 - help.glow / 4 - (int) (GETCOL_RANDOM * 20)); case 17: // Enemy : Orange return getRGB(250 - help.glow / 2, 130 - help.glow / 2, 20); case 18: // Enemy : Gray return getRGB(130 - help.glow / 2, 130 - help.glow / 2, 130 - help.glow / 2); case 19: // Enemy : Dark gray return getRGB(60 - help.glow / 8, 60 - help.glow / 8, 60 - help.glow / 8); // Purple case 20: return getRGB(220 - help.glow / 4 - (int) (GETCOL_RANDOM * 20), 120 - help.glow/4, 210 - help.glow/4); case 21: // Enemy : Light Gray return getRGB(180 - help.glow/2, 180 - help.glow/2, 180 - help.glow/2); case 22: // Enemy : Indicator Gray return getRGB(230 - help.glow/2, 230 - help.glow/2, 230 - help.glow/2); case 23: // Enemy : Indicator Gray return getRGB(255 - help.glow / 2 - (int) (GETCOL_RANDOM * 40), 255 - help.glow/2 - (int) (GETCOL_RANDOM * 40), 255 - help.glow/2 - (int) (GETCOL_RANDOM * 40)); case 24: // Gravity line (Inactive) return getRGB(96, 96, 96); case 25: // Gravity line (Active) if (game.noflashingmode) { return getRGB(200 - 20, 200 - 20, 200 - 20); } switch (linestate) { default: case 0: return getRGB(200 - 20, 200 - 20, 200 - 20); case 1: return getRGB(245 - 30, 245 - 30, 225 - 30); case 2: return getRGB(225 - 30, 245 - 30, 245 - 30); case 3: return getRGB(200 - 20, 200 - 20, 164 - 10); case 4: return getRGB(196 - 20, 255 - 30, 224 - 20); case 5: return getRGB(196 - 20, 235 - 30, 205 - 20); case 6: return getRGB(164 - 10, 164 - 10, 164 - 10); case 7: return getRGB(205 - 20, 245 - 30, 225 - 30); case 8: return getRGB(225 - 30, 255 - 30, 205 - 20); case 9: return getRGB(245 - 30, 245 - 30, 245 - 30); } case 26: // Coin if (game.noflashingmode) { return getRGB(234, 234, 10); } return getRGB(250 - (int) (GETCOL_RANDOM * 32), 250 - (int) (GETCOL_RANDOM * 32), 10); case 27: // Particle flashy red return getRGB((GETCOL_RANDOM * 64), 10, 10); // Trophies // cyan case 30: return RGBf(160, 200, 220); // Purple case 31: return RGBf(220, 120, 210); // Yellow case 32: return RGBf(220, 210, 120); // red case 33: return RGBf(255, 70, 70); // green case 34: return RGBf(120, 220, 120); // Blue case 35: return RGBf(75, 75, 255); // Gold case 36: return getRGB(180, 120, 20); case 37: // Trinket if (!trinketcolset) { trinketr = 200 - (GETCOL_RANDOM * 64); trinketg = 200 - (GETCOL_RANDOM * 128); trinketb = 164 + (GETCOL_RANDOM * 60); trinketcolset = true; } return RGBf(trinketr, trinketg, trinketb); // Silver case 38: return RGBf(196, 196, 196); // Bronze case 39: return RGBf(128, 64, 10); // Awesome case 40: // Teleporter in action! { if (game.noflashingmode) { return getRGB(196, 196, 223); } const int temp = GETCOL_RANDOM * 150; if (temp < 33) { return RGBf(255 - (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64)); } else if (temp < 66) { return RGBf(64 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64)); } else if (temp < 100) { return RGBf(64 + (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64)); } else { return RGBf(164 + (GETCOL_RANDOM * 64), 164 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64)); } } case 100: // Inactive Teleporter { const int temp = (help.glow / 2) + (GETCOL_RANDOM * 8); return getRGB(42 + temp, 42 + temp, 42 + temp); } case 101: // Active Teleporter return getRGB(164 + (GETCOL_RANDOM * 64), 164 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64)); case 102: // Teleporter in action! { if (game.noflashingmode) { return getRGB(196, 196, 223); } const int temp = GETCOL_RANDOM * 150; if (temp < 33) { return getRGB(255 - (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64)); } else if (temp < 66) { return getRGB(64 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64)); } else if (temp < 100) { return getRGB(64 + (GETCOL_RANDOM * 64), 64 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64)); } else { return getRGB(164 + (GETCOL_RANDOM * 64), 164 + (GETCOL_RANDOM * 64), 255 - (GETCOL_RANDOM * 64)); } } } return getRGB(255, 255, 255); } #undef GETCOL_RANDOM void Graphics::menuoffrender(void) { if (copy_texture(gameplayTexture, NULL, NULL) != 0) { return; } const int offset = (int) lerp(oldmenuoffset, menuoffset); const SDL_Rect offsetRect = {0, offset, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS}; if (copy_texture(menuTexture, NULL, &offsetRect) != 0) { return; } } void Graphics::textboxabsolutepos(int x, int y) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxabsolutepos() out-of-bounds!"); return; } textboxes[m].position_absolute = true; textboxes[m].xp = x; textboxes[m].yp = y; } void Graphics::textboxcenterx(void) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxcenterx() out-of-bounds!"); return; } textboxes[m].should_centerx = true; } int Graphics::textboxwidth(void) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxwidth() out-of-bounds!"); return 0; } return textboxes[m].w; } void Graphics::textboxmoveto(int xo) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxmoveto() out-of-bounds!"); return; } textboxes[m].xp = xo; } void Graphics::textboxcentery(void) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxcentery() out-of-bounds!"); return; } textboxes[m].should_centery = true; } void Graphics::textboxpad(size_t left_pad, size_t right_pad) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxpad() out-of-bounds!"); return; } textboxes[m].spacing.pad_left = left_pad; textboxes[m].spacing.pad_right = right_pad; } void Graphics::textboxpadtowidth(size_t new_w) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxpadtowidth() out-of-bounds!"); return; } textboxes[m].spacing.padtowidth = new_w; } void Graphics::textboxcentertext(void) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxcentertext() out-of-bounds!"); return; } textboxes[m].spacing.centertext = true; } void Graphics::textboxprintflags(const uint32_t flags) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxprintflags() out-of-bounds!"); return; } textboxes[m].print_flags = flags; textboxes[m].resize(); } void Graphics::textboxbuttons(void) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxbuttons() out-of-bounds!"); return; } textboxes[m].fill_buttons = true; } void Graphics::textboxcrewmateposition(const TextboxCrewmatePosition* crewmate_position) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxcrewmateposition() out-of-bounds!"); return; } textboxes[m].crewmate_position = *crewmate_position; } void Graphics::textboxoriginalcontext(const TextboxOriginalContext* original_context) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxoriginalcontext() out-of-bounds!"); return; } textboxes[m].original = *original_context; } void Graphics::textboxoriginalcontextauto(void) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxoriginalcontextauto() out-of-bounds!"); return; } TextboxOriginalContext context = TextboxOriginalContext(); context.text_case = 1; context.lines = textboxes[m].lines; if (script.running) { context.script_name = script.scriptname; } context.x = textboxes[m].xp; context.y = textboxes[m].yp; textboxes[m].original = context; } void Graphics::textboxcase(char text_case) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxcase() out-of-bounds!"); return; } textboxes[m].original.text_case = text_case; } void Graphics::textboxtranslate(const TextboxTranslate translate, const TextboxFunction function) { if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxtranslate() out-of-bounds!"); return; } if (translate == TEXTTRANSLATE_FUNCTION && function == NULL) { SDL_assert(0 && "function is NULL!"); return; } if (translate != TEXTTRANSLATE_FUNCTION && function != NULL) { SDL_assert(0 && "function provided when it won't be used!"); return; } textboxes[m].translate = translate; textboxes[m].function = function; textboxes[m].updatetext(); } static void commsrelay_textbox(textboxclass* THIS) { THIS->lines.clear(); if (THIS->original.lines.empty()) { return; } THIS->lines.push_back(loc::gettext(THIS->original.lines[0].c_str())); THIS->wrap(11); THIS->resize(); THIS->xp = 224 - THIS->w; THIS->yp = 32 - THIS->h/2; } void Graphics::textboxcommsrelay(const char* text) { // Special treatment for the gamestate textboxes in Comms Relay if (!INBOUNDS_VEC(m, textboxes)) { vlog_error("textboxcommsrelay() out-of-bounds!"); return; } textboxprintflags(PR_FONT_INTERFACE); textboxes[m].original.lines.push_back(text); textboxtranslate(TEXTTRANSLATE_FUNCTION, commsrelay_textbox); } int Graphics::crewcolour(const int t) { // Given crewmate t, return colour switch (t) { case 0: return EntityColour_CREW_CYAN; case 1: return EntityColour_CREW_PURPLE; case 2: return EntityColour_CREW_YELLOW; case 3: return EntityColour_CREW_RED; case 4: return EntityColour_CREW_GREEN; case 5: return EntityColour_CREW_BLUE; default: return EntityColour_CREW_CYAN; } } void Graphics::flashlight(void) { set_blendmode(SDL_BLENDMODE_NONE); fill_rect(NULL, 0xBB, 0xBB, 0xBB, 0xBB); } void Graphics::screenshake(void) { if (gameScreen.badSignalEffect) { ApplyFilter(&tempFilterSrc, &tempFilterDest); } set_render_target(tempShakeTexture); set_blendmode(SDL_BLENDMODE_NONE); clear(); const SDL_Rect shake = {screenshake_x, screenshake_y, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS}; copy_texture(gameTexture, NULL, &shake); draw_screenshot_border(); set_render_target(gameTexture); clear(); // Clear the gameplay texture so blackout() is actually black after a screenshake if (game.gamestate == GAMEMODE && game.blackout) { set_render_target(gameplayTexture); clear(); } set_render_target(NULL); set_blendmode(SDL_BLENDMODE_NONE); draw_window_background(); SDL_Rect rect; get_stretch_info(&rect); copy_texture(tempShakeTexture, NULL, &rect, 0, NULL, flipmode ? SDL_FLIP_VERTICAL : SDL_FLIP_NONE); } void Graphics::updatescreenshake(void) { screenshake_x = static_cast((fRandom() * 7) - 4); screenshake_y = static_cast((fRandom() * 7) - 4); } void Graphics::draw_window_background(void) { clear(); } void Graphics::get_stretch_info(SDL_Rect* rect) { int width; int height; gameScreen.GetScreenSize(&width, &height); switch (gameScreen.scalingMode) { case SCALING_INTEGER: { int scale = SDL_min(width / SCREEN_WIDTH_PIXELS, height / SCREEN_HEIGHT_PIXELS); rect->x = (width - SCREEN_WIDTH_PIXELS * scale) / 2; rect->y = (height - SCREEN_HEIGHT_PIXELS * scale) / 2; rect->w = SCREEN_WIDTH_PIXELS * scale; rect->h = SCREEN_HEIGHT_PIXELS * scale; break; } case SCALING_LETTERBOX: if (width * SCREEN_HEIGHT_PIXELS > height * SCREEN_WIDTH_PIXELS) { rect->x = (width - height * SCREEN_WIDTH_PIXELS / SCREEN_HEIGHT_PIXELS) / 2; rect->y = 0; rect->w = height * SCREEN_WIDTH_PIXELS / SCREEN_HEIGHT_PIXELS; rect->h = height; } else { rect->x = 0; rect->y = (height - width * SCREEN_HEIGHT_PIXELS / SCREEN_WIDTH_PIXELS) / 2; rect->w = width; rect->h = width * SCREEN_HEIGHT_PIXELS / SCREEN_WIDTH_PIXELS; } break; case SCALING_STRETCH: /* Could pass NULL to copy_texture instead, but this feels better */ rect->x = 0; rect->y = 0; rect->w = width; rect->h = height; break; default: SDL_assert(0 && "Invalid scaling mode!"); rect->x = 0; rect->y = 0; rect->w = width; rect->h = height; } // In case anything accidentally set the width/height to 0, we'll clamp it to avoid crashing from a division by 0 rect->w = SDL_max(1, rect->w); rect->h = SDL_max(1, rect->h); } void Graphics::render(void) { ime_render(); draw_screenshot_border(); if (gameScreen.badSignalEffect) { ApplyFilter(&tempFilterSrc, &tempFilterDest); } set_render_target(NULL); set_blendmode(SDL_BLENDMODE_NONE); draw_window_background(); SDL_Rect stretch_info; get_stretch_info(&stretch_info); ime_set_rect(&stretch_info); copy_texture(gameTexture, NULL, &stretch_info, 0, NULL, flipmode ? SDL_FLIP_VERTICAL : SDL_FLIP_NONE); } void Graphics::renderwithscreeneffects(void) { if (game.flashlight > 0 && !game.noflashingmode) { flashlight(); } if (game.screenshake > 0 && !game.noflashingmode) { screenshake(); } else { render(); } } void Graphics::renderfixedpre(void) { if (game.screenshake > 0) { updatescreenshake(); } if (gameScreen.badSignalEffect) { UpdateFilter(); } } void Graphics::renderfixedpost(void) { /* Screen effects timers */ if (game.flashlight > 0) { --game.flashlight; } if (game.screenshake > 0) { --game.screenshake; } game.old_screenshot_border_timer = game.screenshot_border_timer; if (game.screenshot_border_timer > 0) { game.screenshot_border_timer -= 15; } } void Graphics::draw_screenshot_border(void) { const int border_alpha = lerp(game.old_screenshot_border_timer, game.screenshot_border_timer); if (border_alpha <= 100) { return; } int width = 0; int height = 0; int result = query_texture(gameTexture, NULL, NULL, &width, &height); if (result != 0) { return; } const SDL_Rect rect_inner = {1, 1, width - 2, height - 2}; if (game.screenshot_saved_success) { set_color(196, 196, 20, border_alpha); } else { set_color(196, 20, 20, border_alpha); } set_blendmode(SDL_BLENDMODE_BLEND); draw_rect(NULL); draw_rect(&rect_inner); set_blendmode(SDL_BLENDMODE_NONE); } void Graphics::drawtele(int x, int y, int t, const SDL_Color color) { SDL_Rect telerect; setRect(telerect, x, y, tele_rect.w, tele_rect.h); draw_grid_tile(grphx.im_teleporter, 0, x, y, tele_rect.w, tele_rect.h, 16, 16, 16); if (t > 9) t = 8; if (t < 1) t = 1; draw_grid_tile(grphx.im_teleporter, t, x, y, tele_rect.w, tele_rect.h, color); } SDL_Color Graphics::getRGBA(const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a) { const SDL_Color color = {r, g, b, a}; return color; } SDL_Color Graphics::getRGB(const Uint8 r, const Uint8 g, const Uint8 b) { const SDL_Color color = {r, g, b, 255}; return color; } SDL_Color Graphics::RGBf(int r, int g, int b) { r = (r + 128) / 3; g = (g + 128) / 3; b = (b + 128) / 3; const SDL_Color color = {(Uint8) r, (Uint8) g, (Uint8) b, 255}; return color; } bool Graphics::onscreen(int t) { return (t >= -40 && t <= 280); } bool Graphics::checktexturesize( const char* filename, SDL_Texture* texture, const int tilewidth, const int tileheight ) { int texturewidth; int textureheight; if (query_texture(texture, NULL, NULL, &texturewidth, &textureheight) != 0) { /* Just give it the benefit of the doubt. */ vlog_warn( "Assuming the dimensions of %s are exact multiples of %i by %i!", filename, tilewidth, tileheight ); return true; } const bool valid = texturewidth % tilewidth == 0 && textureheight % tileheight == 0; if (!valid) { FILESYSTEM_setLevelDirError( loc::gettext("{filename} dimensions not exact multiples of {width} by {height}!"), "filename:str, width:int, height:int", filename, tilewidth, tileheight ); return false; } return true; } static void make_array( SDL_Surface** tilesheet, std::vector& vector, const int tile_square ) { int j; for (j = 0; j < (*tilesheet)->h / tile_square; j++) { int i; for (i = 0; i < (*tilesheet)->w / tile_square; i++) { SDL_Surface* temp = GetSubSurface( *tilesheet, i * tile_square, j * tile_square, tile_square, tile_square ); vector.push_back(temp); } } } bool Graphics::reloadresources(void) { grphx.destroy(); grphx.init(); MAYBE_FAIL(checktexturesize("tiles.png", grphx.im_tiles, 8, 8)); MAYBE_FAIL(checktexturesize("tiles2.png", grphx.im_tiles2, 8, 8)); MAYBE_FAIL(checktexturesize("tiles3.png", grphx.im_tiles3, 8, 8)); MAYBE_FAIL(checktexturesize("entcolours.png", grphx.im_entcolours, 8, 8)); MAYBE_FAIL(checktexturesize("sprites.png", grphx.im_sprites, 32, 32)); MAYBE_FAIL(checktexturesize("flipsprites.png", grphx.im_flipsprites, 32, 32)); MAYBE_FAIL(checktexturesize("teleporter.png", grphx.im_teleporter, 96, 96)); destroy(); make_array(&grphx.im_sprites_surf, sprites_surf, 32); make_array(&grphx.im_flipsprites_surf, flipsprites_surf, 32); images[IMAGE_LEVELCOMPLETE] = grphx.im_image0; images[IMAGE_MINIMAP] = grphx.im_image1; images[IMAGE_COVERED] = grphx.im_image2; images[IMAGE_ELEPHANT] = grphx.im_image3; images[IMAGE_GAMECOMPLETE] = grphx.im_image4; images[IMAGE_FLIPLEVELCOMPLETE] = grphx.im_image5; images[IMAGE_FLIPGAMECOMPLETE] = grphx.im_image6; images[IMAGE_SITE] = grphx.im_image7; images[IMAGE_SITE2] = grphx.im_image8; images[IMAGE_SITE3] = grphx.im_image9; images[IMAGE_ENDING] = grphx.im_image10; images[IMAGE_SITE4] = grphx.im_image11; images[IMAGE_CUSTOMMINIMAP] = grphx.im_image12; gameScreen.LoadIcon(); music.destroy(); music.init(); tiles1_mounted = FILESYSTEM_isAssetMounted("graphics/tiles.png"); tiles2_mounted = FILESYSTEM_isAssetMounted("graphics/tiles2.png"); minimap_mounted = FILESYSTEM_isAssetMounted("graphics/minimap.png"); gamecomplete_mounted = FILESYSTEM_isAssetMounted("graphics/gamecomplete.png"); levelcomplete_mounted = FILESYSTEM_isAssetMounted("graphics/levelcomplete.png"); flipgamecomplete_mounted = FILESYSTEM_isAssetMounted("graphics/flipgamecomplete.png"); fliplevelcomplete_mounted = FILESYSTEM_isAssetMounted("graphics/fliplevelcomplete.png"); return true; fail: return false; } SDL_Color Graphics::crewcolourreal(int t) { switch (t) { case 0: return col_crewcyan; case 1: return col_crewpurple; case 2: return col_crewyellow; case 3: return col_crewred; case 4: return col_crewgreen; case 5: return col_crewblue; } return col_crewcyan; } void Graphics::render_roomname(uint32_t font_flag, const char* roomname, int r, int g, int b) { int font_height = font::height(font_flag); if (font_height <= 8) { footerrect.h = font_height + 2; } else { footerrect.h = font_height + 1; } footerrect.y = 240 - footerrect.h; set_blendmode(SDL_BLENDMODE_BLEND); fill_rect(&footerrect, getRGBA(0, 0, 0, translucentroomname ? 127 : 255)); font::print(font_flag | PR_CEN | PR_BOR | PR_CJK_LOW, -1, footerrect.y+1, roomname, r, g, b); set_blendmode(SDL_BLENDMODE_NONE); } void Graphics::print_roomtext(int x, const int y, const char* text, const bool rtl) { uint32_t flags = PR_FONT_LEVEL | PR_CJK_LOW; if (rtl) { flags |= PR_RIGHT; x += 8; // the size of a tile, not font width! } font::print(flags, x, y, text, 196, 196, 255 - help.glow); } ================================================ FILE: desktop_version/src/Graphics.h ================================================ #ifndef GRAPHICS_H #define GRAPHICS_H #include #include #include #include "Game.h" #include "GraphicsResources.h" #include "Textbox.h" #include "TowerBG.h" enum FadeBars { FADE_NONE, FADE_FULLY_BLACK, FADE_START_FADEOUT, FADE_FADING_OUT, FADE_START_FADEIN, FADE_FADING_IN }; enum ImageNames { IMAGE_LEVELCOMPLETE, IMAGE_MINIMAP, IMAGE_COVERED, IMAGE_ELEPHANT, IMAGE_GAMECOMPLETE, IMAGE_FLIPLEVELCOMPLETE, IMAGE_FLIPGAMECOMPLETE, IMAGE_SITE, IMAGE_SITE2, IMAGE_SITE3, IMAGE_ENDING, IMAGE_SITE4, IMAGE_CUSTOMMINIMAP, NUM_IMAGES }; #define FADEMODE_IS_FADING(mode) ((mode) != FADE_NONE && (mode) != FADE_FULLY_BLACK) enum EntityColour { EntityColour_CREW_CYAN = 0, EntityColour_DEAD = 1, EntityColour_ENEMY_DARK_ORANGE = 2, EntityColour_TRINKET = 3, EntityColour_INACTIVE_ENTITY = 4, EntityColour_ACTIVE_ENTITY = 5, EntityColour_ENEMY_RED = 6, EntityColour_ENEMY_GREEN = 7, EntityColour_ENEMY_PINK = 8, EntityColour_ENEMY_YELLOW = 9, EntityColour_WARP_TOKEN = 10, EntityColour_ENEMY_CYAN = 11, EntityColour_ENEMY_BLUE = 12, EntityColour_CREW_GREEN = 13, EntityColour_CREW_YELLOW = 14, EntityColour_CREW_RED = 15, EntityColour_CREW_BLUE = 16, EntityColour_ENEMY_ORANGE = 17, EntityColour_ENEMY_GRAY = 18, EntityColour_CREW_GRAY = 19, // Despite the comment in the color code saying this is for enemies, it's used as a fallback for crew colors. EntityColour_CREW_PURPLE = 20, EntityColour_ENEMY_GRAVITRON = 21, EntityColour_ENEMY_LIGHT_GRAY = 22, EntityColour_GRAVITRON_INDICATOR = 23, EntityColour_GRAVITY_LINE_TOUCHED = 24, EntityColour_GRAVITY_LINE_ACTIVE = 25, EntityColour_COIN = 26, EntityColour_PARTICLE_RED = 27, EntityColour_TROPHY_FINAL_LEVEL = 30, EntityColour_TROPHY_SPACE_STATION_1 = 31, EntityColour_TROPHY_SPACE_STATION_2 = 32, EntityColour_TROPHY_TOWER = 33, EntityColour_TROPHY_WARP_ZONE = 34, EntityColour_TROPHY_LABORATORY = 35, EntityColour_TROPHY_GOLD = 36, EntityColour_TROPHY_GAME_COMPLETE = 37, EntityColour_TROPHY_SILVER = 38, EntityColour_TROPHY_BRONZE = 39, EntityColour_TROPHY_FLASHY = 40, EntityColour_TELEPORTER_INACTIVE = 100, EntityColour_TELEPORTER_ACTIVE = 101, EntityColour_TELEPORTER_FLASHING = 102 }; class Graphics { public: void init(void); void destroy(void); void create_buffers(void); void destroy_buffers(void); GraphicsResources grphx; void drawgravityline(int t, int x, int y, int w, int h); void drawcoloredtile(int x, int y, int t, int r, int g, int b); void drawmenu(int cr, int cg, int cb, enum Menu::MenuName menu); void processfade(void); void setfade(const int amount); void drawfade(void); void setlinegap(int); int getlinegap(void); void createtextboxreal( const std::string& t, int xp, int yp, int r, int g, int b, bool flipme ); void createtextbox( const std::string& t, int xp, int yp, SDL_Color color ); void createtextbox( const std::string& t, int xp, int yp, int r, int g, int b ); void createtextboxflipme( const std::string& t, int xp, int yp, SDL_Color color ); void createtextboxflipme( const std::string& t, int xp, int yp, int r, int g, int b ); void textboxabsolutepos(int x, int y); void textboxcenterx(void); int textboxwidth(void); void textboxmoveto(int xo); void textboxcentery(void); void textboxpad(size_t left_pad, size_t right_pad); void textboxpadtowidth(size_t new_w); void textboxcentertext(void); void textboxprintflags(uint32_t flags); void textboxbuttons(void); void textboxcrewmateposition(const TextboxCrewmatePosition* crewmate_position); void textboxoriginalcontext(const TextboxOriginalContext* original_context); void textboxoriginalcontextauto(void); void textboxcase(char text_case); void textboxtranslate(TextboxTranslate translate, TextboxFunction function); void textboxcommsrelay(const char* text); void textboxapplyposition(void); void addline(const std::string& t); void setlarge(bool large); void textboxtimer(int t); void addsprite(int x, int y, int tile, int col); void setimage(TextboxImage image); void textboxoutline(bool enabled); void textboxindex(int index); void textboxremove(void); void textboxremovefast(void); void textboxactive(void); void drawpixeltextbox(int x, int y, int w, int h, int r, int g, int b); void drawcrewman(int x, int y, int t, bool act, bool noshift =false); int crewcolour(const int t); void cutscenebars(void); void cutscenebarstimer(void); void setbars(const int position); 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, SDL_Color ct, bool cent= false); void draw_texture(SDL_Texture* image, int x, int y); void draw_texture_part(SDL_Texture* image, int x, int y, int x2, int y2, int w, int h, int scalex, int scaley); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height, int scalex, int scaley); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height, int r, int g, int b, int a, int scalex, int scaley); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height, int r, int g, int b, int a); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height, int r, int g, int b, int scalex, int scaley); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height, int r, int g, int b); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height, SDL_Color color, int scalex, int scaley); void draw_grid_tile(SDL_Texture* texture, int t, int x, int y, int width, int height, SDL_Color color); void draw_region_image(int t, int xp, int yp, int wp, int hp); void updatetextboxes(void); const char* textbox_line(char* buffer, size_t buffer_len, size_t textbox_i, size_t line_i); void drawgui(void); void draw_sprite(int x, int y, int t, int r, int g, int b); void draw_sprite(int x, int y, int t, SDL_Color color); void draw_flipsprite(int x, int y, int t, SDL_Color color); void scroll_texture(SDL_Texture* texture, SDL_Texture* temp, int x, int y); void printcrewname(int x, int y, int t); void printcrewnamedark(int x, int y, int t); void printcrewnamestatus(int x, int y, int t, bool rescued); void print_level_creator( uint32_t print_flags, int y, const std::string& creator, uint8_t r, uint8_t g, uint8_t b ); int set_render_target(SDL_Texture* texture); int set_texture_color_mod(SDL_Texture* texture, Uint8 r, Uint8 g, Uint8 b); int set_texture_alpha_mod(SDL_Texture* texture, Uint8 alpha); int query_texture(SDL_Texture* texture, Uint32* format, int* access, int* w, int* h); int set_blendmode(SDL_BlendMode blendmode); int set_blendmode(SDL_Texture* texture, SDL_BlendMode blendmode); int clear(int r, int g, int b, int a); int clear(void); bool substitute(SDL_Texture** texture); void post_substitute(SDL_Texture* subst); int copy_texture(SDL_Texture* texture, const SDL_Rect* src, const SDL_Rect* dest); int copy_texture(SDL_Texture* texture, const SDL_Rect* src, const SDL_Rect* dest, double angle, const SDL_Point* center, SDL_RendererFlip flip); int set_color(Uint8 r, Uint8 g, Uint8 b, Uint8 a); int set_color(Uint8 r, Uint8 g, Uint8 b); int set_color(SDL_Color color); int fill_rect(const SDL_Rect* rect); int fill_rect(const SDL_Rect* rect, int r, int g, int b, int a); int fill_rect(int x, int y, int w, int h, int r, int g, int b, int a); int fill_rect(int x, int y, int w, int h, int r, int g, int b); int fill_rect(const SDL_Rect* rect, int r, int g, int b); int fill_rect(int r, int g, int b); int fill_rect(const SDL_Rect* rect, SDL_Color color); int fill_rect(int x, int y, int w, int h, SDL_Color color); int fill_rect(SDL_Color color); int draw_rect(const SDL_Rect* rect); int draw_rect(const SDL_Rect* rect, int r, int g, int b, int a); int draw_rect(int x, int y, int w, int h, int r, int g, int b, int a); int draw_rect(int x, int y, int w, int h, int r, int g, int b); int draw_rect(const SDL_Rect* rect, int r, int g, int b); int draw_rect(const SDL_Rect* rect, SDL_Color color); int draw_rect(int x, int y, int w, int h, SDL_Color color); int draw_line(int x, int y, int x2, int y2); int draw_points(const SDL_Point* points, int count); int draw_points(const SDL_Point* points, int count, int r, int g, int b); void map_tab(int opt, const char* text, bool selected = false); void map_option(int opt, int num_opts, const std::string& text, bool selected = false); void drawspritesetcol(int x, int y, int t, int c); void flashlight(void); void screenshake(void); void updatescreenshake(void); int screenshake_x; int screenshake_y; void draw_window_background(void); void get_stretch_info(SDL_Rect* rect); void render(void); void renderwithscreeneffects(void); void renderfixedpre(void); void renderfixedpost(void); void draw_screenshot_border(void); bool Hitest(SDL_Surface* surface1, SDL_Point p1, SDL_Surface* surface2, SDL_Point p2); void drawentities(void); void drawentity(const int i, const int yoff); void drawtrophytext(void); void drawtele(int x, int y, int t, SDL_Color c); SDL_Color getRGBA(Uint8 r, Uint8 g, Uint8 b, Uint8 a); SDL_Color getRGB(Uint8 r, Uint8 g, Uint8 b); SDL_Color RGBf(int r, int g, int b); void drawbackground(int t); void updatebackground(int t); bool shouldrecoloroneway(const int tilenum, const bool mounted); void drawtile3(int x, int y, int t, int off, int height_subtract = 0); void drawtile2(int x, int y, int t); void drawtile(int x, int y, int t); void drawmap(void); void drawtowermap(void); void drawtowerspikes(void); bool onscreen(int t); bool reloadresources(void); bool checktexturesize( const char* filename, SDL_Texture* texture, int tilewidth, int tileheight ); bool tiles1_mounted; bool tiles2_mounted; bool minimap_mounted; bool gamecomplete_mounted; bool levelcomplete_mounted; bool flipgamecomplete_mounted; bool fliplevelcomplete_mounted; void menuoffrender(void); void drawtowerbackground(const TowerBG& bg_obj); void updatetowerbackground(TowerBG& bg_obj); SDL_Color getcol(int t); void drawfinalmap(void); int rcol; int m; std::vector sprites_surf; std::vector flipsprites_surf; SDL_Texture* images[NUM_IMAGES]; SDL_Texture* customminimaps[401]; bool flipmode; bool setflipmode; bool notextoutline; SDL_Texture* gameTexture; SDL_Texture* tempShakeTexture; SDL_Texture* gameplayTexture; SDL_Texture* menuTexture; SDL_Texture* ghostTexture; SDL_Texture* backgroundTexture; SDL_Texture* foregroundTexture; SDL_Texture* tempScrollingTexture; SDL_Surface* tempScreenshot; SDL_Surface* tempScreenshot2x; TowerBG towerbg; TowerBG titlebg; SDL_Rect tiles_rect; SDL_Rect sprites_rect; SDL_Rect tele_rect; SDL_Rect footerrect; int linestate, linedelay; int backoffset; bool backgrounddrawn, foregrounddrawn; int menuoffset; int oldmenuoffset; bool resumegamemode; int crewframe; int crewframedelay; enum FadeBars fademode; int fadeamount; int oldfadeamount; int fadebars[15]; enum FadeBars ingame_fademode; bool trinketcolset; int trinketr, trinketg, trinketb; std::vector textboxes; bool showcutscenebars; int cutscenebarspos; int oldcutscenebarspos; static const int numstars = 50; SDL_Rect stars[numstars]; int starsspeed[numstars]; static const int numbackboxes = 18; int spcol, spcoldel; SDL_Rect backboxes[numbackboxes]; int backboxvx[numbackboxes]; int backboxvy[numbackboxes]; float backboxmult; int warpskip; bool translucentroomname; #ifndef GAME_DEFINITION float inline lerp(const float v0, const float v1) { if (game.physics_frozen()) { return v1; } return v0 + alpha * (v1 - v0); } #endif float alpha; SDL_Color col_crewred; SDL_Color col_crewyellow; SDL_Color col_crewgreen; SDL_Color col_crewcyan; SDL_Color col_crewblue; SDL_Color col_crewpurple; //actually pink SDL_Color col_crewinactive; SDL_Color col_clock; SDL_Color col_trinket; int col_tr; int col_tg; int col_tb; void updatetitlecolours(void); bool kludgeswnlinewidth; SDL_Color crewcolourreal(int t); void render_roomname(uint32_t font_flag, const char* roomname, int r, int g, int b); void print_roomtext(int x, int y, const char* text, bool rtl); }; #ifndef GRAPHICS_DEFINITION extern Graphics graphics; #endif #endif /* GRAPHICS_H */ ================================================ FILE: desktop_version/src/GraphicsResources.cpp ================================================ #include "GraphicsResources.h" #include #include #include "Alloc.h" #include "FileSystemUtils.h" #include "Graphics.h" #include "GraphicsUtil.h" #include "Localization.h" #include "Vlogging.h" #include "Screen.h" #include "XMLUtils.h" // Used to load PNG data extern "C" { extern unsigned lodepng_decode32( unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize ); extern unsigned lodepng_encode24( unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h ); extern const char* lodepng_error_text(unsigned code); } static SDL_Surface* LoadImageRaw(const char* filename, unsigned char** data) { *data = NULL; // Temporary storage for the image that's loaded SDL_Surface* loadedImage = NULL; unsigned int width, height; unsigned int error; unsigned char* fileIn; size_t length; FILESYSTEM_loadAssetToMemory(filename, &fileIn, &length); if (fileIn == NULL) { SDL_assert(0 && "Image file missing!"); return NULL; } error = lodepng_decode32(data, &width, &height, fileIn, length); VVV_free(fileIn); if (error != 0) { vlog_error("Could not load %s: %s", filename, lodepng_error_text(error)); return NULL; } loadedImage = SDL_CreateRGBSurfaceWithFormatFrom( *data, width, height, 32, width * 4, #if SDL_BYTEORDER == SDL_BIG_ENDIAN SDL_PIXELFORMAT_RGBA8888 #else SDL_PIXELFORMAT_ABGR8888 #endif ); return loadedImage; } static SDL_Surface* LoadSurfaceFromRaw(SDL_Surface* loadedImage) { SDL_Surface* optimizedImage = SDL_ConvertSurfaceFormat( loadedImage, SDL_PIXELFORMAT_ARGB8888, 0 ); SDL_SetSurfaceBlendMode(optimizedImage, SDL_BLENDMODE_BLEND); return optimizedImage; } SDL_Surface* LoadImageSurface(const char* filename) { unsigned char* data; SDL_Surface* loadedImage = LoadImageRaw(filename, &data); SDL_Surface* optimizedImage = LoadSurfaceFromRaw(loadedImage); if (loadedImage != NULL) { VVV_freefunc(SDL_FreeSurface, loadedImage); } VVV_free(data); if (optimizedImage == NULL) { vlog_error("Image not found: %s", filename); SDL_assert(0 && "Image not found! See stderr."); } return optimizedImage; } static SDL_Texture* LoadTextureFromRaw(const char* filename, SDL_Surface* loadedImage, const TextureLoadType loadtype) { if (loadedImage == NULL) { return NULL; } // Modify the surface with the load type. // This could be done in LoadImageRaw, however currently, surfaces are only used for // pixel perfect collision (which will be changed later) and the window icon. switch (loadtype) { case TEX_WHITE: SDL_LockSurface(loadedImage); for (int y = 0; y < loadedImage->h; y++) { for (int x = 0; x < loadedImage->w; x++) { SDL_Color color = ReadPixel(loadedImage, x, y); color.r = 255; color.g = 255; color.b = 255; DrawPixel(loadedImage, x, y, color); } } SDL_UnlockSurface(loadedImage); break; case TEX_GRAYSCALE: SDL_LockSurface(loadedImage); for (int y = 0; y < loadedImage->h; y++) { for (int x = 0; x < loadedImage->w; x++) { SDL_Color color = ReadPixel(loadedImage, x, y); // Magic numbers used for grayscaling (eyes perceive certain colors brighter than others) Uint8 r = color.r * 0.299; Uint8 g = color.g * 0.587; Uint8 b = color.b * 0.114; const double gray = SDL_floor(r + g + b + 0.5); color.r = gray; color.g = gray; color.b = gray; DrawPixel(loadedImage, x, y, color); } } SDL_UnlockSurface(loadedImage); break; default: break; } //Create texture from surface pixels SDL_Texture* texture = SDL_CreateTextureFromSurface(gameScreen.m_renderer, loadedImage); if (texture == NULL) { vlog_error("Failed creating texture: %s. SDL error: %s\n", filename, SDL_GetError()); } return texture; } SDL_Texture* LoadImage(const char *filename, const TextureLoadType loadtype) { unsigned char* data; SDL_Surface* loadedImage = LoadImageRaw(filename, &data); SDL_Texture* texture = LoadTextureFromRaw(filename, loadedImage, loadtype); if (loadedImage != NULL) { VVV_freefunc(SDL_FreeSurface, loadedImage); } VVV_free(data); if (texture == NULL) { vlog_error("Image not found: %s", filename); SDL_assert(0 && "Image not found! See stderr."); } return texture; } static SDL_Texture* LoadImage(const char* filename) { return LoadImage(filename, TEX_COLOR); } /* Any unneeded variants can be NULL */ static void LoadVariants(const char* filename, SDL_Texture** colored, SDL_Texture** white, SDL_Texture** grayscale) { unsigned char* data; SDL_Surface* loadedImage = LoadImageRaw(filename, &data); if (colored != NULL) { *colored = LoadTextureFromRaw(filename, loadedImage, TEX_COLOR); if (*colored == NULL) { vlog_error("Image not found: %s", filename); SDL_assert(0 && "Image not found! See stderr."); } } if (grayscale != NULL) { *grayscale = LoadTextureFromRaw(filename, loadedImage, TEX_GRAYSCALE); if (*grayscale == NULL) { vlog_error("Image not found: %s", filename); SDL_assert(0 && "Image not found! See stderr."); } } if (white != NULL) { *white = LoadTextureFromRaw(filename, loadedImage, TEX_WHITE); if (*white == NULL) { vlog_error("Image not found: %s", filename); SDL_assert(0 && "Image not found! See stderr."); } } if (loadedImage != NULL) { VVV_freefunc(SDL_FreeSurface, loadedImage); } VVV_free(data); } /* The pointers `texture` and `surface` cannot be NULL */ static void LoadSprites(const char* filename, SDL_Texture** texture, SDL_Surface** surface) { unsigned char* data; SDL_Surface* loadedImage = LoadImageRaw(filename, &data); *surface = LoadSurfaceFromRaw(loadedImage); if (*surface == NULL) { vlog_error("Image not found: %s", filename); SDL_assert(0 && "Image not found! See stderr."); } *texture = LoadTextureFromRaw(filename, loadedImage, TEX_WHITE); if (*texture == NULL) { vlog_error("Image not found: %s", filename); SDL_assert(0 && "Image not found! See stderr."); } if (loadedImage != NULL) { VVV_freefunc(SDL_FreeSurface, loadedImage); } VVV_free(data); } static void LoadSpritesTranslation( const char* filename, tinyxml2::XMLDocument* mask, SDL_Surface* surface_english, SDL_Texture** texture ) { /* Create a sprites texture for display in another language. * surface_english is used as a base. Parts of the translation (filename) * will replace parts of the base, as instructed in the mask XML. */ if (surface_english == NULL) { vlog_error("LoadSpritesTranslation: English surface is NULL!"); return; } // Make a copy of the English sprites, for working with SDL_Surface* working = GetSubSurface( surface_english, 0, 0, surface_english->w, surface_english->h ); if (working == NULL) { return; } SDL_Surface* translated; { unsigned char* data; SDL_Surface* loaded_image = LoadImageRaw(filename, &data); translated = LoadSurfaceFromRaw(loaded_image); VVV_freefunc(SDL_FreeSurface, loaded_image); VVV_free(data); } SDL_SetSurfaceBlendMode(translated, SDL_BLENDMODE_NONE); tinyxml2::XMLHandle hMask(mask); tinyxml2::XMLElement* pElem; int sprite_w = 1, sprite_h = 1; if ((pElem = mask->FirstChildElement()) != NULL) { sprite_w = pElem->IntAttribute("sprite_w", 1); sprite_h = pElem->IntAttribute("sprite_h", 1); } FOR_EACH_XML_ELEMENT(hMask, pElem) { EXPECT_ELEM(pElem, "sprite"); int x = pElem->IntAttribute("x", 0); int y = pElem->IntAttribute("y", 0); SDL_Rect src; src.x = x * sprite_w; src.y = y * sprite_h; src.w = pElem->IntAttribute("w", 1) * sprite_w; src.h = pElem->IntAttribute("h", 1) * sprite_h; SDL_Rect dst; dst.x = pElem->IntAttribute("dx", x) * sprite_w; dst.y = pElem->IntAttribute("dy", y) * sprite_h; SDL_BlitSurface(translated, &src, working, &dst); } *texture = LoadTextureFromRaw(filename, working, TEX_WHITE); VVV_freefunc(SDL_FreeSurface, translated); VVV_freefunc(SDL_FreeSurface, working); } void GraphicsResources::init_translations(void) { VVV_freefunc(SDL_DestroyTexture, im_sprites_translated); VVV_freefunc(SDL_DestroyTexture, im_flipsprites_translated); if (loc::english_sprites) { return; } const char* langcode = loc::lang.c_str(); const char* path_template = "lang/%s/graphics/%s"; char path_xml[256]; char path_sprites[256]; char path_flipsprites[256]; SDL_snprintf(path_xml, sizeof(path_xml), path_template, langcode, "spritesmask.xml"); SDL_snprintf(path_sprites, sizeof(path_sprites), path_template, langcode, "sprites.png"); SDL_snprintf(path_flipsprites, sizeof(path_flipsprites), path_template, langcode, "flipsprites.png"); /* We don't want to apply main-game translations to level-specific (custom) sprites. * Either sprites and translations are BOTH main-game, or BOTH level-specific. * Our pivots are the XML (it _has_ to exist for translated sprites to work) and * graphics/sprites.png (what sense does it make to have only flipsprites). */ if (FILESYSTEM_isAssetMounted(path_xml) != FILESYSTEM_isAssetMounted("graphics/sprites.png")) { return; } tinyxml2::XMLDocument doc_mask; if (!FILESYSTEM_loadAssetTiXml2Document(path_xml, doc_mask)) { // Only try to load the images if the XML document exists return; } if (FILESYSTEM_areAssetsInSameRealDir(path_xml, path_sprites)) { LoadSpritesTranslation( path_sprites, &doc_mask, im_sprites_surf, &im_sprites_translated ); } if (FILESYSTEM_areAssetsInSameRealDir(path_xml, path_flipsprites)) { LoadSpritesTranslation( path_flipsprites, &doc_mask, im_flipsprites_surf, &im_flipsprites_translated ); } } void GraphicsResources::init(void) { LoadVariants("graphics/tiles.png", &im_tiles, &im_tiles_white, &im_tiles_tint); LoadVariants("graphics/tiles2.png", &im_tiles2, NULL, &im_tiles2_tint); LoadVariants("graphics/entcolours.png", &im_entcolours, NULL, &im_entcolours_tint); LoadSprites("graphics/sprites.png", &im_sprites, &im_sprites_surf); LoadSprites("graphics/flipsprites.png", &im_flipsprites, &im_flipsprites_surf); im_tiles3 = LoadImage("graphics/tiles3.png"); im_teleporter = LoadImage("graphics/teleporter.png", TEX_WHITE); im_image0 = LoadImage("graphics/levelcomplete.png"); im_image1 = LoadImage("graphics/minimap.png"); im_image2 = LoadImage("graphics/covered.png"); im_image3 = LoadImage("graphics/elephant.png", TEX_WHITE); im_image4 = LoadImage("graphics/gamecomplete.png"); im_image5 = LoadImage("graphics/fliplevelcomplete.png"); im_image6 = LoadImage("graphics/flipgamecomplete.png"); im_image7 = LoadImage("graphics/site.png", TEX_WHITE); im_image8 = LoadImage("graphics/site2.png", TEX_WHITE); im_image9 = LoadImage("graphics/site3.png", TEX_WHITE); im_image10 = LoadImage("graphics/ending.png"); im_image11 = LoadImage("graphics/site4.png", TEX_WHITE); im_sprites_translated = NULL; im_flipsprites_translated = NULL; init_translations(); im_image12 = SDL_CreateTexture(gameScreen.m_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, 240, 180); if (im_image12 == NULL) { vlog_error("Failed to create minimap texture: %s", SDL_GetError()); SDL_assert(0 && "Failed to create minimap texture! See stderr."); return; } SDL_zeroa(graphics.customminimaps); EnumHandle handle = {}; const char* item; char full_item[64]; while ((item = FILESYSTEM_enumerateAssets("graphics", &handle)) != NULL) { if (SDL_strncmp(item, "region", 6) != 0) { continue; } char* end; int i = SDL_strtol(&item[6], &end, 10); // make sure the region id is actually in bounds! if (i < 1 || i > 400) { continue; } if (item == end || SDL_strcmp(end, ".png") != 0) { continue; } SDL_snprintf(full_item, sizeof(full_item), "graphics/%s", item); graphics.customminimaps[i] = LoadImage(full_item); } FILESYSTEM_freeEnumerate(&handle); } void GraphicsResources::destroy(void) { #define CLEAR(img) VVV_freefunc(SDL_DestroyTexture, img) CLEAR(im_tiles); CLEAR(im_tiles_white); CLEAR(im_tiles_tint); CLEAR(im_tiles2); CLEAR(im_tiles2_tint); CLEAR(im_tiles3); CLEAR(im_entcolours); CLEAR(im_entcolours_tint); CLEAR(im_sprites); CLEAR(im_flipsprites); CLEAR(im_teleporter); CLEAR(im_image0); CLEAR(im_image1); CLEAR(im_image2); CLEAR(im_image3); CLEAR(im_image4); CLEAR(im_image5); CLEAR(im_image6); CLEAR(im_image7); CLEAR(im_image8); CLEAR(im_image9); CLEAR(im_image10); CLEAR(im_image11); CLEAR(im_image12); CLEAR(im_sprites_translated); CLEAR(im_flipsprites_translated); for (size_t i = 0; i < SDL_arraysize(graphics.customminimaps); i++) { CLEAR(graphics.customminimaps[i]); } #undef CLEAR VVV_freefunc(SDL_FreeSurface, im_sprites_surf); VVV_freefunc(SDL_FreeSurface, im_flipsprites_surf); } bool SaveImage(const SDL_Surface* surface, const char* filename) { unsigned char* out; size_t outsize; unsigned int error; bool success; error = lodepng_encode24( &out, &outsize, (const unsigned char*) surface->pixels, surface->w, surface->h ); if (error != 0) { vlog_error("Could not save image: %s", lodepng_error_text(error)); return false; } success = FILESYSTEM_saveFile(filename, out, outsize); SDL_free(out); if (!success) { vlog_error("Could not save image"); } return success; } bool SaveScreenshot(void) { static time_t last_time = 0; static int subsecond_counter = 0; bool success = TakeScreenshot(&graphics.tempScreenshot); if (!success) { vlog_error("Could not take screenshot"); return false; } const time_t now = time(NULL); const tm* date = localtime(&now); if (now != last_time) { last_time = now; subsecond_counter = 0; } subsecond_counter++; char timestamp[32]; strftime(timestamp, sizeof(timestamp), "%Y-%m-%d_%H-%M-%S", date); char name[32]; if (subsecond_counter > 1) { SDL_snprintf(name, sizeof(name), "%s_%i", timestamp, subsecond_counter); } else { SDL_strlcpy(name, timestamp, sizeof(name)); } char filename[64]; SDL_snprintf(filename, sizeof(filename), "screenshots/1x/%s_1x.png", name); success = SaveImage(graphics.tempScreenshot, filename); if (!success) { return false; } success = UpscaleScreenshot2x(graphics.tempScreenshot, &graphics.tempScreenshot2x); if (!success) { vlog_error("Could not upscale screenshot to 2x"); return false; } SDL_snprintf(filename, sizeof(filename), "screenshots/2x/%s_2x.png", name); success = SaveImage(graphics.tempScreenshot2x, filename); if (!success) { return false; } vlog_info("Saved screenshot %s", name); return true; } ================================================ FILE: desktop_version/src/GraphicsResources.h ================================================ #ifndef GRAPHICSRESOURCES_H #define GRAPHICSRESOURCES_H #include enum TextureLoadType { TEX_COLOR, TEX_WHITE, TEX_GRAYSCALE }; class GraphicsResources { public: void init(void); void destroy(void); void init_translations(void); SDL_Surface* im_sprites_surf; SDL_Surface* im_flipsprites_surf; SDL_Texture* im_tiles; SDL_Texture* im_tiles_white; SDL_Texture* im_tiles_tint; SDL_Texture* im_tiles2; SDL_Texture* im_tiles2_tint; SDL_Texture* im_tiles3; SDL_Texture* im_entcolours; SDL_Texture* im_entcolours_tint; SDL_Texture* im_sprites; SDL_Texture* im_flipsprites; SDL_Texture* im_teleporter; SDL_Texture* im_image0; SDL_Texture* im_image1; SDL_Texture* im_image2; SDL_Texture* im_image3; SDL_Texture* im_image4; SDL_Texture* im_image5; SDL_Texture* im_image6; SDL_Texture* im_image7; SDL_Texture* im_image8; SDL_Texture* im_image9; SDL_Texture* im_image10; SDL_Texture* im_image11; SDL_Texture* im_image12; SDL_Texture* im_sprites_translated; SDL_Texture* im_flipsprites_translated; }; SDL_Surface* LoadImageSurface(const char* filename); SDL_Texture* LoadImage(const char *filename, TextureLoadType loadtype); bool SaveImage(const SDL_Surface* surface, const char* filename); bool SaveScreenshot(void); #endif /* GRAPHICSRESOURCES_H */ ================================================ FILE: desktop_version/src/GraphicsUtil.cpp ================================================ #include #include #include #include "Alloc.h" #include "Constants.h" #include "Graphics.h" #include "Maths.h" #include "Screen.h" #include "UtilityClass.h" #include "Vlogging.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; } static SDL_Surface* RecreateSurfaceWithDimensions( SDL_Surface* surface, const int width, const int height ) { SDL_Surface* retval; SDL_BlendMode blend_mode; if (surface == NULL) { return NULL; } retval = SDL_CreateRGBSurface( surface->flags, width, height, surface->format->BitsPerPixel, surface->format->Rmask, surface->format->Gmask, surface->format->Bmask, surface->format->Amask ); if (retval == NULL) { return NULL; } SDL_GetSurfaceBlendMode(surface, &blend_mode); SDL_SetSurfaceBlendMode(retval, blend_mode); return retval; } 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; //Convert to the correct display format after nabbing the new _surface or we will slow things down. SDL_Surface* preSurface = RecreateSurfaceWithDimensions( metaSurface, width, height ); // 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, const int x, const int y, const SDL_Color color) { const SDL_Point point = {x, y}; const SDL_Rect rect = {0, 0, surface->w, surface->h}; const bool inbounds = SDL_PointInRect(&point, &rect); if (!inbounds) { WHINE_ONCE_ARGS(( "Pixel draw is not inbounds: " "Attempted to draw to %i,%i in %ix%i surface", x, y, surface->w, surface->h )); SDL_assert(0 && "Pixel draw is not inbounds!"); return; } const SDL_PixelFormat* fmt = surface->format; const int bpp = fmt->BytesPerPixel; Uint8* pixel = (Uint8*) surface->pixels + y * surface->pitch + x * bpp; Uint32* pixel32 = (Uint32*) pixel; switch (bpp) { case 1: case 2: SDL_assert(0 && "Colors other than 24- or 32- bit unsupported!"); break; case 3: { const Uint32 single = SDL_MapRGB(fmt, color.r, color.g, color.b); pixel[0] = (single & 0xFF0000) >> 16; pixel[1] = (single & 0x00FF00) >> 8; pixel[2] = (single & 0x0000FF) >> 0; break; } case 4: *pixel32 = SDL_MapRGBA(fmt, color.r, color.g, color.b, color.a); } } SDL_Color ReadPixel(const SDL_Surface* surface, const int x, const int y) { SDL_Color color = {0, 0, 0, 0}; const SDL_Point point = {x, y}; const SDL_Rect rect = {0, 0, surface->w, surface->h}; const bool inbounds = SDL_PointInRect(&point, &rect); if (!inbounds) { WHINE_ONCE_ARGS(( "Pixel read is not inbounds: " "Attempted to read %i,%i in %ix%i surface", x, y, surface->w, surface->h )); SDL_assert(0 && "Pixel read is not inbounds!"); return color; } const SDL_PixelFormat* fmt = surface->format; const int bpp = surface->format->BytesPerPixel; const Uint8* pixel = (Uint8*) surface->pixels + y * surface->pitch + x * bpp; const Uint32* pixel32 = (Uint32*) pixel; switch (bpp) { case 1: case 2: SDL_assert(0 && "Colors other than 24- or 32- bit unsupported!"); break; case 3: { const Uint32 single = (pixel[0] << 16) | (pixel[1] << 8) | (pixel[2] << 0); SDL_GetRGB(single, fmt, &color.r, &color.g, &color.b); color.a = 255; break; } case 4: SDL_GetRGBA(*pixel32, fmt, &color.r, &color.g, &color.b, &color.a); } return color; } static int oldscrollamount = 0; static int scrollamount = 0; static bool isscrolling = 0; void UpdateFilter(void) { if (rand() % 4000 < 8) { isscrolling = true; } oldscrollamount = scrollamount; if(isscrolling == true) { scrollamount += 20; if(scrollamount > 240) { scrollamount = 0; oldscrollamount = 0; isscrolling = false; } } } static bool disabled_filter = false; void ApplyFilter(SDL_Surface** src, SDL_Surface** dest) { if (disabled_filter) { return; } if (src == NULL || dest == NULL) { SDL_assert(0 && "NULL src or dest!"); return; } if (*src == NULL) { *src = SDL_CreateRGBSurface(0, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS, 32, 0, 0, 0, 0); } if (*dest == NULL) { *dest = SDL_CreateRGBSurface(0, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS, 32, 0, 0, 0, 0); } if (*src == NULL || *dest == NULL) { WHINE_ONCE_ARGS(("Could not create temporary surfaces: %s", SDL_GetError())); return; } const int result = SDL_RenderReadPixels(gameScreen.m_renderer, NULL, 0, (*src)->pixels, (*src)->pitch); if (result != 0) { disabled_filter = true; VVV_freefunc(SDL_FreeSurface, *src); VVV_freefunc(SDL_FreeSurface, *dest); WHINE_ONCE_ARGS(("Could not read pixels from renderer: %s", SDL_GetError())); return; } const int red_offset = rand() % 4; for (int x = 0; x < (*src)->w; x++) { for (int y = 0; y < (*src)->h; y++) { const int sampley = (y + (int) graphics.lerp(oldscrollamount, scrollamount)) % 240; const SDL_Color pixel = ReadPixel(*src, x, sampley); Uint8 green = pixel.g; Uint8 blue = pixel.b; const SDL_Color pixel_offset = ReadPixel(*src, SDL_min(x + red_offset, 319), sampley); Uint8 red = pixel_offset.r; double mult; int tmp; /* needed to avoid char overflow */ if (isscrolling && sampley > 220 && ((rand() % 10) < 4)) { mult = 0.6; } else { mult = 0.2; } tmp = red + fRandom() * mult * 254; red = SDL_min(tmp, 255); tmp = green + fRandom() * mult * 254; green = SDL_min(tmp, 255); tmp = blue + fRandom() * mult * 254; blue = SDL_min(tmp, 255); if (y % 2 == 0) { red = (Uint8) (red / 1.2f); green = (Uint8) (green / 1.2f); blue = (Uint8) (blue / 1.2f); } int distX = (int) ((SDL_abs(160.0f - x) / 160.0f) * 16); int distY = (int) ((SDL_abs(120.0f - y) / 120.0f) * 32); red = SDL_max(red - (distX + distY), 0); green = SDL_max(green - (distX + distY), 0); blue = SDL_max(blue - (distX + distY), 0); const SDL_Color color = {red, green, blue, pixel.a}; DrawPixel(*dest, x, y, color); } } SDL_UpdateTexture(graphics.gameTexture, NULL, (*dest)->pixels, (*dest)->pitch); } bool TakeScreenshot(SDL_Surface** surface) { if (surface == NULL) { SDL_assert(0 && "surface is NULL!"); return false; } int width = 0; int height = 0; int result = graphics.query_texture( graphics.gameTexture, NULL, NULL, &width, &height ); if (result != 0) { return false; } if (*surface == NULL) { *surface = SDL_CreateRGBSurface(0, width, height, 24, 0, 0, 0, 0); if (*surface == NULL) { WHINE_ONCE_ARGS( ("Could not create temporary surface: %s", SDL_GetError()) ); return false; } } if ((*surface)->w != width || (*surface)->h != height) { SDL_assert(0 && "Width and height of surface and texture mismatch!"); return false; } result = graphics.set_render_target(graphics.gameTexture); if (result != 0) { return false; } result = SDL_RenderReadPixels( gameScreen.m_renderer, NULL, SDL_PIXELFORMAT_RGB24, (*surface)->pixels, (*surface)->pitch ); if (result != 0) { WHINE_ONCE_ARGS( ("Could not read pixels from renderer: %s", SDL_GetError()) ); return false; } /* Need to manually vertically reverse pixels in Flip Mode. */ if (graphics.flipmode) { for (int x = 0; x < (*surface)->w; x++) { for (int y = 0; y < (*surface)->h / 2; y++) { const SDL_Color upper = ReadPixel(*surface, x, y); const SDL_Color lower = ReadPixel(*surface, x, (*surface)->h - 1 - y); DrawPixel(*surface, x, y, lower); DrawPixel(*surface, x, (*surface)->h - 1 - y, upper); } } } return true; } bool UpscaleScreenshot2x(SDL_Surface* src, SDL_Surface** dest) { if (src == NULL) { SDL_assert(0 && "src is NULL!"); return false; } if (dest == NULL) { SDL_assert(0 && "dest is NULL!"); return false; } if (*dest == NULL) { *dest = SDL_CreateRGBSurface( 0, src->w * 2, src->h * 2, src->format->BitsPerPixel, 0, 0, 0, 0 ); if (*dest == NULL) { WHINE_ONCE_ARGS( ("Could not create temporary surface: %s", SDL_GetError()) ); return false; } } int result = SDL_BlitScaled(src, NULL, *dest, NULL); if (result != 0) { WHINE_ONCE_ARGS(("Could not blit surface: %s", SDL_GetError())); return false; } return true; } ================================================ FILE: desktop_version/src/GraphicsUtil.h ================================================ #ifndef GRAPHICSUTIL_H #define GRAPHICSUTIL_H #include void setRect(SDL_Rect& _r, int x, int y, int w, int h); SDL_Surface* GetSubSurface( SDL_Surface* metaSurface, int x, int y, int width, int height ); void DrawPixel(SDL_Surface* surface, int x, int y, SDL_Color color); SDL_Color ReadPixel(const SDL_Surface* surface, int x, int y); void UpdateFilter(void); void ApplyFilter(SDL_Surface** src, SDL_Surface** dest); bool TakeScreenshot(SDL_Surface** surface); bool UpscaleScreenshot2x(SDL_Surface* src, SDL_Surface** dest); #endif /* GRAPHICSUTIL_H */ ================================================ FILE: desktop_version/src/IMERender.cpp ================================================ #include #include "Constants.h" #include "Font.h" #include "Graphics.h" #include "KeyPoll.h" #include "UTF8.h" static bool render_done = false; static SDL_Rect imebox; void ime_render(void) { render_done = false; if (!SDL_IsTextInputActive() || key.imebuffer == "") { return; } int fontheight = font::height(PR_FONT_LEVEL); imebox.x = 8; imebox.y = SCREEN_HEIGHT_PIXELS - 32 - fontheight; imebox.w = font::len(PR_FONT_LEVEL, key.imebuffer.c_str()) + 1; imebox.h = fontheight + 1; SDL_Rect imebox_border = imebox; imebox_border.x -= 1; imebox_border.y -= 1; imebox_border.w += 2; imebox_border.h += 2; graphics.fill_rect(&imebox_border, 128, 128, 128); graphics.fill_rect(&imebox, 0, 0, 0); if (key.imebuffer_length > 0) { /* Also show a selection, so we need to know where and how long it is... * Because SDL gives us the number of "characters" (so, codepoints)... */ const char* imebuffer_ptr = key.imebuffer.c_str(); const char* sel_start_ptr = imebuffer_ptr; for (int i = 0; i < key.imebuffer_start; i++) { if (UTF8_next(&sel_start_ptr) == 0) { // Already past the '\0'... sel_start_ptr--; break; } } const char* sel_end_ptr = sel_start_ptr; for (int i = 0; i < key.imebuffer_length; i++) { if (UTF8_next(&sel_end_ptr) == 0) { break; } } size_t before_sel_nbytes = sel_start_ptr - imebuffer_ptr; size_t in_sel_nbytes = sel_end_ptr - sel_start_ptr; char* before_sel = (char*) SDL_malloc(before_sel_nbytes + 1); char* in_sel = (char*) SDL_malloc(in_sel_nbytes + 1); if (before_sel != NULL && in_sel != NULL) { SDL_memcpy(before_sel, imebuffer_ptr, before_sel_nbytes); before_sel[before_sel_nbytes] = '\0'; SDL_memcpy(in_sel, sel_start_ptr, in_sel_nbytes); in_sel[in_sel_nbytes] = '\0'; int before_sel_pixels = font::len(PR_FONT_LEVEL, before_sel) - 1; int in_sel_pixels = font::len(PR_FONT_LEVEL, in_sel); if (in_sel_pixels > 0) { in_sel_pixels += 1; } SDL_Rect selrect = imebox; selrect.x += before_sel_pixels + 1; selrect.w = in_sel_pixels; graphics.fill_rect(&selrect, 128, 64, 0); } SDL_free(before_sel); SDL_free(in_sel); } font::print(PR_FONT_LEVEL | PR_CJK_LOW, imebox.x + 1, imebox.y + 1, key.imebuffer, 255, 255, 255); render_done = true; } void ime_set_rect(SDL_Rect* stretch_info) { if (!render_done) { return; } SDL_Rect imebox_scaled = imebox; float x_scale = (float) stretch_info->w / SCREEN_WIDTH_PIXELS; float y_scale = (float) stretch_info->h / SCREEN_HEIGHT_PIXELS; imebox_scaled.x *= x_scale; imebox_scaled.y *= y_scale; imebox_scaled.w *= x_scale; imebox_scaled.h *= y_scale; imebox_scaled.x += stretch_info->x; imebox_scaled.y += stretch_info->y; SDL_SetTextInputRect(&imebox_scaled); } ================================================ FILE: desktop_version/src/IMERender.h ================================================ #ifndef IMERENDER_H #define IMERENDER_H void ime_render(void); void ime_set_rect(SDL_Rect* stretch_info); #endif /* IMERENDER_H */ ================================================ FILE: desktop_version/src/Input.cpp ================================================ #include #include #include "ButtonGlyphs.h" #include "Credits.h" #include "CustomLevels.h" #include "Editor.h" #include "Entity.h" #include "Enums.h" #include "FileSystemUtils.h" #include "Game.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "GraphicsUtil.h" #include "KeyPoll.h" #include "LevelDebugger.h" #include "Localization.h" #include "LocalizationMaint.h" #include "LocalizationStorage.h" #include "MakeAndPlay.h" #include "Map.h" #include "Music.h" #include "RoomnameTranslator.h" #include "Screen.h" #include "Script.h" #include "UtilityClass.h" #include "Vlogging.h" static void updatebuttonmappings(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)) { if (!game.gpmenu_confirming || i != game.gpmenu_lastbutton) { game.gpmenu_confirming = true; game.gpmenu_lastbutton = i; // Is this button already in the list for this action? std::vector* vec = NULL; switch (bind) { case 1: vec = &game.controllerButton_flip; break; case 2: vec = &game.controllerButton_map; break; case 3: vec = &game.controllerButton_esc; break; case 4: vec = &game.controllerButton_restart; break; case 5: vec = &game.controllerButton_interact; break; default: return; } game.gpmenu_showremove = false; for (size_t j = 0; j < vec->size(); j += 1) { if (i == (*vec)[j]) { game.gpmenu_showremove = true; break; } } return; } game.gpmenu_confirming = false; bool dupe = false; switch (bind) { case 1: { size_t j; for (j = 0; j < game.controllerButton_flip.size(); j += 1) { if (i == game.controllerButton_flip[j]) { dupe = true; game.controllerButton_flip.erase(game.controllerButton_flip.begin() + j); } } if (!dupe) { game.controllerButton_flip.push_back(i); } music.playef(Sound_VIRIDIAN); for (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 (j = 0; j < game.controllerButton_esc.size(); j += 1) { if (i == game.controllerButton_esc[j]) { game.controllerButton_esc.erase(game.controllerButton_esc.begin() + j); } } for (j = 0; j < game.controllerButton_restart.size(); j += 1) { if (i == game.controllerButton_restart[j]) { game.controllerButton_restart.erase(game.controllerButton_restart.begin() + j); } } for (j = 0; j < game.controllerButton_interact.size(); j += 1) { if (i == game.controllerButton_interact[j]) { game.controllerButton_interact.erase(game.controllerButton_interact.begin() + j); } } break; } case 2: { size_t j; for (j = 0; j < game.controllerButton_map.size(); j += 1) { if (i == game.controllerButton_map[j]) { dupe = true; game.controllerButton_map.erase(game.controllerButton_map.begin() + j); } } if (!dupe) { game.controllerButton_map.push_back(i); } music.playef(Sound_VIRIDIAN); for (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 (j = 0; j < game.controllerButton_esc.size(); j += 1) { if (i == game.controllerButton_esc[j]) { game.controllerButton_esc.erase(game.controllerButton_esc.begin() + j); } } for (j = 0; j < game.controllerButton_restart.size(); j += 1) { if (i == game.controllerButton_restart[j]) { game.controllerButton_restart.erase(game.controllerButton_restart.begin() + j); } } for (j = 0; j < game.controllerButton_interact.size(); j += 1) { if (i == game.controllerButton_interact[j]) { game.controllerButton_interact.erase(game.controllerButton_interact.begin() + j); } } break; } case 3: { size_t j; for (j = 0; j < game.controllerButton_esc.size(); j += 1) { if (i == game.controllerButton_esc[j]) { dupe = true; game.controllerButton_esc.erase(game.controllerButton_esc.begin() + j); } } if (!dupe) { game.controllerButton_esc.push_back(i); } music.playef(Sound_VIRIDIAN); for (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 (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 (j = 0; j < game.controllerButton_restart.size(); j += 1) { if (i == game.controllerButton_restart[j]) { game.controllerButton_restart.erase(game.controllerButton_restart.begin() + j); } } for (j = 0; j < game.controllerButton_interact.size(); j += 1) { if (i == game.controllerButton_interact[j]) { game.controllerButton_interact.erase(game.controllerButton_interact.begin() + j); } } break; } case 4: { size_t j; for (j = 0; j < game.controllerButton_restart.size(); j += 1) { if (i == game.controllerButton_restart[j]) { dupe = true; game.controllerButton_restart.erase(game.controllerButton_restart.begin() + j); } } if (!dupe) { game.controllerButton_restart.push_back(i); } music.playef(Sound_VIRIDIAN); for (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 (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 (j = 0; j < game.controllerButton_esc.size(); j += 1) { if (i == game.controllerButton_esc[j]) { game.controllerButton_esc.erase(game.controllerButton_esc.begin() + j); } } for (j = 0; j < game.controllerButton_interact.size(); j += 1) { if (i == game.controllerButton_interact[j]) { game.controllerButton_interact.erase(game.controllerButton_interact.begin() + j); } } break; } case 5: { size_t j; for (j = 0; j < game.controllerButton_interact.size(); j += 1) { if (i == game.controllerButton_interact[j]) { dupe = true; game.controllerButton_interact.erase(game.controllerButton_interact.begin() + j); } } if (!dupe) { game.controllerButton_interact.push_back(i); } music.playef(Sound_VIRIDIAN); for (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 (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 (j = 0; j < game.controllerButton_esc.size(); j += 1) { if (i == game.controllerButton_esc[j]) { game.controllerButton_esc.erase(game.controllerButton_esc.begin() + j); } } for (j = 0; j < game.controllerButton_restart.size(); j += 1) { if (i == game.controllerButton_restart[j]) { game.controllerButton_restart.erase(game.controllerButton_restart.begin() + j); } } break; } } } } } /* Also used in KeyPoll.cpp. */ void recomputetextboxes(void) { /* Retranslate and reposition all text boxes. * WARNING: Needs to update in linear order, starting from 0. */ for (size_t i = 0; i < graphics.textboxes.size(); i++) { graphics.textboxes[i].updatetext(); graphics.textboxes[i].applyposition(); } } static void toggleflipmode(void) { graphics.setflipmode = !graphics.setflipmode; game.savestatsandsettings_menu(); if (graphics.setflipmode) { music.playef(Sound_GAMESAVED); game.screenshake = 10; game.flashlight = 5; } else { music.playef(Sound_VIRIDIAN); } /* Some text boxes change depending on Flip Mode, so update text boxes. */ const bool temp = graphics.flipmode; graphics.flipmode = graphics.setflipmode; recomputetextboxes(); graphics.flipmode = temp; } static bool fadetomode = false; static int fadetomodedelay = 0; static enum StartMode gotomode = Start_MAINGAME; static void startmode(const enum StartMode mode) { gotomode = mode; graphics.fademode = FADE_START_FADEOUT; fadetomode = true; fadetomodedelay = 19; } static void handlefadetomode(void) { if (game.ingame_titlemode) { /* We shouldn't be here! */ SDL_assert(0 && "Loading a mode from in-game options!"); return; } if (fadetomodedelay > 0) { --fadetomodedelay; } else { fadetomode = false; script.startgamemode(gotomode); } } static int* user_changing_volume = NULL; static int previous_volume = 0; static void initvolumeslider(const int menuoption) { switch (menuoption) { case 0: game.slidermode = SLIDER_MUSICVOLUME; user_changing_volume = &music.user_music_volume; break; case 1: game.slidermode = SLIDER_SOUNDVOLUME; user_changing_volume = &music.user_sound_volume; break; default: SDL_assert(0 && "Unhandled volume slider option!"); game.slidermode = SLIDER_NONE; user_changing_volume = NULL; return; } previous_volume = *user_changing_volume; } static void deinitvolumeslider(void) { user_changing_volume = NULL; game.savestatsandsettings_menu(); game.slidermode = SLIDER_NONE; } static void slidermodeinput(void) { if (user_changing_volume == NULL) { SDL_assert(0 && "user_changing_volume is NULL!"); return; } if (game.press_left) { *user_changing_volume -= USER_VOLUME_STEP; } else if (game.press_right) { *user_changing_volume += USER_VOLUME_STEP; } *user_changing_volume = SDL_clamp(*user_changing_volume, 0, USER_VOLUME_MAX); } static void menuactionpress(void) { if (game.menutestmode) { music.playef(Sound_CRUMBLE); Menu::MenuName nextmenu = (Menu::MenuName) (game.currentmenuname + 1); game.returnmenu(); game.createmenu(nextmenu); return; } switch (game.currentmenuname) { case Menu::mainmenu: { int option_id = -1; int option_seq = 0; /* option number in YOUR configuration */ #define OPTION_ID(id) \ if (option_seq == game.currentmenuoption) \ { \ option_id = id; \ } \ option_seq++; #if !defined(MAKEANDPLAY) OPTION_ID(0) /* play */ #endif OPTION_ID(1) /* levels */ OPTION_ID(2) /* options */ if (loc::show_translator_menu) { OPTION_ID(3) /* translator */ } OPTION_ID(4) /* credits */ OPTION_ID(5) /* quit */ #undef OPTION_ID switch (option_id) { #if !defined(MAKEANDPLAY) case 0: //Play if (!game.save_exists() && !game.anything_unlocked()) { //No saves exist, just start a new game music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME); } else { //Bring you to the normal playmenu music.playef(Sound_VIRIDIAN); game.createmenu(Menu::play); map.nexttowercolour(); } break; #endif case 1: //Bring you to the normal playmenu music.playef(Sound_VIRIDIAN); game.editor_disabled = !BUTTONGLYPHS_keyboard_is_available(); game.createmenu(Menu::playerworlds); map.nexttowercolour(); break; case 2: //Options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::options); map.nexttowercolour(); break; case 3: //Translator music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_main); map.nexttowercolour(); break; case 4: //Credits music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits); map.nexttowercolour(); break; case 5: music.playef(Sound_VIRIDIAN); game.createmenu(Menu::youwannaquit); map.nexttowercolour(); break; } break; } case Menu::levellist: { const bool nextlastoptions = cl.ListOfMetaData.size() > 8; if(game.currentmenuoption==(int)game.menuoptions.size()-1){ //go back to menu music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); }else if(nextlastoptions && game.currentmenuoption==(int)game.menuoptions.size()-2){ //previous page music.playef(Sound_VIRIDIAN); if(game.levelpage==0){ game.levelpage=(cl.ListOfMetaData.size()-1)/8; }else{ game.levelpage--; } game.createmenu(Menu::levellist, true); game.currentmenuoption=game.menuoptions.size()-2; map.nexttowercolour(); }else if(nextlastoptions && game.currentmenuoption==(int)game.menuoptions.size()-3){ //next page music.playef(Sound_VIRIDIAN); if((size_t) ((game.levelpage*8)+8) >= cl.ListOfMetaData.size()){ game.levelpage=0; }else{ game.levelpage++; } game.createmenu(Menu::levellist, true); game.currentmenuoption=game.menuoptions.size()-3; map.nexttowercolour(); }else{ //Ok, launch the level! //PLAY CUSTOM LEVEL HOOK music.playef(Sound_VIRIDIAN); game.playcustomlevel=(game.levelpage*8)+game.currentmenuoption; game.customleveltitle=cl.ListOfMetaData[game.playcustomlevel].title; game.customlevelfilename=cl.ListOfMetaData[game.playcustomlevel].filename; std::string name = "saves/" + cl.ListOfMetaData[game.playcustomlevel].filename.substr(7) + ".vvv"; tinyxml2::XMLDocument doc; if (!FILESYSTEM_loadTiXml2Document(name.c_str(), doc)){ startmode(Start_CUSTOM); }else{ game.createmenu(Menu::quickloadlevel); map.nexttowercolour(); } } break; } case Menu::quickloadlevel: switch (game.currentmenuoption) { case 0: //continue save music.playef(Sound_VIRIDIAN); startmode(Start_CUSTOM_QUICKSAVE); break; case 1: music.playef(Sound_VIRIDIAN); startmode(Start_CUSTOM); break; case 2: music.playef(Sound_VIRIDIAN); game.createmenu(Menu::deletequicklevel); map.nexttowercolour(); break; default: music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::deletequicklevel: switch (game.currentmenuoption) { default: music.playef(Sound_VIRIDIAN); game.returnmenu(); break; case 1: game.customdeletequick(cl.ListOfMetaData[game.playcustomlevel].filename); game.returntomenu(Menu::levellist); game.flashlight = 5; game.screenshake = 15; music.playef(Sound_DESTROY); break; } map.nexttowercolour(); break; case Menu::playerworlds: if (game.currentmenuoption == 0) { music.playef(Sound_VIRIDIAN); game.levelpage = 0; cl.getDirectoryData(); game.loadcustomlevelstats(); //Should only load a file if it's needed game.createmenu(Menu::levellist); if (FILESYSTEM_levelDirHasError()) { game.createmenu(Menu::warninglevellist); } map.nexttowercolour(); } else if (game.currentmenuoption == 1) { // LEVEL EDITOR HOOK if (game.editor_disabled) { music.playef(Sound_CRY); } else { music.playef(Sound_VIRIDIAN); startmode(Start_EDITOR); ed.filename = ""; } } else if (!game.editor_disabled && game.currentmenuoption == 2) { //"OPENFOLDERHOOK" if (FILESYSTEM_openDirectoryEnabled() && FILESYSTEM_openDirectory(FILESYSTEM_getUserLevelDirectory())) { music.playef(Sound_VIRIDIAN); SDL_MinimizeWindow(gameScreen.m_window); } else { music.playef(Sound_CRY); } } else if (!game.editor_disabled && game.currentmenuoption == 3) { music.playef(Sound_VIRIDIAN); game.createmenu(Menu::confirmshowlevelspath); map.nexttowercolour(); } else if (game.currentmenuoption == 4 || (game.editor_disabled && game.currentmenuoption == 2)) { // back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } break; case Menu::confirmshowlevelspath: { int prevmenuoption = game.currentmenuoption; /* returnmenu destroys this */ music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); if (prevmenuoption == 1) { game.createmenu(Menu::showlevelspath); } break; } case Menu::showlevelspath: music.playef(Sound_VIRIDIAN); game.editor_disabled = !BUTTONGLYPHS_keyboard_is_available(); game.returntomenu(Menu::playerworlds); map.nexttowercolour(); break; case Menu::errornostart: music.playef(Sound_VIRIDIAN); game.createmenu(Menu::mainmenu); map.nexttowercolour(); break; case Menu::graphicoptions: { int offset = 0; bool processed = false; if (game.currentmenuoption == offset + 0 && !gameScreen.isForcedFullscreen()) { processed = true; music.playef(Sound_VIRIDIAN); gameScreen.toggleFullScreen(); } if (gameScreen.isForcedFullscreen()) { --offset; } if (game.currentmenuoption == offset + 1) { processed = true; music.playef(Sound_VIRIDIAN); gameScreen.toggleScalingMode(); game.savestatsandsettings_menu(); } if (game.currentmenuoption == offset + 2 && !gameScreen.isForcedFullscreen()) { processed = true; // resize to nearest multiple if (gameScreen.isWindowed) { music.playef(Sound_VIRIDIAN); gameScreen.ResizeToNearestMultiple(); game.savestatsandsettings_menu(); } else { music.playef(Sound_CRY); } } if (gameScreen.isForcedFullscreen()) { --offset; } if (game.currentmenuoption == offset + 3) { processed = true; music.playef(Sound_VIRIDIAN); gameScreen.toggleLinearFilter(); game.savestatsandsettings_menu(); } if (game.currentmenuoption == offset + 4) { processed = true; //change smoothing music.playef(Sound_VIRIDIAN); gameScreen.badSignalEffect= !gameScreen.badSignalEffect; game.savestatsandsettings_menu(); } if (game.currentmenuoption == offset + 5) { processed = true; //toggle vsync music.playef(Sound_VIRIDIAN); gameScreen.toggleVSync(); game.savestatsandsettings_menu(); } if (!processed) { //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } break; } case Menu::youwannaquit: switch (game.currentmenuoption) { case 0: //bye! music.playef(Sound_CRY); startmode(Start_QUIT); break; default: music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } break; case Menu::setinvincibility: switch (game.currentmenuoption) { case 0: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; default: map.invincibility = !map.invincibility; music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; } break; case Menu::setslowdown: switch (game.currentmenuoption) { case 0: //back game.slowdown = 30; music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; case 1: game.slowdown = 24; music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; case 2: game.slowdown = 18; music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; case 3: game.slowdown = 12; music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; } break; case Menu::speedrunneroptions: switch (game.currentmenuoption) { case 0: // Glitchrunner mode music.playef(Sound_VIRIDIAN); game.createmenu(Menu::setglitchrunner); game.currentmenuoption = GlitchrunnerMode_get(); map.nexttowercolour(); break; case 1: /* Input delay */ music.playef(Sound_VIRIDIAN); game.inputdelay = !game.inputdelay; game.savestatsandsettings_menu(); break; case 2: /* Interact button toggle */ music.playef(Sound_VIRIDIAN); game.separate_interact = !game.separate_interact; game.savestatsandsettings_menu(); break; case 3: // toggle fake load screen game.skipfakeload = !game.skipfakeload; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; case 4: // toggle in game timer game.showingametimer = !game.showingametimer; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; case 5: // english sprites loc::english_sprites = !loc::english_sprites; if (!loc::english_sprites) { graphics.grphx.init_translations(); } game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::setglitchrunner: GlitchrunnerMode_set((enum GlitchrunnerMode) game.currentmenuoption); music.playef(Sound_VIRIDIAN); game.returnmenu(); game.savestatsandsettings_menu(); map.nexttowercolour(); break; case Menu::advancedoptions: switch (game.currentmenuoption) { case 0: // toggle unfocus pause game.disablepause = !game.disablepause; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; case 1: /* toggle unfocus music pause */ game.disableaudiopause = !game.disableaudiopause; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; case 2: // toggle translucent roomname BG graphics.translucentroomname = !graphics.translucentroomname; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; case 3: // toggle checkpoint saving game.checkpoint_saving = !game.checkpoint_saving; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::accessibility: { int accessibilityoffset = 0; #if !defined(MAKEANDPLAY) accessibilityoffset = 1; if (game.currentmenuoption == 0) { //unlock play options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenu); map.nexttowercolour(); } #endif if (game.currentmenuoption == accessibilityoffset + 0) { //invincibility if (!game.ingame_titlemode || !game.incompetitive()) { if (!map.invincibility) { game.createmenu(Menu::setinvincibility); map.nexttowercolour(); } else { map.invincibility = !map.invincibility; game.savestatsandsettings_menu(); } music.playef(Sound_VIRIDIAN); } else { music.playef(Sound_CRY); map.invincibility = false; } } else if (game.currentmenuoption == accessibilityoffset + 1) { //change game speed if (!game.ingame_titlemode || !game.incompetitive()) { game.createmenu(Menu::setslowdown); map.nexttowercolour(); music.playef(Sound_VIRIDIAN); } else { music.playef(Sound_CRY); game.slowdown = 30; } } else if (game.currentmenuoption == accessibilityoffset + 2) { //disable animated backgrounds game.colourblindmode = !game.colourblindmode; game.savestatsandsettings_menu(); graphics.towerbg.tdrawback = true; graphics.titlebg.tdrawback = true; music.playef(Sound_VIRIDIAN); } else if (game.currentmenuoption == accessibilityoffset + 3) { //disable screeneffects game.noflashingmode = !game.noflashingmode; game.savestatsandsettings_menu(); if (!game.noflashingmode) { music.playef(Sound_GAMESAVED); game.screenshake = 10; game.flashlight = 5; } else { music.playef(Sound_VIRIDIAN); } } else if (game.currentmenuoption == accessibilityoffset + 4) { //disable text outline graphics.notextoutline = !graphics.notextoutline; game.savestatsandsettings_menu(); music.playef(Sound_VIRIDIAN); } else if (game.currentmenuoption == accessibilityoffset + 5) { //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } break; } case Menu::gameplayoptions: { int gameplayoptionsoffset = 0; #if !defined(MAKEANDPLAY) if (game.ingame_titlemode && game.unlock[Unlock_FLIPMODE]) #endif { gameplayoptionsoffset = 1; if (game.currentmenuoption == 0) { toggleflipmode(); // Fix wrong area music in Tower (Positive Force vs. ecroF evitisoP) if (map.custommode) { break; } int area = map.area(game.roomx, game.roomy); if (area == 3 || area == 11) { if (graphics.setflipmode) { music.play(Music_POSITIVEFORCEREVERSED); } else { music.play(Music_POSITIVEFORCE); } } } } if (game.currentmenuoption == gameplayoptionsoffset + 0) { //Toggle 30+ FPS music.playef(Sound_VIRIDIAN); game.over30mode = !game.over30mode; game.savestatsandsettings_menu(); } else if (game.currentmenuoption == gameplayoptionsoffset + 1) { //Speedrunner options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::speedrunneroptions); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 2) { //Advanced options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::advancedoptions); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 3) { //Clear Data music.playef(Sound_VIRIDIAN); game.createmenu(Menu::cleardatamenu); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 4) { music.playef(Sound_VIRIDIAN); game.createmenu(Menu::clearcustomdatamenu); map.nexttowercolour(); } else if (game.currentmenuoption == gameplayoptionsoffset + 5) { //return to previous menu music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } break; } case Menu::options: switch (game.currentmenuoption) { case 0: //gameplay options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::gameplayoptions); map.nexttowercolour(); break; case 1: //graphic options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::graphicoptions); map.nexttowercolour(); break; case 2: /* Audio options */ music.playef(Sound_VIRIDIAN); game.createmenu(Menu::audiooptions); map.nexttowercolour(); break; case 3: //gamepad options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::controller); map.nexttowercolour(); break; case 4: //accessibility options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::accessibility); map.nexttowercolour(); break; case 5: //language options if (game.translator_cutscene_test) { music.playef(Sound_CRY); break; } music.playef(Sound_VIRIDIAN); loc::loadlanguagelist(); loc::pre_title_lang_menu = false; game.createmenu(Menu::language); game.currentmenuoption = loc::languagelist_curlang; map.nexttowercolour(); break; default: /* Return */ music.playef(Sound_VIRIDIAN); if (game.ingame_titlemode) { game.returntoingame(); } else { game.returnmenu(); map.nexttowercolour(); } break; } break; case Menu::audiooptions: switch (game.currentmenuoption) { case 0: case 1: music.playef(Sound_VIRIDIAN); if (game.slidermode == SLIDER_NONE) { initvolumeslider(game.currentmenuoption); } else { deinitvolumeslider(); } break; case 2: if (!music.mmmmmm) { break; } /* Toggle MMMMMM */ music.usingmmmmmm = !music.usingmmmmmm; music.playef(Sound_VIRIDIAN); if (music.currentsong > -1) { music.play(music.currentsong); } game.savestatsandsettings_menu(); break; } if (game.currentmenuoption == 2 + (int) music.mmmmmm) { /* Return */ game.returnmenu(); map.nexttowercolour(); music.playef(Sound_VIRIDIAN); } break; case Menu::language: { std::string prev_lang = std::string(loc::lang); music.playef(Sound_VIRIDIAN); if (loc::languagelist.size() != 0 && (unsigned)game.currentmenuoption < loc::languagelist.size()) { /* Update code also used in KeyPoll.cpp. */ loc::languagelist_curlang = game.currentmenuoption; loc::lang = loc::languagelist[game.currentmenuoption].code; loc::loadtext(false); loc::lang_set = loc::lang_set_current; graphics.grphx.init_translations(); } if (loc::pre_title_lang_menu) { /* Make the title screen appear, we haven't seen it yet. * game.returnmenu() works because Menu::mainmenu * is created before the language menu. */ game.menustart = false; loc::pre_title_lang_menu = false; } if (prev_lang != loc::lang) { recomputetextboxes(); } game.returnmenu(); map.nexttowercolour(); game.savestatsandsettings_menu(); break; } case Menu::translator_main: switch (game.currentmenuoption) { case 0: // translator options music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_options); map.nexttowercolour(); break; case 1: // maintenance music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_maintenance); map.nexttowercolour(); break; case 2: // open lang folder if (FILESYSTEM_openDirectoryEnabled() && FILESYSTEM_openDirectory(FILESYSTEM_getUserMainLangDirectory())) { music.playef(Sound_VIRIDIAN); SDL_MinimizeWindow(gameScreen.m_window); } else { music.playef(Sound_CRY); } break; default: // return music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::translator_options: switch (game.currentmenuoption) { case 0: // language statistics music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_options_stats); map.nexttowercolour(); break; case 1: // translate room names music.playef(Sound_VIRIDIAN); roomname_translator::set_enabled(!roomname_translator::enabled); game.savestatsandsettings_menu(); break; case 2: // explore game music.playef(Sound_VIRIDIAN); game.createmenu(Menu::translator_options_exploregame); map.nexttowercolour(); break; case 3: // menu test music.playef(Sound_GAMESAVED); game.menutestmode = true; game.createmenu((Menu::MenuName) 0); map.nexttowercolour(); break; case 4: // cutscene test if (loc::lang == "en") { music.playef(Sound_CRY); } else { music.playef(Sound_VIRIDIAN); game.cutscenetest_menu_page = 0; loc::populate_testable_script_ids(); game.createmenu(Menu::translator_options_cutscenetest); map.nexttowercolour(); } break; case 5: // limits check music.playef(Sound_VIRIDIAN); loc::local_limits_check(); game.createmenu(Menu::translator_options_limitscheck); map.nexttowercolour(); break; default: // return music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::translator_options_limitscheck: switch (game.currentmenuoption) { case 0: // next if (loc::limitscheck_current_overflow < loc::text_overflows.size()) { music.playef(Sound_VIRIDIAN); loc::limitscheck_current_overflow++; } break; default: // return music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::translator_options_stats: music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; case Menu::translator_options_exploregame: music.playef(Sound_VIRIDIAN); switch (game.currentmenuoption) { case 0: game.start_translator_exploring = true; startmode(Start_TIMETRIAL_SPACESTATION1); break; case 1: game.start_translator_exploring = true; startmode(Start_TIMETRIAL_LABORATORY); break; case 2: game.start_translator_exploring = true; startmode(Start_TIMETRIAL_TOWER); break; case 3: game.start_translator_exploring = true; startmode(Start_TIMETRIAL_SPACESTATION2); break; case 4: game.start_translator_exploring = true; startmode(Start_TIMETRIAL_WARPZONE); break; case 5: game.createmenu(Menu::playint1); game.start_translator_exploring = true; map.nexttowercolour(); break; case 6: game.createmenu(Menu::playint2); game.start_translator_exploring = true; map.nexttowercolour(); break; case 7: game.start_translator_exploring = true; startmode(Start_TIMETRIAL_FINALLEVEL); break; default: // return game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::translator_options_cutscenetest: if (game.currentmenuoption == (int)game.menuoptions.size()-4) { // next page music.playef(Sound_VIRIDIAN); if ((size_t) ((game.cutscenetest_menu_page*14)+14) >= loc::testable_script_ids.size()) { game.cutscenetest_menu_page = 0; } else { game.cutscenetest_menu_page++; } game.createmenu(Menu::translator_options_cutscenetest, true); game.currentmenuoption=game.menuoptions.size()-4; map.nexttowercolour(); } else if (game.currentmenuoption == (int)game.menuoptions.size()-3) { // previous page music.playef(Sound_VIRIDIAN); if (game.cutscenetest_menu_page == 0) { game.cutscenetest_menu_page = (loc::testable_script_ids.size()-1)/14; } else { game.cutscenetest_menu_page--; } game.createmenu(Menu::translator_options_cutscenetest, true); game.currentmenuoption=game.menuoptions.size()-3; map.nexttowercolour(); } else if (game.currentmenuoption == (int)game.menuoptions.size()-2) { // play the cutscene, from clipboard game.cutscenetest_menu_play_id = std::string(SDL_GetClipboardText()); startmode(Start_CUTSCENETEST); } else if (game.currentmenuoption == (int)game.menuoptions.size()-1) { // go back to menu music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } else { // play the cutscene! game.cutscenetest_menu_play_id = loc::testable_script_ids[(game.cutscenetest_menu_page*14)+game.currentmenuoption]; startmode(Start_CUTSCENETEST); } break; case Menu::translator_maintenance: music.playef(Sound_VIRIDIAN); switch (game.currentmenuoption) { case 0: // sync languages game.createmenu(Menu::translator_maintenance_sync); map.nexttowercolour(); break; case 1: // global statistics // TODO map.nexttowercolour(); break; case 2: // global limits check loc::global_limits_check(); game.createmenu(Menu::translator_options_limitscheck); map.nexttowercolour(); break; default: // return game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::translator_maintenance_sync: { music.playef(Sound_VIRIDIAN); bool sync_success = true; if (game.currentmenuoption == 0) { // yes, sync files sync_success = loc::sync_lang_files(); } game.returnmenu(); map.nexttowercolour(); if (!sync_success) { game.createmenu(Menu::translator_error_setlangwritedir); } break; } case Menu::translator_error_setlangwritedir: music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; case Menu::unlockmenutrials: switch (game.currentmenuoption) { case 0: //unlock 1 game.unlock[Unlock_TIMETRIAL_SPACESTATION1] = true; game.unlocknotify[Unlock_TIMETRIAL_SPACESTATION1] = true; music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 1: //unlock 2 game.unlock[Unlock_TIMETRIAL_LABORATORY] = true; game.unlocknotify[Unlock_TIMETRIAL_LABORATORY] = true; music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 2: //unlock 3 game.unlock[Unlock_TIMETRIAL_TOWER] = true; game.unlocknotify[Unlock_TIMETRIAL_TOWER] = true; music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 3: //unlock 4 game.unlock[Unlock_TIMETRIAL_SPACESTATION2] = true; game.unlocknotify[Unlock_TIMETRIAL_SPACESTATION2] = true; music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 4: //unlock 5 game.unlock[Unlock_TIMETRIAL_WARPZONE] = true; game.unlocknotify[Unlock_TIMETRIAL_WARPZONE] = true; music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 5: //unlock 6 game.unlock[Unlock_TIMETRIAL_FINALLEVEL] = true; game.unlocknotify[Unlock_TIMETRIAL_FINALLEVEL] = true; music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials, true); game.savestatsandsettings_menu(); break; case 6: //back //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::unlockmenu: switch (game.currentmenuoption) { case 0: //unlock time trials separately... music.playef(Sound_VIRIDIAN); game.createmenu(Menu::unlockmenutrials); map.nexttowercolour(); break; case 1: //unlock intermissions music.playef(Sound_VIRIDIAN); game.unlock[Unlock_INTERMISSION_REPLAYS] = true; game.unlocknotify[Unlock_INTERMISSION_REPLAYS] = true; game.unlock[Unlock_INTERMISSION1_COMPLETE] = true; game.unlock[Unlock_INTERMISSION2_COMPLETE] = true; game.createmenu(Menu::unlockmenu, true); game.savestatsandsettings_menu(); break; case 2: //unlock no death mode music.playef(Sound_VIRIDIAN); game.unlock[Unlock_NODEATHMODE] = true; game.unlocknotify[Unlock_NODEATHMODE] = true; game.createmenu(Menu::unlockmenu, true); game.savestatsandsettings_menu(); break; case 3: //unlock flip mode music.playef(Sound_VIRIDIAN); game.unlock[Unlock_FLIPMODE] = true; game.unlocknotify[Unlock_FLIPMODE] = true; game.createmenu(Menu::unlockmenu, true); game.savestatsandsettings_menu(); break; case 4: //unlock jukebox music.playef(Sound_VIRIDIAN); game.stat_trinkets = 20; game.createmenu(Menu::unlockmenu, true); game.savestatsandsettings_menu(); break; case 5: //unlock secret lab music.playef(Sound_VIRIDIAN); game.unlock[Unlock_SECRETLAB] = true; game.unlocknotify[Unlock_SECRETLAB] = true; game.createmenu(Menu::unlockmenu, true); game.savestatsandsettings_menu(); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits2, true); map.nexttowercolour(); break; case 1: //last page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits6, true); map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits2: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits25, true); map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits, true); map.nexttowercolour(); break; case 2: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits25: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits_localisations_implementation, true); map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits2, true); map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits_localisations_implementation: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.translator_credits_pagenum = 0; game.current_credits_list_index = 0; game.createmenu(Menu::credits_localisations_translations, true); map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits25, true); map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits_localisations_translations: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.translator_credits_pagenum++; if (game.translator_credits_pagenum >= (int)SDL_arraysize(Credits::translator_pagesize)) { // No more translators. Move to the next credits section game.current_credits_list_index = 0; game.createmenu(Menu::credits3, true); } else { // There are more translators. Refresh the menu with the next ones game.current_credits_list_index = 0; for (int i = 0; i < game.translator_credits_pagenum; i += 1) { game.current_credits_list_index += Credits::translator_pagesize[i]; } game.createmenu(Menu::credits_localisations_translations, true); } map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.translator_credits_pagenum--; if (game.translator_credits_pagenum >= 0) { game.current_credits_list_index = 0; for (int i = 0; i < game.translator_credits_pagenum; i += 1) { game.current_credits_list_index += Credits::translator_pagesize[i]; } game.createmenu(Menu::credits_localisations_translations, true); }else { //No more translators. Move to the previous credits section game.current_credits_list_index = 0; game.createmenu(Menu::credits_localisations_implementation, true); } map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.current_credits_list_index = 0; game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits3: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.current_credits_list_index += 9; if (game.current_credits_list_index >= (int)SDL_arraysize(Credits::superpatrons)) { // No more super patrons. Move to the next credits section game.current_credits_list_index = 0; game.createmenu(Menu::credits4, true); } else { // There are more super patrons. Refresh the menu with the next ones game.createmenu(Menu::credits3, true); } map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.current_credits_list_index -= 9; if (game.current_credits_list_index < 0) { //No more super patrons. Move to the previous credits section game.translator_credits_pagenum = (int)SDL_arraysize(Credits::translator_pagesize) - 1; game.current_credits_list_index = 0; for (int i = 0; i < game.translator_credits_pagenum; i += 1) { game.current_credits_list_index += Credits::translator_pagesize[i]; } game.createmenu(Menu::credits_localisations_translations, true); } else { //There are more super patrons. Refresh the menu with the next ones game.createmenu(Menu::credits3, true); } map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.current_credits_list_index = 0; game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits4: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.current_credits_list_index += 14; if (game.current_credits_list_index >= (int)SDL_arraysize(Credits::patrons)) { // No more patrons. Move to the next credits section game.current_credits_list_index = 0; game.createmenu(Menu::credits5, true); } else { // There are more patrons. Refresh the menu with the next ones game.createmenu(Menu::credits4, true); } map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.current_credits_list_index -= 14; if (game.current_credits_list_index < 0) { //No more patrons. Move to the previous credits section game.current_credits_list_index = SDL_arraysize(Credits::superpatrons) - 1 - (SDL_arraysize(Credits::superpatrons)-1)%9; game.createmenu(Menu::credits3, true); } else { //There are more patrons. Refresh the menu with the next ones game.createmenu(Menu::credits4, true); } map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.current_credits_list_index = 0; game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits5: switch (game.currentmenuoption) { case 0: //next page music.playef(Sound_VIRIDIAN); game.current_credits_list_index += 9; if (game.current_credits_list_index >= (int)SDL_arraysize(Credits::githubfriends)) { // No more GitHub contributors. Move to the next credits section game.current_credits_list_index = 0; game.createmenu(Menu::credits6, true); } else { // There are more GitHub contributors. Refresh the menu with the next ones game.createmenu(Menu::credits5, true); } map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.current_credits_list_index -= 9; if (game.current_credits_list_index < 0) { //No more GitHub contributors. Move to the previous credits section game.current_credits_list_index = SDL_arraysize(Credits::patrons) - 1 - (SDL_arraysize(Credits::patrons)-1)%14; game.createmenu(Menu::credits4, true); } else { //There are more GitHub contributors. Refresh the menu with the next ones game.createmenu(Menu::credits5, true); } map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.current_credits_list_index = 0; game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::credits6: switch (game.currentmenuoption) { case 0: //first page music.playef(Sound_VIRIDIAN); game.createmenu(Menu::credits, true); map.nexttowercolour(); break; case 1: //previous page music.playef(Sound_VIRIDIAN); game.current_credits_list_index = SDL_arraysize(Credits::githubfriends) - 1 - (SDL_arraysize(Credits::githubfriends)-1)%9; game.createmenu(Menu::credits5, true); map.nexttowercolour(); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::play: { //Do we have the Secret Lab option? int sloffset = game.unlock[Unlock_SECRETLAB] ? 0 : -1; //Do we have a telesave or quicksave? int ngoffset = game.save_exists() ? 0 : -1; if (game.currentmenuoption == 0) { //continue //right, this depends on what saves you've got if (!game.save_exists()) { //You have no saves but have something unlocked, or you couldn't have gotten here music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME); } else if (!game.last_telesave.exists) { //You at least have a quicksave, or you couldn't have gotten here music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_QUICKSAVE); } else if (!game.last_quicksave.exists) { //You at least have a telesave, or you couldn't have gotten here music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_TELESAVE); } else { //go to a menu! music.playef(Sound_VIRIDIAN); game.loadsummary(); //Prepare save slots to display game.createmenu(Menu::continuemenu); } } else if (game.currentmenuoption == 1 && game.unlock[Unlock_SECRETLAB]) { music.playef(Sound_VIRIDIAN); startmode(Start_SECRETLAB); } else if (game.currentmenuoption == sloffset+2) { //play modes music.playef(Sound_VIRIDIAN); game.createmenu(Menu::playmodes); map.nexttowercolour(); } else if (game.currentmenuoption == sloffset+3 && game.save_exists()) { //newgame music.playef(Sound_VIRIDIAN); game.createmenu(Menu::newgamewarning); map.nexttowercolour(); } else if (game.currentmenuoption == sloffset+ngoffset+4) { //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } break; } case Menu::newgamewarning: switch (game.currentmenuoption) { case 0: //yep music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME); game.deletequick(); game.deletetele(); break; default: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::controller: switch (game.currentmenuoption) { case 0: key.sensitivity++; music.playef(Sound_VIRIDIAN); if(key.sensitivity > 4) { key.sensitivity = 0; } game.savestatsandsettings_menu(); break; case 6: music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::cleardatamenu: switch (game.currentmenuoption) { case 0: //back music.playef(Sound_VIRIDIAN); break; default: //yep music.playef(Sound_DESTROY); game.deletequick(); game.deletetele(); game.deletestats(); game.deletesettings(); game.flashlight = 5; game.screenshake = 15; break; } game.returnmenu(); map.nexttowercolour(); break; case Menu::clearcustomdatamenu: switch (game.currentmenuoption) { default: music.playef(Sound_VIRIDIAN); break; case 1: game.deletecustomlevelstats(); FILESYSTEM_deleteLevelSaves(); music.playef(Sound_DESTROY); game.flashlight = 5; game.screenshake = 15; break; } game.returnmenu(); map.nexttowercolour(); break; case Menu::playmodes: if (game.currentmenuoption == 0 && !game.nocompetitive_unless_translator()) //go to the time trial menu { music.playef(Sound_VIRIDIAN); game.createmenu(Menu::timetrials); map.nexttowercolour(); } else if (game.currentmenuoption == 1 && game.unlock[Unlock_INTERMISSION_REPLAYS]) { //intermission mode menu music.playef(Sound_VIRIDIAN); game.createmenu(Menu::intermissionmenu); map.nexttowercolour(); } else if (game.currentmenuoption == 2 && game.unlock[Unlock_NODEATHMODE] && !game.nocompetitive()) //start a game in no death mode { music.playef(Sound_VIRIDIAN); game.createmenu(Menu::startnodeathmode); map.nexttowercolour(); } else if (game.currentmenuoption == 3 && game.unlock[Unlock_FLIPMODE]) //enable/disable flip mode { toggleflipmode(); } else if (game.currentmenuoption == 4) { //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } else { //Can't do yet! music.playef(Sound_CRY); } break; case Menu::startnodeathmode: switch (game.currentmenuoption) { case 0: //start no death mode, disabling cutscenes music.playef(Sound_VIRIDIAN); startmode(Start_NODEATHMODE_NOCUTSCENES); break; case 1: music.playef(Sound_VIRIDIAN); startmode(Start_NODEATHMODE_WITHCUTSCENES); break; case 2: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::continuemenu: switch (game.currentmenuoption) { case 0: music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_TELESAVE); break; case 1: music.playef(Sound_VIRIDIAN); startmode(Start_MAINGAME_QUICKSAVE); break; case 2: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::intermissionmenu: switch (game.currentmenuoption) { case 0: music.playef(Sound_VIRIDIAN); game.createmenu(Menu::playint1); map.nexttowercolour(); break; case 1: music.playef(Sound_VIRIDIAN); game.createmenu(Menu::playint2); map.nexttowercolour(); break; case 2: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::playint1: switch (game.currentmenuoption) { case 0: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VITELLARY); break; case 1: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VERMILION); break; case 2: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VERDIGRIS); break; case 3: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION1_VICTORIA); break; case 4: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::playint2: switch (game.currentmenuoption) { case 0: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VITELLARY); break; case 1: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VERMILION); break; case 2: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VERDIGRIS); break; case 3: music.playef(Sound_VIRIDIAN); startmode(Start_INTERMISSION2_VICTORIA); break; case 4: //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; } break; case Menu::gameover2: //back music.playef(Sound_VIRIDIAN); music.play(Music_PRESENTINGVVVVVV); game.returntomenu(Menu::playmodes); map.nexttowercolour(); break; case Menu::unlocktimetrials: case Menu::unlocktimetrial: case Menu::unlocknodeathmode: case Menu::unlockintermission: case Menu::unlockflipmode: //back music.playef(Sound_VIRIDIAN); game.createmenu(Menu::play, true); map.nexttowercolour(); break; case Menu::timetrials: if (game.currentmenuoption == 0 && game.unlock[Unlock_TIMETRIAL_SPACESTATION1]) { music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_SPACESTATION1); } else if (game.currentmenuoption == 1 && game.unlock[Unlock_TIMETRIAL_LABORATORY]) { music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_LABORATORY); } else if (game.currentmenuoption == 2 && game.unlock[Unlock_TIMETRIAL_TOWER]) { music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_TOWER); } else if (game.currentmenuoption == 3 && game.unlock[Unlock_TIMETRIAL_SPACESTATION2]) { music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_SPACESTATION2); } else if (game.currentmenuoption == 4 && game.unlock[Unlock_TIMETRIAL_WARPZONE]) { music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_WARPZONE); } else if (game.currentmenuoption == 5 && game.unlock[Unlock_TIMETRIAL_FINALLEVEL]) { music.playef(Sound_VIRIDIAN); startmode(Start_TIMETRIAL_FINALLEVEL); } else if (game.currentmenuoption == 6) { //back music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); } else { //Can't do yet! music.playef(Sound_CRY); } break; case Menu::timetrialcomplete3: switch (game.currentmenuoption) { case 0: //back music.playef(Sound_VIRIDIAN); music.play(Music_PRESENTINGVVVVVV); game.returntomenu(Menu::timetrials); map.nexttowercolour(); /* FIXME: This is kinda bad kludge... but if we unlocked No Death Mode * while in a Time Trial, the player wouldn't be notified until they went * back to Menu::play first. This is the only case where something can be * unlocked without being immediately notified after returning to title. */ if (game.can_unlock_ndm()) { game.unlock_ndm(); } break; case 1: /* Replay time trial */ music.playef(Sound_VIRIDIAN); startmode((enum StartMode) (game.timetriallevel + Start_FIRST_TIMETRIAL)); break; } break; case Menu::gamecompletecontinue: case Menu::nodeathmodecomplete2: music.play(Music_PRESENTINGVVVVVV); music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; case Menu::errorsavingsettings: if (game.currentmenuoption == 1) { game.silence_settings_error = true; } music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; case Menu::errorloadinglevel: case Menu::warninglevellist: music.playef(Sound_VIRIDIAN); game.returnmenu(); map.nexttowercolour(); break; default: break; } } void titleinput(void) { //game.mx = (mouseX / 4); //game.my = (mouseY / 4); game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; game.press_interact = false; bool lang_press_horizontal = false; if (graphics.flipmode) { 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 (game.currentmenuname == Menu::language) { if (key.isDown(KEYBOARD_UP) || key.isDown(KEYBOARD_w) || key.controllerWantsUp()) { game.press_left = true; } if (key.isDown(KEYBOARD_DOWN) || key.isDown(KEYBOARD_s) || key.controllerWantsDown()) { game.press_right = true; } if (key.isDown(KEYBOARD_LEFT) || key.isDown(KEYBOARD_a) || key.controllerWantsLeft(false) || key.isDown(KEYBOARD_RIGHT) || key.isDown(KEYBOARD_d) || key.controllerWantsRight(false)) { lang_press_horizontal = true; game.press_right = true; } } else { SDL_Keycode left, right, a, d; bool controller_up = key.controllerWantsUp(); bool controller_down = key.controllerWantsDown(); if (!font::is_rtl(PR_FONT_INTERFACE)) { left = KEYBOARD_LEFT; right = KEYBOARD_RIGHT; a = KEYBOARD_a; d = KEYBOARD_d; controller_up |= key.controllerWantsLeft(false); controller_down |= key.controllerWantsRight(false); } else { left = KEYBOARD_RIGHT; right = KEYBOARD_LEFT; a = KEYBOARD_d; d = KEYBOARD_a; controller_up |= key.controllerWantsRight(false); controller_down |= key.controllerWantsLeft(false); } if (key.isDown(left) || key.isDown(KEYBOARD_UP) || key.isDown(a) || key.isDown(KEYBOARD_w) || controller_up) { game.press_left = true; } if (key.isDown(right) || key.isDown(KEYBOARD_DOWN) || key.isDown(d) || key.isDown(KEYBOARD_s) || controller_down) { 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 && !key.isDown(27) && !key.isDown(game.controllerButton_esc)) game.jumpheld = false; if (!game.press_map) game.mapheld = false; if (!game.jumpheld && graphics.fademode == FADE_NONE) { if (game.press_action || game.press_left || game.press_right || game.press_map || key.isDown(27) || key.isDown(game.controllerButton_esc)) { game.jumpheld = true; } static bool controller_held = false; if ( game.currentmenuname == Menu::controller && game.currentmenuoption > 0 && game.currentmenuoption < 6 && (game.separate_interact || game.currentmenuoption < 5) && key.controllerButtonDown() ) { if (!controller_held) { controller_held = true; updatebuttonmappings(game.currentmenuoption); game.savestatsandsettings_menu(); } return; } else { controller_held = false; } if (game.menustart && game.menucountdown <= 0 && (key.isDown(27) || key.isDown(game.controllerButton_esc))) { if (game.currentmenuname == Menu::language && loc::pre_title_lang_menu) { /* Don't exit from the initial language screen, * you can't do this on the loading/title screen either. */ return; } else { music.playef(Sound_VIRIDIAN); } if (game.menutestmode) { game.menutestmode = false; game.returnmenu(); map.nexttowercolour(); } else if (game.currentmenuname == Menu::mainmenu) { game.createmenu(Menu::youwannaquit); map.nexttowercolour(); } else { if (game.slidermode != SLIDER_NONE) { switch (game.slidermode) { /* Cancel volume change. */ case SLIDER_MUSICVOLUME: case SLIDER_SOUNDVOLUME: if (user_changing_volume == NULL) { SDL_assert(0 && "user_changing_volume is NULL!"); break; } *user_changing_volume = previous_volume; deinitvolumeslider(); break; default: SDL_assert(0 && "Unhandled slider mode!"); break; } } else if (game.ingame_titlemode && game.currentmenuname == Menu::options) { game.returntoingame(); } else { game.returnmenu(); map.nexttowercolour(); } } } if(game.menustart) { if (game.slidermode == SLIDER_NONE) { if (game.currentmenuname == Menu::language) { /* The language screen has two columns and navigation in four directions. * The second column may have one less option than the first. */ int n_options = game.menuoptions.size(); int twocol_voptions = n_options - (n_options/2); if (lang_press_horizontal) { if (game.currentmenuoption < twocol_voptions) { game.currentmenuoption += twocol_voptions; if (game.currentmenuoption >= n_options) { game.currentmenuoption = n_options - 1; } } else { game.currentmenuoption -= twocol_voptions; } } else { /* Vertical movement */ int min_option; int max_option; if (game.currentmenuoption < twocol_voptions) { min_option = 0; max_option = twocol_voptions-1; } else { min_option = twocol_voptions; max_option = n_options-1; } if (game.press_left) /* Up, lol */ { game.currentmenuoption--; if (game.currentmenuoption < min_option) { game.currentmenuoption = max_option; } } else if (game.press_right) /* Down, lol */ { game.currentmenuoption++; if (game.currentmenuoption > max_option) { game.currentmenuoption = min_option; } } } } else if (game.press_left) { game.currentmenuoption--; } else if (game.press_right) { game.currentmenuoption++; } if (game.currentmenuname == Menu::controller && (game.press_left || game.press_right)) { game.gpmenu_confirming = false; } } else { slidermodeinput(); } } if (game.currentmenuoption < 0) game.currentmenuoption = game.menuoptions.size()-1; if (game.currentmenuoption >= (int) game.menuoptions.size() ) game.currentmenuoption = 0; if (game.press_action) { if (!game.menustart) { game.menustart = true; music.play(Music_PRESENTINGVVVVVV); music.playef(Sound_GAMESAVED); game.screenshake = 10; game.flashlight = 5; } else { menuactionpress(); } } } if (fadetomode) { handlefadetomode(); } } void gameinput(void) { //TODO mouse input //game.mx = (mouseX / 2); //game.my = (mouseY / 2); if(!script.running) { if (roomname_translator::enabled && roomname_translator::overlay_input()) { return; } game.press_left = false; game.press_right = false; game.press_action = false; game.press_interact = false; 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_e) || key.isDown(game.controllerButton_interact)) { game.press_interact = true; } } game.press_map = false; if (key.isDown(KEYBOARD_ENTER) || key.isDown(SDLK_KP_ENTER) || key.isDown(game.controllerButton_map) ) { game.press_map = true; } level_debugger::input(); if (level_debugger::is_pausing()) { return; } 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 (GlitchrunnerMode_less_than_or_equal(Glitchrunner2_0) || !game.glitchrunkludge) { game.state++; game.unlockstate(); } game.jumpheld = true; game.glitchrunkludge=true; //Bug fix! You should only be able to do this ONCE. //...Unless you're in glitchrunner mode } } } if (!game.press_map //Extra conditionals as a kludge fix so if you open the quit menu during //the script command gamemode(teleporter) and close it with Esc, it won't //immediately open again //We really need a better input system soon... && !key.isDown(27) && !key.isDown(game.controllerButton_esc)) { game.mapheld = false; } if (!game.press_interact) { game.interactheld = false; } if (game.intimetrial && graphics.fademode == FADE_FULLY_BLACK && game.quickrestartkludge && !game.translator_exploring) { //restart the time trial game.quickrestartkludge = false; script.startgamemode((enum StartMode) (game.timetriallevel + Start_FIRST_TIMETRIAL)); game.deathseq = -1; game.completestop = false; game.hascontrol = false; } //Returning to editor mode must always be possible if (map.custommode && !map.custommodeforreal) { if ((game.press_map || key.isDown(27)) && !game.mapheld) { if (!game.separate_interact && game.press_map && (INBOUNDS_VEC(game.activeactivity, obj.blocks) || (game.activetele && game.readytotele > 20))) { /* Pass, let code block below handle it */ } else { game.returntoeditor(); game.mapheld = true; } } } //Entity type 0 is player controled bool has_control = false; bool enter_pressed = game.press_map && !game.mapheld; bool enter_already_processed = false; bool interact_pressed; if (game.separate_interact) { interact_pressed = game.press_interact && !game.interactheld; } else { interact_pressed = enter_pressed; } for (size_t ie = 0; ie < obj.entities.size(); ++ie) { if (obj.entities[ie].rule == 0) { if (game.hascontrol && game.deathseq == -1 && game.lifeseq <= 5) { has_control = true; if (interact_pressed) { game.interactheld = true; if (!game.separate_interact) { game.mapheld = true; } } if (interact_pressed && !script.running) { if (game.activetele && game.readytotele > 20 && (!game.intimetrial || game.translator_exploring_allowtele)) { enter_already_processed = true; if(int(SDL_fabsf(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(); int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].colour = EntityColour_TELEPORTER_FLASHING; } int teleporter = obj.getteleporter(); if (INBOUNDS_VEC(teleporter, obj.entities)) { obj.entities[teleporter].tile = 6; obj.entities[teleporter].colour = EntityColour_TELEPORTER_FLASHING; } //which teleporter script do we use? it depends on the companion! game.setstate(4000); game.setstatedelay(0); } else if (game.companion == 0 && !game.translator_exploring_allowtele) { //Alright, normal teleporting game.mapmenuchange(TELEPORTERMODE, true); game.useteleporter = true; game.initteleportermode(); } else { //We're teleporting! Yey! game.activetele = false; game.hascontrol = false; music.fadeout(); int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].colour = EntityColour_TELEPORTER_FLASHING; } int companion = obj.getcompanion(); if(INBOUNDS_VEC(companion, obj.entities)) obj.entities[companion].colour = EntityColour_TELEPORTER_FLASHING; int teleporter = obj.getteleporter(); if (INBOUNDS_VEC(teleporter, obj.entities)) { obj.entities[teleporter].tile = 6; obj.entities[teleporter].colour = EntityColour_TELEPORTER_FLASHING; } //which teleporter script do we use? it depends on the companion! game.setstate(3000); game.setstatedelay(0); } } } else if (INBOUNDS_VEC(game.activeactivity, obj.blocks)) { enter_already_processed = true; if((int(SDL_fabsf(obj.entities[ie].vx))<=1) && (int(obj.entities[ie].vy) == 0) ) { script.load(obj.blocks[game.activeactivity].script); obj.disableblock(game.activeactivity); game.activeactivity = -1; } } } if(game.press_left) { obj.entities[ie].ax = -3; obj.entities[ie].dir = 0; } else if (game.press_right) { obj.entities[ie].ax = 3; obj.entities[ie].dir = 1; } } } } if (has_control) { if (game.press_left) { game.tapleft++; } else { if (game.tapleft <= 4 && game.tapleft > 0) { for (size_t ie = 0; ie < obj.entities.size(); ++ie) { if (obj.entities[ie].rule == 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) { for (size_t ie = 0; ie < obj.entities.size(); ++ie) { if (obj.entities[ie].rule == 0) { if (obj.entities[ie].vx > 0.0f) { obj.entities[ie].vx = 0.0f; } } } } game.tapright = 0; } if (!game.press_action) { game.jumppressed = 0; game.jumpheld = false; } if (game.press_action && !game.jumpheld) { game.jumppressed = 5; game.jumpheld = true; } std::vector player_entities; for (size_t ie = 0; ie < obj.entities.size(); ie++) { if (obj.entities[ie].rule == 0) { player_entities.push_back(ie); } } for (size_t ie = 0; ie < obj.entities.size(); ie++) { const bool process_flip = obj.entities[ie].rule == 0 && game.jumppressed > 0; if (!process_flip) { continue; } game.jumppressed--; if (obj.entities[ie].onground > 0 && game.gravitycontrol == 0) { game.gravitycontrol = 1; for (size_t j = 0; j < player_entities.size(); j++) { const size_t e = player_entities[j]; if (obj.entities[e].onground > 0 || obj.entities[e].onroof > 0) { obj.entities[e].vy = -4; obj.entities[e].ay = -3; } } music.playef(Sound_FLIP); game.jumppressed = 0; game.totalflips++; } if (obj.entities[ie].onroof > 0 && game.gravitycontrol == 1) { game.gravitycontrol = 0; for (size_t j = 0; j < player_entities.size(); j++) { const size_t e = player_entities[j]; if (obj.entities[e].onground > 0 || obj.entities[e].onroof > 0) { obj.entities[e].vy = 4; obj.entities[e].ay = 3; } } music.playef(Sound_UNFLIP); 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; } } /* The rest of the if-tree runs only if enter is pressed and it has not * already been processed with 'separate interact' off. */ if (!enter_pressed || (enter_already_processed && !game.separate_interact)) { // Do nothing } else if (game.swnmode == 1 && (game.swngame == SWN_SUPERGRAVITRON || game.swngame == SWN_START_SUPERGRAVITRON_STEP_1 || game.swngame == SWN_START_SUPERGRAVITRON_STEP_2)) { //quitting the super gravitron game.mapheld = true; //Quit menu, same conditions as in game menu game.mapmenuchange(MAPMODE, true); game.gamesaved = false; game.gamesavefailed = false; game.menupage = 20; // The Map Page } else if (game.intimetrial && graphics.fademode == FADE_NONE && !game.translator_exploring) { //Quick restart of time trial graphics.fademode = FADE_START_FADEOUT; game.completestop = true; music.fadeout(); game.quickrestartkludge = true; } else if (game.intimetrial && !game.translator_exploring) { //Do nothing if we're in a Time Trial but a fade animation is playing } else if (map.custommode && !map.custommodeforreal) { // We're playtesting in the editor so don't do anything } else { //Normal map screen, do transition later game.mapmenuchange(MAPMODE, true); map.cursordelay = 0; map.cursorstate = 0; game.gamesaved = false; game.gamesavefailed = false; if (script.running) { game.menupage = 3; // Only allow saving } else { game.menupage = 0; // The Map Page } } if (!game.mapheld && (key.isDown(27) || key.isDown(game.controllerButton_esc)) && (!map.custommode || map.custommodeforreal)) { game.mapheld = true; //Quit menu, same conditions as in game menu game.mapmenuchange(MAPMODE, true); game.gamesaved = false; game.gamesavefailed = false; game.menupage = 30; // Pause screen } if (game.deathseq == -1 && (key.isDown(SDLK_r) || key.isDown(game.controllerButton_restart)) && !game.nodeathmode)// && map.custommode) //Have fun glitchrunners! { game.deathseq = 30; } } static void mapmenuactionpress(bool version2_2); void mapinput(void) { const bool version2_2 = GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2); //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; game.press_interact = false; if (version2_2 && graphics.fademode == FADE_FULLY_BLACK && graphics.menuoffset == 0) { // Deliberate re-addition of the glitchy gamestate-based fadeout! // First of all, detecting a black screen means if the glitchy fadeout // gets interrupted but you're still on a black screen, opening a menu // immediately quits you to the title. This has the side effect that if // you accidentally press Esc during a cutscene when it's black, you'll // immediately be quit and lose all your progress, but that's fair in // glitchrunner mode. // Also have to check graphics.menuoffset so this doesn't run every frame // Have to close the menu in order to run gamestates graphics.resumegamemode = true; // Remove half-second delay graphics.menuoffset = 250; // Technically this was in <=2.2 as well obj.removeallblocks(); if (game.menupage >= 20 && game.menupage <= 21) { game.setstate(96); game.setstatedelay(0); } else { // Produces more glitchiness! Necessary for credits warp to work. script.running = false; graphics.textboxes.clear(); game.setstate(80); game.setstatedelay(0); } } if (game.fadetomenu && !version2_2) { if (game.fadetomenudelay > 0) { game.fadetomenudelay--; } else { game.quittomenu(); music.play(Music_PRESENTINGVVVVVV); // should be after game.quittomenu() game.fadetomenu = false; } } if (game.fadetolab && !version2_2) { if (game.fadetolabdelay > 0) { game.fadetolabdelay--; } else { game.returntolab(); game.fadetolab = false; } } if(graphics.menuoffset==0 && ((!version2_2 && !game.fadetomenu && game.fadetomenudelay <= 0 && !game.fadetolab && game.fadetolabdelay <= 0) || graphics.fademode == FADE_NONE)) { SDL_Keycode left, right, a, d; bool controller_up = key.controllerWantsUp(); bool controller_down = key.controllerWantsDown(); if (!font::is_rtl(PR_FONT_INTERFACE)) { left = KEYBOARD_LEFT; right = KEYBOARD_RIGHT; a = KEYBOARD_a; d = KEYBOARD_d; controller_up |= key.controllerWantsLeft(false); controller_down |= key.controllerWantsRight(false); } else { left = KEYBOARD_RIGHT; right = KEYBOARD_LEFT; a = KEYBOARD_d; d = KEYBOARD_a; controller_up |= key.controllerWantsRight(false); controller_down |= key.controllerWantsLeft(false); } if (key.isDown(left) || key.isDown(KEYBOARD_UP) || key.isDown(a) || key.isDown(KEYBOARD_w)|| controller_up) { game.press_left = true; } if (key.isDown(right) || key.isDown(KEYBOARD_DOWN) || key.isDown(d) || key.isDown(KEYBOARD_s)|| controller_down) { 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 < 12 || (game.menupage >= 20 && game.menupage <= 21) || (game.menupage >= 30 && game.menupage <= 32)) { if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map) ) game.press_map = true; if (key.isDown(27) && !game.mapheld) { game.mapheld = true; if (game.menupage < 9 || (game.menupage >= 20 && game.menupage <= 21)) { game.menupage = 30; } else if (game.menupage < 12) { game.menupage = 32; } else { graphics.resumegamemode = true; } music.playef(Sound_VIRIDIAN); } } 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 graphics.resumegamemode = true; } } if (!game.jumpheld) { if (game.press_action || game.press_left || game.press_right || game.press_map) { game.jumpheld = true; } if (script.running && game.menupage == 3) { // Force the player to stay in the SAVE tab while in a cutscene } else if (game.press_left) { game.menupage--; } else if (game.press_right) { game.menupage++; } if (game.press_action) { mapmenuactionpress(version2_2); } 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; if (game.menupage == 29) game.menupage = 32; if (game.menupage == 33) game.menupage = 30; } } static void mapmenuactionpress(const bool version2_2) { switch (game.menupage) { case 1: if (obj.flags[67] && !game.inspecial() && !map.custommode) { //Warp back to the ship graphics.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(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_TELEPORTER_FLASHING; } //which teleporter script do we use? it depends on the companion! game.setstate(4000); game.setstatedelay(0); game.lockstate(); } break; case 3: if (!game.gamesaved && !game.gamesavefailed && !game.inspecial()) { game.flashlight = 5; game.screenshake = 10; music.playef(Sound_GAMESAVED); game.savetime = game.timestring(); game.savetrinkets = game.trinkets(); bool success; if(map.custommodeforreal) { success = game.customsavequick(cl.ListOfMetaData[game.playcustomlevel].filename); } else { success = game.savequick(); } game.gamesaved = success; game.gamesavefailed = !success; } break; case 10: //return to pause menu music.playef(Sound_VIRIDIAN); game.menupage = 32; break; case 11: //quit to menu graphics.fademode = FADE_START_FADEOUT; music.fadeout(); map.nexttowercolour(); if (!version2_2) { game.fadetomenu = true; game.fadetomenudelay = 19; } music.playef(Sound_VIRIDIAN); break; case 20: //return to game graphics.resumegamemode = true; music.playef(Sound_VIRIDIAN); break; case 21: //quit to menu game.swnmode = false; graphics.fademode = FADE_START_FADEOUT; music.fadeout(); if (!version2_2) { game.fadetolab = true; game.fadetolabdelay = 19; } music.playef(Sound_VIRIDIAN); break; case 30: // Return to game graphics.resumegamemode = true; music.playef(Sound_VIRIDIAN); break; case 31: // Graphic options and game options music.playef(Sound_VIRIDIAN); game.gamestate = TITLEMODE; graphics.flipmode = false; game.ingame_titlemode = true; graphics.ingame_fademode = graphics.fademode; graphics.fademode = FADE_NONE; // Set this before we create the menu game.kludge_ingametemp = game.currentmenuname; game.createmenu(Menu::options); map.nexttowercolour(); break; case 32: // Go to quit prompt music.playef(Sound_VIRIDIAN); game.menupage = 10; break; } } void teleporterinput(void) { //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; game.press_interact = false; if(graphics.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 (!game.separate_interact && (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map))) { game.press_map = true; } if (key.isDown(KEYBOARD_e) || key.isDown(game.controllerButton_interact)) { game.press_interact = 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.press_interact) game.jumpheld = false; if (!game.press_map) game.mapheld = false; if (key.isDown(27)) { if (!map.custommode || map.custommodeforreal) { // Go to pause menu game.mapheld = true; game.menupage = 30; game.gamestate = MAPMODE; } else { // Close teleporter menu graphics.resumegamemode = true; } music.playef(Sound_VIRIDIAN); } } else { game.mapheld = true; game.jumpheld = true; } if (!game.jumpheld) { if (game.press_action || game.press_left || game.press_right || game.press_map || game.press_interact) { game.jumpheld = true; } bool any_tele_unlocked = false; if (game.press_left || game.press_right) { for (size_t i = 0; i < map.teleporters.size(); i++) { SDL_Point& tele = map.teleporters[i]; if (map.isexplored(tele.x, tele.y)) { any_tele_unlocked = true; break; } } } if (game.press_left && any_tele_unlocked) { do { game.teleport_to_teleporter--; if (game.teleport_to_teleporter < 0) game.teleport_to_teleporter = map.teleporters.size() - 1; tempx = map.teleporters[game.teleport_to_teleporter].x; tempy = map.teleporters[game.teleport_to_teleporter].y; } while (!map.isexplored(tempx, tempy)); } else if (game.press_right && any_tele_unlocked) { do { game.teleport_to_teleporter++; if (game.teleport_to_teleporter >= (int) map.teleporters.size()) game.teleport_to_teleporter = 0; tempx = map.teleporters[game.teleport_to_teleporter].x; tempy = map.teleporters[game.teleport_to_teleporter].y; } while (!map.isexplored(tempx, tempy)); } if ((game.separate_interact && game.press_interact) || 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! graphics.resumegamemode = true; } else { //teleport graphics.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(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_TELEPORTER_FLASHING; } i = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 6; obj.entities[i].colour = EntityColour_TELEPORTER_FLASHING; } //which teleporter script do we use? it depends on the companion! game.setstate(4000); game.setstatedelay(0); } } } } void gamecompleteinput(void) { game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; game.press_interact = false; //Do this before we update map.bypos if (!game.colourblindmode) { graphics.updatetowerbackground(graphics.titlebg); } //Do these here because input comes first graphics.titlebg.bypos += graphics.titlebg.bscroll; game.oldcreditposition = game.creditposition; if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip)) { game.creditposition -= 6; if (game.creditposition <= -Credits::creditmaxposition) { if (graphics.fademode == FADE_NONE) { graphics.fademode = FADE_START_FADEOUT; } game.creditposition = -Credits::creditmaxposition; } else { graphics.titlebg.bscroll = +7; } game.press_action = true; } if (key.isDown(KEYBOARD_ENTER)|| key.isDown(game.controllerButton_map)) game.press_map = true; if (!game.mapheld) { if(game.press_map) { //Return to game if(graphics.fademode == FADE_NONE) { graphics.fademode = FADE_START_FADEOUT; } } } if (!game.press_map) { game.mapheld = false; } } void gamecompleteinput2(void) { game.press_left = false; game.press_right = false; game.press_action = false; game.press_map = false; game.press_interact = false; //Do this here because input comes first game.oldcreditposx = game.creditposx; if (key.isDown(KEYBOARD_z) || key.isDown(KEYBOARD_SPACE) || key.isDown(KEYBOARD_v) || key.isDown(game.controllerButton_flip)) { game.creditposx++; game.oldcreditposx++; if (game.creditposy >= 30) { if(graphics.fademode == FADE_NONE) { graphics.fademode = FADE_START_FADEOUT; music.fadeout(); } } game.press_action = true; } if (key.isDown(KEYBOARD_ENTER) || key.isDown(game.controllerButton_map)) game.press_map = true; if (!game.mapheld) { if(game.press_map) { //Return to game if(graphics.fademode == FADE_NONE) { graphics.fademode = FADE_START_FADEOUT; music.fadeout(); } } } if (!game.press_map) { game.mapheld = false; } } ================================================ FILE: desktop_version/src/Input.h ================================================ #ifndef INPUT_H #define INPUT_H void titleinput(void); void gameinput(void); void mapinput(void); void teleporterinput(void); void gamecompleteinput(void); void gamecompleteinput2(void); #endif /* INPUT_H */ ================================================ FILE: desktop_version/src/InterimVersion.h ================================================ #ifndef INTERIMVERSION_H #define INTERIMVERSION_H #ifdef INTERIM_VERSION_EXISTS #ifdef __cplusplus extern "C" { #endif extern const char* INTERIM_COMMIT; extern const char* COMMIT_DATE; extern const char* BRANCH_NAME; #ifdef __cplusplus } /* extern "C" */ #endif #endif /* INTERIM_VERSION_EXISTS */ #endif /* INTERIMVERSION_H */ ================================================ FILE: desktop_version/src/InterimVersion.in.c ================================================ const char* INTERIM_COMMIT = "@INTERIM_COMMIT@"; const char* COMMIT_DATE = "@COMMIT_DATE@"; const char* BRANCH_NAME = "@BRANCH_NAME@"; ================================================ FILE: desktop_version/src/KeyPoll.cpp ================================================ #define KEY_DEFINITION #include "KeyPoll.h" #include #include "Alloc.h" #include "ButtonGlyphs.h" #include "Constants.h" #include "Editor.h" #include "Exit.h" #include "Game.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "GraphicsUtil.h" #include "Localization.h" #include "LocalizationMaint.h" #include "LocalizationStorage.h" #include "Music.h" #include "Screen.h" #include "UTF8.h" #include "UtilityClass.h" #include "Vlogging.h" bool SaveScreenshot(void); int inline KeyPoll::getThreshold(void) { switch (sensitivity) { case 0: return 28000; case 1: return 16000; case 2: return 8000; case 3: return 4000; case 4: return 2000; } return 8000; } KeyPoll::KeyPoll(void) { xVel = 0; yVel = 0; // 0..5 sensitivity = 2; keybuffer = ""; imebuffer = ""; imebuffer_start = 0; imebuffer_length = 0; leftbutton=0; rightbutton=0; middlebutton=0; mousex = 0; mousey = 0; resetWindow = 0; pressedbackspace=false; linealreadyemptykludge = false; isActive = true; } void KeyPoll::enabletextentry(void) { keybuffer = ""; imebuffer = ""; imebuffer_start = 0; imebuffer_length = 0; SDL_StartTextInput(); } void KeyPoll::disabletextentry(void) { SDL_StopTextInput(); imebuffer = ""; imebuffer_start = 0; imebuffer_length = 0; } bool KeyPoll::textentry(void) { return SDL_IsTextInputActive() == SDL_TRUE; } void KeyPoll::toggleFullscreen(void) { gameScreen.toggleFullScreen(); keymap.clear(); /* we lost the input due to a new window. */ if (GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { game.press_left = false; game.press_right = false; game.press_action = true; game.press_map = false; } } static int changemousestate( int timeout, const bool show, const bool hide ) { int prev; int new_; if (timeout > 0) { return --timeout; } /* If we want to both show and hide at the same time, prioritize showing */ if (show) { new_ = SDL_ENABLE; } else if (hide) { new_ = SDL_DISABLE; } else { return timeout; } prev = SDL_ShowCursor(SDL_QUERY); if (prev == new_) { return timeout; } SDL_ShowCursor(new_); switch (new_) { case SDL_DISABLE: timeout = 0; break; case SDL_ENABLE: timeout = 30; break; } return timeout; } /* Also used in Input.cpp. */ void recomputetextboxes(void); bool cycle_language(bool should_recompute_textboxes) { extern KeyPoll key; if (game.gamestate == TITLEMODE && game.currentmenuname == Menu::translator_options_cutscenetest) { /* Unfortunately, despite how it may appear to be working, the options * are actually language-specific, and the order could be totally * different between languages too. So we can't cycle in this menu. */ music.playef(Sound_CRY); return should_recompute_textboxes; } if (game.translator_cutscene_test) { /* Refuse cycling here for similar reasons, even if it seems like it's * working. The text boxes are based off of the language XML and * could be completely different between languages. */ music.playef(Sound_CRY); return should_recompute_textboxes; } int i = loc::languagelist_curlang; if (key.keymap[SDLK_LSHIFT]) { /* Backwards */ i--; } else { /* Forwards */ i++; } if (!loc::languagelist.empty()) { i = POS_MOD(i, (int) loc::languagelist.size()); loc::languagelist_curlang = i; loc::lang = loc::languagelist[i].code; loc::loadtext(false); graphics.grphx.init_translations(); should_recompute_textboxes = true; } if (game.gamestate == TITLEMODE || (game.gamestate == EDITORMODE && ed.state == EditorState_MENU)) { if (game.currentmenuname == Menu::translator_options_limitscheck) { loc::local_limits_check(); } int temp = game.menucountdown; game.createmenu(game.currentmenuname, true); game.menucountdown = temp; if (game.currentmenuname == Menu::language) { game.currentmenuoption = i; } } return should_recompute_textboxes; } void KeyPoll::Poll(void) { static int raw_mousex = 0; static int raw_mousey = 0; static int mousetoggletimeout = 0; bool showmouse = false; bool hidemouse = false; bool altpressed = false; bool fullscreenkeybind = false; SDL_GameController *controller = NULL; SDL_Event evt; bool should_recompute_textboxes = false; bool active_input_device_changed = false; bool keyboard_was_active = BUTTONGLYPHS_keyboard_is_active(); while (SDL_PollEvent(&evt)) { switch (evt.type) { /* Keyboard Input */ case SDL_KEYDOWN: { keymap[evt.key.keysym.sym] = true; if (evt.key.keysym.sym == SDLK_BACKSPACE) { pressedbackspace = true; } #ifdef __APPLE__ /* OSX prefers the command keys over the alt keys. -flibit */ altpressed = keymap[SDLK_LGUI] || keymap[SDLK_RGUI]; #else altpressed = keymap[SDLK_LALT] || keymap[SDLK_RALT]; #endif bool returnpressed = evt.key.keysym.sym == SDLK_RETURN; bool fpressed = evt.key.keysym.sym == SDLK_f; bool f11pressed = evt.key.keysym.sym == SDLK_F11; if ((altpressed && (returnpressed || fpressed)) || f11pressed) { fullscreenkeybind = true; } if (loc::show_translator_menu && evt.key.keysym.sym == SDLK_F8 && !evt.key.repeat) { if (keymap[SDLK_LCTRL]) { /* Debug keybind to cycle language. */ should_recompute_textboxes = cycle_language(should_recompute_textboxes); } else { /* Reload language files */ loc::loadtext(false); graphics.grphx.init_translations(); music.playef(Sound_COIN); } } if (evt.key.keysym.sym == SDLK_F6 && !evt.key.repeat) { const bool success = SaveScreenshot(); game.old_screenshot_border_timer = 255; game.screenshot_border_timer = 255; game.screenshot_saved_success = success; } BUTTONGLYPHS_keyboard_set_active(true); if (textentry()) { if (evt.key.keysym.sym == SDLK_BACKSPACE && !keybuffer.empty()) { keybuffer.erase(UTF8_backspace(keybuffer.c_str(), keybuffer.length())); if (keybuffer.empty()) { linealreadyemptykludge = true; } } else if ( evt.key.keysym.sym == SDLK_v && keymap[SDLK_LCTRL] ) { char* text = SDL_GetClipboardText(); if (text != NULL) { keybuffer += text; VVV_free(text); } } else if ( evt.key.keysym.sym == SDLK_x && keymap[SDLK_LCTRL] ) { if (SDL_SetClipboardText(keybuffer.c_str()) == 0) { keybuffer = ""; } } } break; } case SDL_KEYUP: keymap[evt.key.keysym.sym] = false; if (evt.key.keysym.sym == SDLK_BACKSPACE) { pressedbackspace = false; } break; case SDL_TEXTINPUT: if (!altpressed) { keybuffer += evt.text.text; } break; case SDL_TEXTEDITING: imebuffer = evt.edit.text; imebuffer_start = evt.edit.start; imebuffer_length = evt.edit.length; break; case SDL_TEXTEDITING_EXT: imebuffer = evt.editExt.text; imebuffer_start = evt.editExt.start; imebuffer_length = evt.editExt.length; SDL_free(evt.editExt.text); break; /* Mouse Input */ case SDL_MOUSEMOTION: raw_mousex = evt.motion.x; raw_mousey = evt.motion.y; break; case SDL_MOUSEBUTTONDOWN: switch (evt.button.button) { case SDL_BUTTON_LEFT: raw_mousex = evt.button.x; raw_mousey = evt.button.y; leftbutton = 1; break; case SDL_BUTTON_RIGHT: raw_mousex = evt.button.x; raw_mousey = evt.button.y; rightbutton = 1; break; case SDL_BUTTON_MIDDLE: raw_mousex = evt.button.x; raw_mousey = evt.button.y; middlebutton = 1; break; } break; case SDL_MOUSEBUTTONUP: switch (evt.button.button) { case SDL_BUTTON_LEFT: raw_mousex = evt.button.x; raw_mousey = evt.button.y; leftbutton=0; break; case SDL_BUTTON_RIGHT: raw_mousex = evt.button.x; raw_mousey = evt.button.y; rightbutton=0; break; case SDL_BUTTON_MIDDLE: raw_mousex = evt.button.x; raw_mousey = evt.button.y; middlebutton=0; break; } break; /* Controller Input */ case SDL_CONTROLLERBUTTONDOWN: buttonmap[(SDL_GameControllerButton) evt.cbutton.button] = true; BUTTONGLYPHS_keyboard_set_active(false); controller = controllers[evt.cbutton.which]; BUTTONGLYPHS_update_layout(controller); break; case SDL_CONTROLLERBUTTONUP: buttonmap[(SDL_GameControllerButton) evt.cbutton.button] = false; break; case SDL_CONTROLLERAXISMOTION: { const int threshold = getThreshold(); switch (evt.caxis.axis) { case SDL_CONTROLLER_AXIS_LEFTX: if ( evt.caxis.value > -threshold && evt.caxis.value < threshold ) { xVel = 0; } else { xVel = (evt.caxis.value > 0) ? 1 : -1; } break; case SDL_CONTROLLER_AXIS_LEFTY: if ( evt.caxis.value > -threshold && evt.caxis.value < threshold ) { yVel = 0; } else { yVel = (evt.caxis.value > 0) ? 1 : -1; } break; } BUTTONGLYPHS_keyboard_set_active(false); controller = controllers[evt.caxis.which]; BUTTONGLYPHS_update_layout(controller); break; } case SDL_CONTROLLERDEVICEADDED: { controller = SDL_GameControllerOpen(evt.cdevice.which); vlog_info( "Opened SDL_GameController ID #%i, %s", evt.cdevice.which, SDL_GameControllerName(controller) ); controllers[SDL_JoystickInstanceID(SDL_GameControllerGetJoystick(controller))] = controller; BUTTONGLYPHS_keyboard_set_active(false); BUTTONGLYPHS_update_layout(controller); break; } case SDL_CONTROLLERDEVICEREMOVED: { controller = controllers[evt.cdevice.which]; controllers.erase(evt.cdevice.which); vlog_info("Closing %s", SDL_GameControllerName(controller)); SDL_GameControllerClose(controller); if (controllers.empty()) { BUTTONGLYPHS_keyboard_set_active(true); } break; } /* Window Events */ case SDL_WINDOWEVENT: switch (evt.window.event) { /* Window Resize */ case SDL_WINDOWEVENT_RESIZED: if (SDL_GetWindowFlags( SDL_GetWindowFromID(evt.window.windowID) ) & SDL_WINDOW_INPUT_FOCUS) { resetWindow = true; } break; /* Window Focus */ case SDL_WINDOWEVENT_FOCUS_GAINED: if (!game.disablepause) { isActive = true; if ((!game.disableaudiopause || !game.disabletemporaryaudiopause) && music.currentsong != -1) { music.resume(); music.resumeef(); } } if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0) { if (wasFullscreen) { gameScreen.isWindowed = false; SDL_SetWindowFullscreen( SDL_GetWindowFromID(evt.window.windowID), SDL_WINDOW_FULLSCREEN_DESKTOP ); } } SDL_DisableScreenSaver(); gameScreen.recacheTextures(); break; case SDL_WINDOWEVENT_FOCUS_LOST: if (!game.disablepause) { isActive = false; if (!game.disableaudiopause || !game.disabletemporaryaudiopause) { music.pause(); music.pauseef(); } } if (SDL_strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0) { wasFullscreen = !gameScreen.isWindowed; gameScreen.isWindowed = true; SDL_SetWindowFullscreen( SDL_GetWindowFromID(evt.window.windowID), 0 ); } SDL_EnableScreenSaver(); break; /* Mouse Focus */ case SDL_WINDOWEVENT_ENTER: SDL_DisableScreenSaver(); break; case SDL_WINDOWEVENT_LEAVE: SDL_EnableScreenSaver(); break; } break; /* Quit Event */ case SDL_QUIT: VVV_exit(0); break; } switch (evt.type) { case SDL_KEYDOWN: if (evt.key.repeat == 0) { hidemouse = true; } break; case SDL_TEXTINPUT: case SDL_CONTROLLERBUTTONDOWN: case SDL_CONTROLLERAXISMOTION: hidemouse = true; break; case SDL_MOUSEMOTION: case SDL_MOUSEBUTTONDOWN: showmouse = true; break; } } mousetoggletimeout = changemousestate( mousetoggletimeout, showmouse, hidemouse ); if (fullscreenkeybind) { toggleFullscreen(); } SDL_Rect rect; graphics.get_stretch_info(&rect); int window_width; int window_height; SDL_GetWindowSizeInPixels(gameScreen.m_window, &window_width, &window_height); int scaled_window_width; int scaled_window_height; SDL_GetWindowSize(gameScreen.m_window, &scaled_window_width, &scaled_window_height); float scale_x = (float)window_width / (float)scaled_window_width; float scale_y = (float)window_height / (float)scaled_window_height; // Use screen stretch information to modify the coordinates (as we implement stretching manually) mousex = ((raw_mousex * scale_x) - rect.x) * SCREEN_WIDTH_PIXELS / rect.w; mousey = ((raw_mousey * scale_y) - rect.y) * SCREEN_HEIGHT_PIXELS / rect.h; active_input_device_changed = keyboard_was_active != BUTTONGLYPHS_keyboard_is_active(); should_recompute_textboxes |= active_input_device_changed; if (should_recompute_textboxes) { recomputetextboxes(); } } bool KeyPoll::isDown(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(void) { 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 ) ) ); } bool KeyPoll::controllerWantsUp(void) { return buttonmap[SDL_CONTROLLER_BUTTON_DPAD_UP] || yVel < 0; } bool KeyPoll::controllerWantsDown(void) { return buttonmap[SDL_CONTROLLER_BUTTON_DPAD_DOWN] || yVel > 0; } ================================================ FILE: desktop_version/src/KeyPoll.h ================================================ #ifndef KEYPOLL_H #define KEYPOLL_H #include // FIXME: I should feel very bad for using C++ -flibit #include #include #include 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_e = SDLK_e, KEYBOARD_m = SDLK_m, KEYBOARD_n = SDLK_n, KEYBOARD_v = SDLK_v, KEYBOARD_z = SDLK_z, KEYBOARD_BACKSPACE = SDLK_BACKSPACE }; class KeyPoll { public: std::map keymap; bool isActive; bool resetWindow; void toggleFullscreen(void); int sensitivity; int inline getThreshold(void); KeyPoll(void); void enabletextentry(void); void disabletextentry(void); void Poll(void); bool isDown(SDL_Keycode key); bool isDown(std::vector buttons); bool isDown(SDL_GameControllerButton button); bool controllerButtonDown(void); bool controllerWantsLeft(bool includeVert); bool controllerWantsRight(bool includeVert); bool controllerWantsUp(void); bool controllerWantsDown(void); int leftbutton, rightbutton, middlebutton; int mousex; int mousey; bool textentry(void); bool pressedbackspace; std::string keybuffer; std::string imebuffer; int imebuffer_start; int imebuffer_length; bool linealreadyemptykludge; private: std::map controllers; std::map buttonmap; int xVel, yVel; Uint32 wasFullscreen; }; #ifndef KEY_DEFINITION extern KeyPoll key; #endif #endif /* KEYPOLL_H */ ================================================ FILE: desktop_version/src/Labclass.cpp ================================================ #include "Labclass.h" #include "Game.h" #include "Entity.h" #include "MakeAndPlay.h" const short* labclass::loadlevel(int rx, int ry) { 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); const short* result; rcol = 0; roomname = ""; roomname_special = false; switch(t) { #if !defined(MAKEANDPLAY) case rn(50,50): { static const short contents[] = { 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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,284,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 283,283,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, 283,283,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(232, 24, 10, 0, 250500); // (savepoint) if(game.intimetrial) { obj.createblock(0, 0, 0, 8, 240); } rcol=1; roomname = "Get Ready To Bounce"; result = contents; break; } case rn(50,51): { static const short contents[] = { 280,280,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, 280,280,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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,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(112, 180, 11, 192); // (horizontal gravity line) rcol = 0; roomname = "It's Perfectly Safe"; result = contents; break; } case rn(49,51): { static const short contents[] = { 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 292,292,292,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, 292,292,292,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, 292,292,292,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, 292,292,292,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(96, 124, 11, 120); // (horizontal gravity line) obj.createentity(248, 48, 10, 0, 251490); // (savepoint) rcol = 4; roomname = "Rascasse"; result = contents; break; } case rn(49,52): { static const short contents[] = { 286,286,286,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,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(248, 136, 10, 1, 252490); // (savepoint) obj.createentity(16, 68, 11, 64); // (horizontal gravity line) obj.createentity(112, 68, 11, 64); // (horizontal gravity line) obj.createentity(64, 164, 11, 64); // (horizontal gravity line) obj.createentity(160, 164, 11, 64); // (horizontal gravity line) rcol = 2; roomname = "Keep Going"; result = contents; break; } case rn(48,52): { static const short contents[] = { 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,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,290,450,450,450,450,450,450,450,450,450,450,450,450,450,291,289,289, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(280, 136, 10, 1, 252480); // (savepoint) obj.createentity(48, 52, 11, 104); // (horizontal gravity line) obj.createentity(192, 52, 11, 104); // (horizontal gravity line) obj.createentity(152, 196, 11, 40); // (horizontal gravity line) rcol=3; roomname = "Single-slit Experiment"; result = contents; break; } case rn(48,53): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,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(32, 128, 10, 1, 253480); // (savepoint) obj.createentity(187, 88, 12, 56); // (vertical gravity line) obj.createentity(107, 88, 12, 56); // (vertical gravity line) rcol = 5; roomname = "Don't Flip Out"; result = contents; break; } case rn(49,53): { static const short contents[] = { 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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(43, 88, 12, 56); // (vertical gravity line) obj.createentity(123, 88, 12, 56); // (vertical gravity line) obj.createentity(203, 88, 12, 56); // (vertical gravity line) obj.createentity(283, 88, 12, 56); // (vertical gravity line) obj.createentity(156, 128, 20, 1); // (terminal) obj.createblock(5, 156-8, 128, 20, 16, 19); rcol = 1; roomname = "Shuffled Hallway"; result = contents; break; } case rn(50,53): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 289,289,289,289,289,289,289,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, 289,289,289,289,289,289,289,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, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,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(96, 192, 10, 1, 253500); // (savepoint) obj.createentity(163, 32, 12, 168); // (vertical gravity line) rcol = 3; roomname = "Double-slit Experiment"; result = contents; break; } case rn(51,53): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,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(264, 104, 10, 1, 253510); // (savepoint) obj.createentity(131, 120, 12, 96); // (vertical gravity line) obj.createentity(187, 16, 12, 96); // (vertical gravity line) obj.createentity(40, 112, 10, 0, 253511); // (savepoint) rcol = 2; roomname = "They Call Him Flipper"; result = contents; break; } case rn(52,53): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,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(24, 184, 10, 1, 253520); // (savepoint) obj.createentity(64, 164, 11, 200); // (horizontal gravity line) rcol = 4; roomname = "Three's a Crowd"; result = contents; break; } case rn(52,52): { static const short contents[] = { 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 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, 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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(195, 24, 12, 80); // (vertical gravity line) obj.createentity(195, 128, 12, 80); // (vertical gravity line) obj.createentity(80, 120, 10, 0, 252520); // (savepoint) obj.createentity(80, 96, 10, 1, 252521); // (savepoint) rcol = 2; roomname = "Hitting the Apex"; result = contents; break; } case rn(51,52): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,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(24, 188, 11, 224); // (horizontal gravity line) obj.createentity(280, 96, 10, 1, 252510); // (savepoint) obj.createentity(204, 32, 20, 0); // (terminal) obj.createblock(5, 204-8, 32, 20, 16, 20); rcol=0; roomname = "Square Root"; result = contents; break; } case rn(51,51): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(24, 44, 11, 112); // (horizontal gravity line) obj.createentity(176, 180, 11, 112); // (horizontal gravity line) rcol = 4; roomname = "Thorny Exchange"; result = contents; break; } case rn(51,50): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,403,283,283, }; obj.createentity(32, 28, 11, 296); // (horizontal gravity line) obj.createentity(32, 196, 11, 112); // (horizontal gravity line) obj.createentity(128, 100, 11, 160); // (horizontal gravity line) obj.createentity(88, 112, 10, 0, 250510); // (savepoint) roomname = "Brought to you by the letter G"; rcol = 1; result = contents; break; } case rn(52,50): { static const short contents[] = { 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(-8, 28, 11, 336); // (horizontal gravity line) obj.createentity(32, 72, 10, 1, 250520); // (savepoint) rcol=2; roomname = "Free Your Mind"; result = contents; break; } case rn(52,51): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,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(80, 180, 11, 248); // (horizontal gravity line) rcol=0; roomname = "I Changed My Mind, Thelma..."; result = contents; break; } case rn(53,51): { static const short contents[] = { 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 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, 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, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,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(-8, 180, 11, 208); // (horizontal gravity line) obj.createentity(240, 180, 11, 88); // (horizontal gravity line) rcol=4; roomname = "Indirect Jump Vector"; result = contents; break; } case rn(53,50): { static const short contents[] = { 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,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, 0,0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,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(-8, 28, 11, 336); // (horizontal gravity line) rcol=5; roomname = "In a Single Bound"; result = contents; break; } case rn(54,50): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 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, 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, 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, 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, 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, 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(-8, 28, 11, 80); // (horizontal gravity line) obj.createentity(112, 28, 11, 96); // (horizontal gravity line) obj.createentity(248, 28, 11, 80); // (horizontal gravity line) rcol=1; roomname = "Barani, Barani"; result = contents; break; } case rn(54,51): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,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(-8, 180, 11, 80); // (horizontal gravity line) obj.createentity(112, 180, 11, 96); // (horizontal gravity line) obj.createentity(248, 180, 11, 80); // (horizontal gravity line) rcol=2; roomname = "Safety Dance"; result = contents; break; } case rn(55,50): { static const short contents[] = { 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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(-8, 28, 11, 40); // (horizontal gravity line) rcol=3; roomname = "Heady Heights"; result = contents; break; } case rn(55,49): { static const short contents[] = { 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,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,295, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(160, 176, 10, 0, 249550); // (savepoint) obj.createentity(224, 68, 11, 72); // (horizontal gravity line) //obj.createentity(224, 192, 10, 0, 249550); // (savepoint) if(!game.intimetrial || game.translator_exploring) { obj.createentity((12 * 8)-4, (6 * 8) + 4, 14); //Teleporter! } rcol = 5; roomname = "Entanglement Generator"; result = contents; break; } case rn(55,51): { static const short contents[] = { 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 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, 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, 280,280,280,280,280,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,280,280,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,280,280,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(-8, 180, 11, 224); // (horizontal gravity line) rcol = 0; roomname = "Exhausted?"; result = contents; break; } case rn(55,52): { static const short contents[] = { 292,292,292,292,292,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, 292,292,292,292,292,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, 292,292,292,292,292,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, 292,292,292,292,292,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, 292,292,292,292,292,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, 292,292,292,292,292,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(32, 64, 9, 10); // (shiny trinket) obj.createentity(120, 72, 10, 1, 252550); // (savepoint) rcol = 4; roomname = "The Tantalizing Trinket"; result = contents; break; } case rn(55,53): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,405,53,0,0,0,0,0,0,0,54,403,283,405,0,0,0,0,0,0,403,283,283,283, }; obj.createentity(272, 144, 10, 1, 253550); // (savepoint) obj.createentity(152, 116, 11, 56); // (horizontal gravity line) obj.createentity(139, 16, 12, 72); // (vertical gravity line) obj.createentity(139, 144, 12, 72); // (vertical gravity line) rcol=1; roomname = "The Bernoulli Principle"; result = contents; break; } case rn(55,54): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,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(216, 144, 10, 1, 254550); // (savepoint) obj.createentity(-8, 60, 11, 136); // (horizontal gravity line) obj.createentity(-8, 172, 11, 136); // (horizontal gravity line) rcol = 5; roomname = "Standing Wave"; result = contents; break; } case rn(54,54): { static const short contents[] = { 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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(-8, 60, 11, 336); // (horizontal gravity line) obj.createentity(-8, 172, 11, 336); // (horizontal gravity line) rcol=2; obj.fatal_top(); roomname = "Topsy Turvyism"; result = contents; break; } case rn(53,54): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,371,0,0,0,0,0,0,369,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,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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(-8, 60, 11, 120); // (horizontal gravity line) obj.createentity(-8, 172, 11, 40); // (horizontal gravity line) obj.createentity(264, 72, 10, 0, 254530); // (savepoint) obj.createentity(40, 144, 10, 1, 254531); // (savepoint) obj.createentity(160, 60, 11, 48); // (horizontal gravity line) obj.createentity(288, 60, 11, 40); // (horizontal gravity line) obj.createentity(112, 172, 11, 48); // (horizontal gravity line) obj.createentity(208, 172, 11, 120); // (horizontal gravity line) rcol=3; obj.fatal_top(); roomname = "Spike Strip Deployed"; result = contents; break; } case rn(52,54): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(-8, 60, 11, 336); // (horizontal gravity line) obj.createentity(-8, 172, 11, 336); // (horizontal gravity line) obj.createentity(72, 64, 1, 0, 8, 72, 64, 248, 168); // Enemy, bounded obj.createentity(232, 64, 1, 0, 8, 72, 64, 248, 168); // Enemy, bounded obj.createentity(152, 152, 1, 1, 8, 72, 64, 248, 168); // Enemy, bounded obj.fatal_top(); roomname = "Vibrating String Problem"; rcol = 5; result = contents; break; } case rn(51,54): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(176, 60, 11, 152); // (horizontal gravity line) obj.createentity(176, 172, 11, 152); // (horizontal gravity line) obj.createentity(-8, 84, 11, 160); // (horizontal gravity line) obj.createentity(-8, 148, 11, 160); // (horizontal gravity line) obj.createentity(160-4, 120, 10, 1, 254510); // (savepoint) rcol=1; obj.fatal_top(); roomname = "Merge"; result = contents; break; } case rn(50,54): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(-8, 84, 11, 336); // (horizontal gravity line) obj.createentity(-8, 148, 11, 336); // (horizontal gravity line) obj.createentity(88, 96, 1, 3, 3); // Enemy obj.createentity(40, 120, 1, 3, 3); // Enemy obj.createentity(136, 120, 1, 3, 3); // Enemy rcol = 0; obj.fatal_top(); roomname = "Kids His Age Bounce"; result = contents; break; } case rn(49,54): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(264, 84, 11, 64); // (horizontal gravity line) obj.createentity(240+4, 96, 10, 0, 254490); // (savepoint) obj.createentity(48, 28, 11, 192); // (horizontal gravity line) obj.createentity(120, 148, 11, 208); // (horizontal gravity line) rcol=2; roomname = "I'm Sorry"; result = contents; break; } case rn(49,55): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,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(48, 156, 11, 200); // (horizontal gravity line) obj.createentity(216, 56, 10, 0, 255490); // (savepoint) rcol=4; roomname = "Please Forgive Me!"; result = contents; break; } case rn(50,55): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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(131, 48, 12, 152); // (vertical gravity line) obj.createentity(179, 48, 12, 152); // (vertical gravity line) obj.createentity(227, 48, 12, 152); // (vertical gravity line) obj.createentity(275, 48, 12, 152); // (vertical gravity line) rcol=1; roomname = "Playing Foosball"; result = contents; break; } case rn(51,55): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,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(91, 168, 12, 32); // (vertical gravity line) obj.createentity(139, 80, 12, 120); // (vertical gravity line) obj.createentity(235, 104, 12, 96); // (vertical gravity line) obj.createentity(187, 144, 12, 56); // (vertical gravity line) obj.createentity(43, 48, 12, 152); // (vertical gravity line) obj.createentity(91, 48, 12, 112); // (vertical gravity line) obj.createentity(139, 48, 12, 24); // (vertical gravity line) obj.createentity(187, 48, 12, 88); // (vertical gravity line) obj.createentity(235, 48, 12, 48); // (vertical gravity line) obj.createentity(283, 48, 12, 152); // (vertical gravity line) obj.createentity(8, 48, 10, 0, 255510); // (savepoint) rcol=5; roomname = "A Difficult Chord"; result = contents; break; } case rn(52,55): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(16, 184, 10, 1, 255520); // (savepoint) obj.createentity(131, 88, 12, 96); // (vertical gravity line) obj.createentity(208, 180, 11, 40); // (horizontal gravity line) obj.createentity(67, 56, 12, 80); // (vertical gravity line) obj.createentity(195, 56, 12, 80); // (vertical gravity line) rcol = 0; roomname = "The Living Dead End"; result = contents; break; } case rn(52,56): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(52,57): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(50,52): { static const short contents[] = { 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 280,280,280,280,280,280,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, 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, 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, 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, 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, 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, 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, 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, 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, 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(267, 24, 12, 184); // (vertical gravity line) obj.createentity(16, 24, 9, 9); // (shiny trinket) obj.createentity(187, 24, 12, 64); // (vertical gravity line) obj.createentity(104, 124, 11, 80); // (horizontal gravity line) obj.createentity(48, 72, 10, 1, 252500); // (savepoint) obj.createentity(224, 72, 10, 1, 252501); // (savepoint) obj.createentity(99, 24, 12, 80); // (vertical gravity line) rcol=0; roomname = "Young Man, It's Worth the Challenge"; result = contents; break; } case rn(53,55): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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"; result = contents; break; } case rn(54,55): { static const short contents[] = { 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,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, 0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 289,289,289,289,289,289,289,289,411,406,286,286,286,286,286,286,286,286,408,409,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, }; obj.createentity(104, 128, 9, 11); // (shiny trinket) rcol = 6; roomname = "Purest Unobtainium"; result = contents; break; } case rn(52,58): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,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, 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, 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, 0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 295,295,295,295,295,417,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,295,295,295,295, }; obj.createentity(112, 184, 10, 1, 258520); // (savepoint) rcol = 5; roomname = "I Smell Ozone"; result = contents; break; } case rn(51,58): { static const short contents[] = { 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,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 || game.translator_exploring) { if(game.companion==0 && !obj.flags[9] && !game.crewstats[5]) //also need to check if he's rescued in a previous game { obj.createentity(32, 177, 18, 16, 1, 17, 1); obj.createblock(1, 24*8, 0, 32, 240, 33); } } roomname = "Why So Blue?"; result = contents; break; } case rn(50,58): { static const short contents[] = { 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,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((10 * 8)-4, (8 * 8) + 4, 14); //Teleporter! if(game.intimetrial) { obj.createblock(1, 280, 0, 32, 240, 82); } roomname = "Philadelphia Experiment"; result = contents; break; } #endif default: { static const short contents[1200] = {0}; result = contents; break; } } return result; } ================================================ FILE: desktop_version/src/Labclass.h ================================================ #ifndef LABCLASS_H #define LABCLASS_H class labclass { public: const short* loadlevel(int rx, int ry); const char* roomname; bool roomname_special; int rcol; }; #endif /* LABCLASS_H */ ================================================ FILE: desktop_version/src/LevelDebugger.cpp ================================================ #include "LevelDebugger.h" #include "Constants.h" #include "CustomLevels.h" #include "Entity.h" #include "Font.h" #include "Graphics.h" #include "KeyPoll.h" #include "Localization.h" #include "Map.h" #include "Script.h" #include "UtilityClass.h" #include "VFormat.h" namespace level_debugger { bool active = false; bool should_pause = true; bool tab_held = false; bool debug_held = false; bool forced = false; // Moving entities/blocks bool mouse_held = false; int held_entity = -1; int held_block = -1; int grabber_offset_x = 0; int grabber_offset_y = 0; bool right_mouse_held = false; bool is_pausing(void) { return active && should_pause; } bool is_active(void) { return active; } void toggle_active(void) { active = !active; } bool mouse_within(SDL_Rect* rect) { SDL_Point mouse = { key.mousex, key.mousey }; return SDL_PointInRect(&mouse, rect); } void set_forced(void) { forced = true; } void input(void) { if (!forced && (!map.custommode || map.custommodeforreal)) { active = false; return; } if (key.isDown(SDLK_y)) { if (!debug_held) { debug_held = true; active = !active; } } else { debug_held = false; } if (!active) { return; } if (key.isDown(SDLK_TAB)) { if (!tab_held) { tab_held = true; should_pause = !should_pause; } } else { tab_held = false; } for (int i = 0; i < (int) obj.entities.size(); i++) { SDL_Rect bounding_box = { obj.entities[i].xp + obj.entities[i].cx, obj.entities[i].yp + obj.entities[i].cy - map.ypos, obj.entities[i].w, obj.entities[i].h }; if (key.leftbutton) { if (mouse_within(&bounding_box)) { if (!mouse_held) { mouse_held = true; held_entity = i; grabber_offset_x = key.mousex - obj.entities[i].xp; grabber_offset_y = key.mousey - obj.entities[i].yp; if (!key.keymap[SDLK_LSHIFT] && !key.keymap[SDLK_RSHIFT]) { for (int j = 0; j < (int) obj.blocks.size(); j++) { if (obj.entities[i].xp == obj.blocks[j].rect.x && obj.entities[i].yp == obj.blocks[j].rect.y) { held_block = j; } } } } break; } } else { mouse_held = false; held_entity = -1; held_block = -1; } if (key.rightbutton) { if (mouse_within(&bounding_box)) { if (!right_mouse_held) { right_mouse_held = true; obj.entities[i].state = obj.entities[i].onentity; obj.entities[i].statedelay = -1; } break; } } else { right_mouse_held = false; } } if (held_entity == -1) { for (int i = 0; i < (int) obj.blocks.size(); i++) { SDL_Rect bounding_box = { obj.blocks[i].rect.x, obj.blocks[i].rect.y - map.ypos, obj.blocks[i].rect.w, obj.blocks[i].rect.h }; if (key.leftbutton) { if (mouse_within(&bounding_box)) { if (!mouse_held) { mouse_held = true; held_block = i; grabber_offset_x = key.mousex - obj.blocks[i].rect.x; grabber_offset_y = key.mousey - obj.blocks[i].rect.y; } break; } } else { held_entity = -1; mouse_held = false; held_block = -1; } } } } void logic(void) { if (!active) { return; } if (INBOUNDS_VEC(held_entity, obj.entities)) { int new_xp = key.mousex - grabber_offset_x; int new_yp = key.mousey - grabber_offset_y; if (key.isDown(SDLK_LSHIFT) || key.isDown(SDLK_RSHIFT)) { new_xp -= new_xp % 8; new_yp -= new_yp % 8; } obj.entities[held_entity].xp = new_xp; obj.entities[held_entity].yp = new_yp; obj.entities[held_entity].lerpoldxp = new_xp; obj.entities[held_entity].lerpoldyp = new_yp; obj.entities[held_entity].oldxp = new_xp; obj.entities[held_entity].oldyp = new_yp; } if (INBOUNDS_VEC(held_block, obj.blocks)) { int new_xp = key.mousex - grabber_offset_x; int new_yp = key.mousey - grabber_offset_y; if (key.isDown(SDLK_LSHIFT) || key.isDown(SDLK_RSHIFT)) { new_xp -= new_xp % 8; new_yp -= new_yp % 8; } obj.blocks[held_block].xp = new_xp; obj.blocks[held_block].yp = new_yp; obj.blocks[held_block].rect.x = new_xp; obj.blocks[held_block].rect.y = new_yp; } } void render_info(int y, const char* text) { font::print(PR_BOR | PR_FONT_8X8, 5, 32 + (10 * y), text, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } void render_coords(int y, const char* text, int first, int second) { char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), "{text}: ({first},{second})", "text:str, first:int, second:int", text, first, second); render_info(y, buffer); } void render_info(int y, const char* text, std::string value) { char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), "{text}: {value}", "text:str, value:str", text, value.c_str()); render_info(y, buffer); } void render(void) { if (!active) { return; } int hovered = -1; bool hovered_entity = true; SDL_Rect hover_box; for (int i = 0; i < (int) obj.entities.size(); i++) { SDL_Rect bounding_box = { obj.entities[i].xp + obj.entities[i].cx, obj.entities[i].yp + obj.entities[i].cy - map.ypos, obj.entities[i].w, obj.entities[i].h }; if (hovered == -1 && mouse_within(&bounding_box)) { hovered = i; hovered_entity = true; hover_box = bounding_box; } graphics.draw_rect(bounding_box.x, bounding_box.y, bounding_box.w, bounding_box.h, graphics.getRGB(15, 90, 90)); // For gravity lines, show the true hitbox. if (obj.entities[i].type == EntityType_HORIZONTAL_GRAVITY_LINE) { graphics.draw_rect(bounding_box.x - 1, bounding_box.y + 1, bounding_box.w + 2, bounding_box.h, graphics.getRGB(90, 90, 15)); } else if (obj.entities[i].type == EntityType_VERTICAL_GRAVITY_LINE) { graphics.fill_rect(bounding_box.x - 2, bounding_box.y - 1, bounding_box.w + 1, bounding_box.h + 2, graphics.getRGB(90, 90, 15)); } } for (int i = 0; i < (int) obj.blocks.size(); i++) { SDL_Rect bounding_box = { obj.blocks[i].rect.x, obj.blocks[i].rect.y - map.ypos, obj.blocks[i].rect.w, obj.blocks[i].rect.h }; if (hovered == -1 && mouse_within(&bounding_box)) { hovered = i; hovered_entity = false; hover_box = bounding_box; } graphics.draw_rect(bounding_box.x, bounding_box.y, bounding_box.w, bounding_box.h, graphics.getRGB(90, 15, 15)); } int line = 0; if (key.isDown(SDLK_u)) { SDL_Color on = graphics.getRGB(220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); SDL_Color off = graphics.getRGB(220 / 1.5 - (help.glow), 220 / 1.5 - (help.glow), 255 / 1.5 - (help.glow / 2)); graphics.set_blendmode(SDL_BLENDMODE_BLEND); graphics.fill_rect(NULL, 0, 0, 0, 127); graphics.set_blendmode(SDL_BLENDMODE_NONE); int x = 0; int y = 0; for (int i = 0; i < (int) SDL_arraysize(obj.flags); i++) { SDL_Color color = obj.flags[i] ? on : off; font::print(PR_BOR | PR_FONT_8X8, 48 + x * 24, 48 + y * 16, help.String(i), color.r, color.g, color.b); x++; if (x >= 10) { x = 0; y++; } } } else if (hovered == -1) { render_coords(line++, "Room", game.roomx % 100, game.roomy % 100); render_coords(line++, "Cursor", key.mousex, key.mousey); render_info(line++, "Entities", help.String(obj.entities.size())); line++; render_info(line++, "State", help.String(game.state)); render_info(line++, "State Delay", help.String(game.statedelay)); line++; render_info(line++, "AEM Target", help.String(script.i)); render_info(line++, "Warp Background", help.String(cl.getroomprop(game.roomx % 100, game.roomy % 100)->warpdir)); line++; if (script.running) { render_info(line++, "Script", script.scriptname); render_info(line++, "Delay", help.String(script.scriptdelay)); render_info(line++, "Position", help.String(script.position)); line++; render_info(line++, "Loop Line", help.String(script.looppoint)); render_info(line++, "Loop Count", help.String(script.loopcount)); } } else { if (hovered_entity) { entclass* entity = &obj.entities[hovered]; render_info(line++, "Index", help.String(hovered)); render_coords(line++, "Position", entity->xp, entity->yp); render_coords(line++, "Size", entity->w, entity->h); line++; render_info(line++, "Rule", help.String(entity->rule)); render_info(line++, "Type", help.String(entity->type)); render_info(line++, "Behave", help.String(entity->behave)); render_info(line++, "Para", help.String(entity->para)); render_info(line++, "State", help.String(entity->state)); line++; render_info(line++, "Tile", help.String(entity->tile)); render_info(line++, "Draw Frame", help.String(entity->drawframe)); render_info(line++, "Size", help.String(entity->size)); render_info(line++, "Direction", help.String(entity->dir)); line++; // Mostly contains duplicates, but for ease of use switch (entity->type) { case EntityType_PLAYER: // Player render_info(line++, "Gravity", help.String(game.gravitycontrol)); render_info(line++, "Checkpoint", help.String(game.savepoint)); break; case EntityType_MOVING: // Moving platforms and enemies render_info(line++, "Speed", help.String(entity->para)); render_info(line++, "Movement type", help.String(entity->behave)); break; case EntityType_TRINKET: // Trinkets render_info(line++, "ID", help.String(entity->para)); break; case EntityType_CHECKPOINT: // Checkpoints render_info(line++, "ID", help.String(entity->para)); render_info(line++, "Active", game.savepoint == entity->para ? "True" : "False"); break; case EntityType_HORIZONTAL_GRAVITY_LINE: // Horizontal gravity lines render_info(line++, "Horizontal"); break; case EntityType_VERTICAL_GRAVITY_LINE: // Vertical gravity lines render_info(line++, "Vertical"); break; default: break; } graphics.draw_rect(hover_box.x, hover_box.y, hover_box.w, hover_box.h, graphics.getRGB(32, 255 - help.glow, 255 - help.glow)); } else { blockclass* block = &obj.blocks[hovered]; render_info(line++, "Index", help.String(hovered)); render_coords(line++, "Position", block->rect.x, block->rect.y); render_coords(line++, "Size", block->rect.w, block->rect.h); line++; if (block->type == TRIGGER || block->type == ACTIVITY) { render_info(line++, "Script", block->script); render_info(line++, "State", help.String(block->trigger)); } else if (block->type == DIRECTIONAL) { render_info(line++, "Direction", help.String(block->trigger)); } graphics.draw_rect(hover_box.x, hover_box.y, hover_box.w, hover_box.h, graphics.getRGB(255 - help.glow, 32, 32)); } } const char* text; if (should_pause) { text = loc::gettext("[Press {button} to unfreeze gameplay]"); } else { text = loc::gettext("[Press {button} to freeze gameplay]"); } char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), text, "button:str", loc::gettext("TAB") ); font::print(PR_BOR, 5, 14, buffer, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } } ================================================ FILE: desktop_version/src/LevelDebugger.h ================================================ #ifndef LEVELDEBUGGER_H #define LEVELDEBUGGER_H #include namespace level_debugger { bool is_pausing(void); bool is_active(void); void input(void); void logic(void); void render(void); void set_forced(void); } #endif /* LEVELDEBUGGER_H */ ================================================ FILE: desktop_version/src/Localization.cpp ================================================ #define LOCALIZATION_CPP #include "Localization.h" #include "LocalizationStorage.h" #include "Alloc.h" #include "Game.h" #include "UTF8.h" #include "UtilityClass.h" #include "VFormat.h" namespace loc { int lang_set = 0; bool pre_title_lang_menu = false; std::string lang = "en"; std::string lang_custom = ""; bool english_sprites = false; std::string new_level_font = ""; LangMeta langmeta; // language screen list std::vector languagelist; int languagelist_curlang; bool show_translator_menu = false; size_t limitscheck_current_overflow; std::vector testable_script_ids; int n_untranslated_roomnames = 0; int n_unexplained_roomnames = 0; int n_untranslated_roomnames_custom = 0; int n_unexplained_roomnames_custom = 0; int n_untranslated_roomnames_area[9]; int n_untranslated[COUNT_UNTRANSLATED_INDEX] = {0}; const LangMeta* get_langmeta(void) { if (game.currentmenuname == Menu::language && (unsigned)game.currentmenuoption < languagelist.size()) { return &languagelist[game.currentmenuoption]; } return &langmeta; } const char* gettext(const char* eng) { if (lang == "en") { return eng; } return map_lookup_text(map_translation, eng, eng); } const char* gettext_case(const char* eng, char textcase) { if (lang == "en") { return eng; } if (textcase == 0) { return gettext(eng); } char* eng_prefixed = add_disambiguator(textcase, eng, NULL); if (eng_prefixed == NULL) { return eng; } const char* tra = map_lookup_text(map_translation, eng_prefixed, eng); VVV_free(eng_prefixed); return tra; } static const char* gettext_plural_english(const char* eng_plural, const char* eng_singular, int n) { /* Do be consistent with negative number handling for other languages... */ if (n == 1 || n == -1) { return eng_singular; } return eng_plural; } const char* gettext_plural(const char* eng_plural, const char* eng_singular, int n) { if (lang != "en") { unsigned char form = form_for_count(n); char* key = add_disambiguator(form+1, eng_plural, NULL); if (key != NULL) { const char* tra = map_lookup_text(map_translation_plural, key, NULL); VVV_free(key); if (tra != NULL) { return tra; } } } return gettext_plural_english(eng_plural, eng_singular, n); } void gettext_plural_fill(char* buf, size_t buf_len, const char* eng_plural, const char* eng_singular, const char* args_index, ...) { /* Choose the right plural string based on a number, and then vformat that string. * The first vararg determines the specific plural form. */ va_list args; va_start(args, args_index); int count = va_arg(args, int); va_end(args); const char* tra = gettext_plural(eng_plural, eng_singular, count); va_start(args, args_index); vformat_buf_valist(buf, buf_len, tra, args_index, args); va_end(args); } std::string getnumber(int n, const char* number_class) { if (n < 0 || n > 100) { return help.String(n); } // FIXME: implement a more flexible system later, where translators define the classes std::string (*number_ptr)[101]; if (SDL_strcmp(number_class, "wordy2") == 0) { number_ptr = &number2; } else { number_ptr = &number; } if ((*number_ptr)[n].empty()) { return help.String(n); } return (*number_ptr)[n]; } static bool is_script_custom(const char* script_id) { return SDL_strncmp(script_id, "custom_", 7) == 0; } const TextboxFormat* gettext_cutscene(const std::string& script_id, const std::string& eng, char textcase) { hashmap* map; const char* map_script_key; if (is_script_custom(script_id.c_str())) { map = map_translation_cutscene_custom; map_script_key = &script_id.c_str()[7]; } else { if (lang == "en") { return NULL; } map = map_translation_cutscene; map_script_key = script_id.c_str(); } uintptr_t ptr_cutscene_map; bool found = hashmap_get(map, map_script_key, SDL_strlen(map_script_key), &ptr_cutscene_map); hashmap* cutscene_map = (hashmap*) ptr_cutscene_map; if (!found || cutscene_map == NULL) { return NULL; } size_t alloc_len; char* key = add_disambiguator(textcase, eng.c_str(), &alloc_len); if (key == NULL) { return NULL; } uintptr_t ptr_format; found = hashmap_get(cutscene_map, key, alloc_len-1, &ptr_format); const TextboxFormat* format = (TextboxFormat*) ptr_format; VVV_free(key); if (!found) { return NULL; } return format; } const char* get_roomname_explanation(bool custom_level, int roomx, int roomy) { /* Never returns NULL. */ if (!fix_room_coords(custom_level, &roomx, &roomy)) { return ""; } const char* explanation; if (custom_level) { explanation = explanation_roomnames_custom[roomy][roomx]; } else { explanation = explanation_roomnames[roomy][roomx]; } if (explanation == NULL) { return ""; } return explanation; } const char* get_roomname_translation(bool custom_level, int roomx, int roomy) { /* Only looks for the translation, doesn't return English fallback. * Never returns NULL. * Also used for room name translation mode. */ if (!fix_room_coords(custom_level, &roomx, &roomy)) { return ""; } const char* tra; if (custom_level) { tra = translation_roomnames_custom[roomy][roomx]; } else { tra = translation_roomnames[roomy][roomx]; } if (tra == NULL) { return ""; } return tra; } const char* gettext_roomname(bool custom_level, int roomx, int roomy, const char* eng, bool special) { if (!custom_level && lang == "en") { return eng; } if (special) { return gettext_roomname_special(eng); } const char* tra = get_roomname_translation(custom_level, roomx, roomy); if (tra[0] == '\0') { return eng; } return tra; } const char* gettext_roomname_special(const char* eng) { if (lang == "en") { return eng; } return map_lookup_text(map_translation_roomnames_special, eng, eng); } bool is_cutscene_translated(const std::string& script_id) { hashmap* map; const char* map_script_key; if (is_script_custom(script_id.c_str())) { map = map_translation_cutscene_custom; map_script_key = &script_id.c_str()[7]; } else { if (lang == "en") { return false; } map = map_translation_cutscene; map_script_key = script_id.c_str(); } uintptr_t ptr_unused; return hashmap_get(map, map_script_key, SDL_strlen(map_script_key), &ptr_unused); } uint32_t toupper_ch(uint32_t ch) { // Convert a single Unicode codepoint to its uppercase variant // Supports important Latin (1 and A), Cyrillic and Greek // Turkish i? if (get_langmeta()->toupper_i_dot && ch == 'i') return 0x130; // a-z? if ('a' <= ch && ch <= 'z') return ch - 0x20; // Latin-1 Supplement? But not the division sign if (0xE0 <= ch && ch <= 0xFE && ch != 0xF7) return ch - 0x20; // ß? Yes, we do have this! And otherwise we could only replace it with SS later on. if (ch == 0xDF) return 0x1E9E; // ÿ? if (ch == 0xFF) return 0x178; // Let's get some exceptions for Latin Extended-A out of the way, starting with ı if (ch == 0x131) return 'I'; // This range between two obscure exceptions... if (0x139 <= ch && ch <= 0x148 && ch % 2 == 0) return ch - 1; // The rest of Latin Extended-A? if (0x100 <= ch && ch <= 0x177 && ch % 2 == 1) return ch - 1; // Okay, Ÿ also pushed some aside... if (0x179 <= ch && ch <= 0x17E && ch % 2 == 0) return ch - 1; // Can't hurt to support Romanian properly... if (ch == 0x219 || ch == 0x21B) return ch - 1; // Cyrillic а-я? if (0x430 <= ch && ch <= 0x44F) return ch - 0x20; // There's probably a good reason Cyrillic upper and lower accents are wrapped around the alphabet... if (0x450 <= ch && ch <= 0x45F) return ch - 0x50; // Apparently a Ukrainian letter is all the way over there, why not. if (ch == 0x491) return ch - 1; // Time for Greek, thankfully we're not making a lowercasing function with that double sigma! if (ch == 0x3C2) return 0x3A3; // The entire Greek alphabet then, along with two accented letters if (0x3B1 <= ch && ch <= 0x3CB) return ch - 0x20; // Unfortunately Greek accented letters are all over the place. if (ch == 0x3AC) return 0x386; if (0x3AD <= ch && ch <= 0x3AF) return ch - 0x25; if (ch == 0x3CC) return 0x38C; if (ch == 0x3CD || ch == 0x3CE) return ch - 0x3F; // Nothing matched! Just leave it as is return ch; } std::string toupper(const std::string& lower) { // Convert a UTF-8 string to uppercase if (!get_langmeta()->toupper) { return lower; } std::string upper; /* Capacity is not final, but some uppercase is more bytes than the * lowercase equivalent, so some extra breathing room couldn't hurt... */ upper.reserve(lower.length() + 6); const char* lower_c = lower.c_str(); uint32_t ch; bool ignorenext = false; while ((ch = UTF8_next(&lower_c))) { if (get_langmeta()->toupper_lower_escape_char && ch == '~') { ignorenext = true; continue; } if (!ignorenext) { ch = toupper_ch(ch); } upper.append(UTF8_encode(ch).bytes); ignorenext = false; } return upper; } std::string remove_toupper_escape_chars(const std::string& _s) { // No-op, except if langmeta.toupper_lower_escape_char, to remove the ~ escape character if (!get_langmeta()->toupper_lower_escape_char) { return _s; } std::string s = std::string(_s); for (signed int i = s.size()-1; i >= 0; i--) { if (s[i] == '~') { s.erase(i, 1); } } return s; } } /* namespace loc */ ================================================ FILE: desktop_version/src/Localization.h ================================================ #ifndef LOCALIZATION_H #define LOCALIZATION_H #include #include #include /* The translator menu will appear in any of the following circumstances: * - The "lang" folder is NOT next to data.zip, but it is found in "desktop_version" within which the game is running * - The command line argument "-translator" is passed * - ALWAYS_SHOW_TRANSLATOR_MENU is defined */ // #define ALWAYS_SHOW_TRANSLATOR_MENU namespace loc { struct LangMeta { bool active; // = true, language is shown in the list std::string code; std::string nativename; std::string credit; std::string action_hint; std::string gamepad_hint; bool autowordwrap; // = true; enable automatic wordwrapping bool toupper; // = true; enable automatic full-caps for menu options bool toupper_i_dot; // = false; enable Turkish i mapping when uppercasing bool toupper_lower_escape_char; // = false; enable ~ to mark lowercase letters for uppercasing bool rtl; // = false; enable for RTL languages like Arabic or Hebrew std::string menu_select; std::string menu_select_tight; uint8_t font_idx; }; struct TextboxFormat { const char* text; unsigned short wraplimit; // = 36*8-pad_left-pad_right; no effect if tt or !langmeta.autowordwrap unsigned short wraplimit_raw; // original value of wraplimit, only used for language file sync bool tt; // teletype, don't auto-wordwrap bool centertext; // whether the text should be centered inside the box unsigned char pad_left; // pad with X characters unsigned char pad_right; unsigned short padtowidth; // pad to X pixels (0 to disable) }; extern int lang_set; static const int lang_set_current = 2; extern bool pre_title_lang_menu; extern std::string lang; extern std::string lang_custom; extern bool english_sprites; extern std::string new_level_font; extern LangMeta langmeta; extern std::vector languagelist; extern int languagelist_curlang; extern bool show_translator_menu; extern size_t limitscheck_current_overflow; extern std::vector testable_script_ids; extern int n_untranslated_roomnames; extern int n_unexplained_roomnames; extern int n_untranslated_roomnames_custom; extern int n_unexplained_roomnames_custom; extern int n_untranslated_roomnames_area[9]; enum n_untranslated_index { UNTRANSLATED_STRINGS = 0, UNTRANSLATED_NUMBERS, UNTRANSLATED_STRINGS_PLURAL, UNTRANSLATED_CUTSCENES, UNTRANSLATED_ROOMNAMES_SPECIAL, COUNT_UNTRANSLATED_INDEX }; extern int n_untranslated[COUNT_UNTRANSLATED_INDEX]; const LangMeta* get_langmeta(void); const char* gettext(const char* eng); const char* gettext_case(const char* eng, char textcase); const char* gettext_plural(const char* eng_plural, const char* eng_singular, int count); void gettext_plural_fill(char* buf, size_t buf_len, const char* eng_plural, const char* eng_singular, const char* args_index, ...); std::string getnumber(int n, const char* number_class); const TextboxFormat* gettext_cutscene(const std::string& script_id, const std::string& eng, char textcase); const char* get_roomname_explanation(bool custom_level, int roomx, int roomy); const char* get_roomname_translation(bool custom_level, int roomx, int roomy); const char* gettext_roomname(bool custom_level, int roomx, int roomy, const char* eng, bool special); const char* gettext_roomname_special(const char* eng); bool is_cutscene_translated(const std::string& script_id); uint32_t toupper_ch(uint32_t ch); std::string toupper(const std::string& lower); std::string remove_toupper_escape_chars(const std::string& _s); } /* namespace loc */ #endif /* LOCALIZATION_H */ ================================================ FILE: desktop_version/src/LocalizationMaint.cpp ================================================ #define LOCALIZATIONMAINT_CPP #include "Localization.h" #include "LocalizationStorage.h" #include #include "Alloc.h" #include "FileSystemUtils.h" #include "Font.h" #include "Graphics.h" #include "Script.h" #include "Vlogging.h" #include "XMLUtils.h" namespace loc { static void write_max_local(tinyxml2::XMLElement* pElem, uint8_t glyph_w, uint8_t glyph_h) { const char* max; if ((max = pElem->Attribute("max")) != NULL) { unsigned short max_w, max_h, max_local_w, max_local_h; if (parse_max(max, &max_w, &max_h)) { max_local_w = (max_w*8) / glyph_w; max_local_h = (max_h*10) / SDL_max(10, glyph_h); if (max_local_h == 0) { max_local_h = 1; } char buf[16]; if (max_h == 1) { SDL_snprintf(buf, sizeof(buf), "%d", max_local_w); } else { SDL_snprintf(buf, sizeof(buf), "%d*%d", max_local_w, max_local_h); } pElem->SetAttribute("max_local", buf); } } } static void write_max_local_decl(tinyxml2::XMLDocument* doc, uint8_t glyph_w, uint8_t glyph_h) { char buf[16]; SDL_snprintf(buf, sizeof(buf), "%dx%d", glyph_w, glyph_h); doc->FirstChildElement()->SetAttribute("max_local_for", buf); } static void sync_lang_file(const std::string& langcode) { /* Update translation files for the given language with new strings from templates. * This basically takes the (English) templates, fills in existing translations, and saves. * Any FILESYSTEM_saveTiXml2Document() writes to main lang dir */ vlog_info("Syncing %s with templates...", langcode.c_str()); lang = langcode; loadtext(false); uint8_t glyph_w = 8, glyph_h = 8; font::glyph_dimensions(PR_FONT_IDX(langmeta.font_idx, langmeta.rtl), &glyph_w, &glyph_h); bool max_local_needed = glyph_w != 8 || glyph_h != 8; tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; tinyxml2::XMLElement* subElem; if (load_lang_doc("meta", doc, "en")) { FOR_EACH_XML_ELEMENT(hDoc, pElem) { const char* pKey = pElem->Value(); if (SDL_strcmp(pKey, "active") == 0) pElem->SetText((int) langmeta.active); else if (SDL_strcmp(pKey, "nativename") == 0) pElem->SetText(langmeta.nativename.c_str()); else if (SDL_strcmp(pKey, "credit") == 0) pElem->SetText(langmeta.credit.c_str()); else if (SDL_strcmp(pKey, "action_hint") == 0) pElem->SetText(langmeta.action_hint.c_str()); else if (SDL_strcmp(pKey, "gamepad_hint") == 0) pElem->SetText(langmeta.gamepad_hint.c_str()); else if (SDL_strcmp(pKey, "autowordwrap") == 0) pElem->SetText((int) langmeta.autowordwrap); else if (SDL_strcmp(pKey, "toupper") == 0) pElem->SetText((int) langmeta.toupper); else if (SDL_strcmp(pKey, "toupper_i_dot") == 0) pElem->SetText((int) langmeta.toupper_i_dot); else if (SDL_strcmp(pKey, "toupper_lower_escape_char") == 0) pElem->SetText((int) langmeta.toupper_lower_escape_char); else if (SDL_strcmp(pKey, "rtl") == 0) pElem->SetText((int) langmeta.rtl); else if (SDL_strcmp(pKey, "menu_select") == 0) pElem->SetText(langmeta.menu_select.c_str()); else if (SDL_strcmp(pKey, "menu_select_tight") == 0) pElem->SetText(langmeta.menu_select_tight.c_str()); else if (SDL_strcmp(pKey, "font") == 0) pElem->SetText(font::get_main_font_name(langmeta.font_idx)); } /* This part exists because we want to preserve blank lines between the commented * options for clarity, so we have to take matters into our own hands. */ for ( tinyxml2::XMLNode* pNode = hDoc.FirstChildElement().FirstChild().ToNode(); pNode != NULL; pNode = pNode->NextSibling() ) { tinyxml2::XMLComment* pCom = pNode->ToComment(); if (pCom != NULL) { tinyxml2::XMLNode* pPrevNode = pCom->PreviousSibling(); if (pPrevNode != NULL) { doc.FirstChildElement()->InsertAfterChild(pPrevNode, doc.NewText("\n\n ")); } doc.FirstChildElement()->InsertAfterChild(pCom, doc.NewText("\n ")); } } FILESYSTEM_saveTiXml2Document((langcode + "/meta.xml").c_str(), doc); } if (load_lang_doc("strings", doc, "en")) { if (max_local_needed) { write_max_local_decl(&doc, glyph_w, glyph_h); } FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "string"); const char* eng = pElem->Attribute("english"); if (eng != NULL) { char textcase = pElem->UnsignedAttribute("case", 0); const char* tra; if (textcase == 0) { tra = map_lookup_text(map_translation, eng, ""); } else { char* eng_prefixed = add_disambiguator(textcase, eng, NULL); if (eng_prefixed == NULL) { /* Are we out of memory? Stop, don't blank our language files... */ return; } /* Note the fallback: if this string used to not be cased and now it is, * simply fill in the old single variant we already had. */ tra = map_lookup_text( map_translation, eng_prefixed, map_lookup_text(map_translation, eng, "") ); VVV_free(eng_prefixed); } pElem->SetAttribute("translation", tra); } if (max_local_needed) { write_max_local(pElem, glyph_w, glyph_h); } } FILESYSTEM_saveTiXml2Document((langcode + "/strings.xml").c_str(), doc); } if (!load_lang_doc("numbers", doc, langcode)) { /* If numbers.xml doesn't exist _at all_, then simply copy it from English, * so that you can make a new translation simply by making a folder and syncing. */ if (load_lang_doc("numbers", doc, "en")) { FILESYSTEM_saveTiXml2Document((langcode + "/numbers.xml").c_str(), doc); } } if (load_lang_doc("strings_plural", doc, "en")) { /* Form 255 is technically invalid, but we have to account for it */ bool form_id_used[256]; SDL_zeroa(form_id_used); for (int num = 0; num < 200; num++) { form_id_used[number_plural_form[num]] = true; } if (max_local_needed) { write_max_local_decl(&doc, glyph_w, glyph_h); } FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "string"); if (max_local_needed) { write_max_local(pElem, glyph_w, glyph_h); } pElem->DeleteChildren(); const char* eng_plural = pElem->Attribute("english_plural"); for (int form_id = 0; form_id < 255; form_id++) { if (form_id_used[form_id] && eng_plural != NULL) { subElem = doc.NewElement("translation"); pElem->LinkEndChild(subElem); subElem->SetAttribute("form", form_id); char* key = add_disambiguator(form_id+1, eng_plural, NULL); if (key == NULL) { /* Out of memory or something, stop */ return; } subElem->SetAttribute("translation", map_lookup_text(map_translation_plural, key, "")); VVV_free(key); } } } FILESYSTEM_saveTiXml2Document((langcode + "/strings_plural.xml").c_str(), doc); } if (load_lang_doc("cutscenes", doc, "en")) { FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "cutscene"); const char* cutscene_id = pElem->Attribute("id"); if (cutscene_id == NULL) { continue; } hashmap* map = map_translation_cutscene; uintptr_t ptr_cutscene_map; bool found = hashmap_get(map, cutscene_id, SDL_strlen(cutscene_id), &ptr_cutscene_map); hashmap* cutscene_map = (hashmap*) ptr_cutscene_map; if (!found || cutscene_map == NULL) { continue; } FOR_EACH_XML_SUB_ELEMENT(pElem, subElem) { EXPECT_ELEM(subElem, "dialogue"); const char* eng = subElem->Attribute("english"); if (eng == NULL) { continue; } size_t alloc_len; const std::string eng_unwrapped = font::string_unwordwrap(eng); char* eng_prefixed = add_disambiguator(subElem->UnsignedAttribute("case", 1), eng_unwrapped.c_str(), &alloc_len); if (eng_prefixed == NULL) { /* Out of memory or something, stop */ return; } uintptr_t ptr_format; found = hashmap_get(cutscene_map, eng_prefixed, alloc_len-1, &ptr_format); const TextboxFormat* format = (TextboxFormat*) ptr_format; VVV_free(eng_prefixed); if (!found || format == NULL) { continue; } subElem->DeleteAttribute("tt"); subElem->DeleteAttribute("wraplimit"); subElem->DeleteAttribute("centertext"); subElem->DeleteAttribute("pad"); subElem->DeleteAttribute("pad_left"); subElem->DeleteAttribute("pad_right"); subElem->DeleteAttribute("padtowidth"); bool buttons = subElem->BoolAttribute("buttons", false); subElem->DeleteAttribute("buttons"); // we want this at the end... if (format->text != NULL) subElem->SetAttribute("translation", format->text); if (format->tt) subElem->SetAttribute("tt", 1); if (format->wraplimit_raw != 0) subElem->SetAttribute("wraplimit", format->wraplimit_raw); if (format->centertext) subElem->SetAttribute("centertext", 1); if (format->pad_left == format->pad_right && format->pad_left != 0) { subElem->SetAttribute("pad", format->pad_left); } else { if (format->pad_left != 0) subElem->SetAttribute("pad_left", format->pad_left); if (format->pad_right != 0) subElem->SetAttribute("pad_right", format->pad_right); } if (format->padtowidth != 0) subElem->SetAttribute("padtowidth", format->padtowidth); if (buttons) subElem->SetAttribute("buttons", 1); } } FILESYSTEM_saveTiXml2Document((langcode + "/cutscenes.xml").c_str(), doc); } if (load_lang_doc("roomnames", doc, "en")) { FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "roomname"); pElem->SetAttribute("translation", get_roomname_translation(false, pElem->UnsignedAttribute("x"), pElem->UnsignedAttribute("y")) ); } FILESYSTEM_saveTiXml2Document((langcode + "/roomnames.xml").c_str(), doc); } if (load_lang_doc("roomnames_special", doc, "en")) { FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "roomname"); const char* eng = pElem->Attribute("english"); if (eng != NULL) { pElem->SetAttribute("translation", map_lookup_text(map_translation_roomnames_special, eng, "")); } } FILESYSTEM_saveTiXml2Document((langcode + "/roomnames_special.xml").c_str(), doc); } } bool sync_lang_files(void) { /* Returns false if we can't set the lang write dir, true otherwise. * This could maybe be extended with better error reporting, * problem is getting across which files failed in which languages. */ std::string oldlang = lang; if (!FILESYSTEM_setLangWriteDir()) { vlog_error("Cannot set write dir to lang dir, not syncing language files"); return false; } for (size_t i = 0; i < languagelist.size(); i++) { if (languagelist[i].code != "en") sync_lang_file(languagelist[i].code); } FILESYSTEM_restoreWriteDir(); lang = oldlang; loadtext(false); return true; } bool save_roomname_to_file(const std::string& langcode, bool custom_level, int roomx, int roomy, const char* tra, const char* explanation) { if (custom_level) { vlog_error("Saving custom level room names not implemented"); return false; } if (!fix_room_coords(custom_level, &roomx, &roomy)) { return false; } tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("roomnames", doc, langcode)) { return false; } bool found = false; FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "roomname"); int x = pElem->IntAttribute("x", -1); int y = pElem->IntAttribute("y", -1); if (x == roomx && y == roomy) { if (explanation != NULL) { pElem->SetAttribute("explanation", explanation); } if (tra != NULL) { pElem->SetAttribute("translation", tra); } found = true; } } if (!found) { vlog_error("Could not find room %d,%d in language file to replace!", roomx, roomy); return false; } if (!FILESYSTEM_setLangWriteDir()) { vlog_error("Cannot set write dir to lang dir, so room name can't be saved"); return false; } bool save_success = FILESYSTEM_saveTiXml2Document((langcode + "/roomnames.xml").c_str(), doc); FILESYSTEM_restoreWriteDir(); if (!save_success) { vlog_error("Could not write roomnames document!"); return false; } return store_roomname_translation(custom_level, roomx, roomy, tra, explanation); } bool save_roomname_explanation_to_files(bool custom_level, int roomx, int roomy, const char* explanation) { bool success = true; for (size_t i = 0; i < languagelist.size(); i++) { if (!save_roomname_to_file(languagelist[i].code, custom_level, roomx, roomy, NULL, explanation)) { success = false; vlog_warn("Could not save room name explanation to language %s", languagelist[i].code.c_str()); } } return !languagelist.empty() && success; } void local_limits_check(void) { text_overflows.clear(); loadtext(true); limitscheck_current_overflow = 0; } void global_limits_check(void) { text_overflows.clear(); std::string oldlang = lang; textbook_clear(&textbook_main); textbook_set_protected(&textbook_main, true); for (size_t i = 0; i < languagelist.size(); i++) { if (languagelist[i].code != "en") { lang = languagelist[i].code; loadtext(true); } } lang = oldlang; loadtext(false); textbook_set_protected(&textbook_main, false); limitscheck_current_overflow = 0; } void populate_testable_script_ids(void) { testable_script_ids.clear(); tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("cutscenes", doc)) { return; } FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "cutscene"); const char* id = pElem->Attribute("id"); if (id != NULL) { testable_script_ids.push_back(id); } } } bool populate_cutscene_test(const char* script_id) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("cutscenes", doc)) { return false; } const char* original = get_level_original_lang(hDoc); FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "cutscene"); if (SDL_strcmp(pElem->Attribute("id"), script_id) != 0) { /* Not the correct cutscene */ continue; } tinyxml2::XMLElement* subElem; FOR_EACH_XML_SUB_ELEMENT(pElem, subElem) { EXPECT_ELEM(subElem, "dialogue"); const char* tra = subElem->Attribute("translation"); const char* speaker = subElem->Attribute("speaker"); const char* eng = subElem->Attribute(original); if (tra != NULL && tra[0] != '\0' && speaker != NULL && eng != NULL) { script.add_test_line( speaker, eng, subElem->UnsignedAttribute("case", 1), subElem->BoolAttribute("buttons", false) ); } } return true; } return false; } } /* namespace loc */ ================================================ FILE: desktop_version/src/LocalizationMaint.h ================================================ #ifndef LOCALIZATIONMAINT_H #define LOCALIZATIONMAINT_H namespace loc { bool sync_lang_files(void); bool save_roomname_to_file(const std::string& langcode, bool custom_level, int roomx, int roomy, const char* tra, const char* explanation); bool save_roomname_explanation_to_files(bool custom_level, int roomx, int roomy, const char* explanation); void local_limits_check(void); void global_limits_check(void); void populate_testable_script_ids(void); bool populate_cutscene_test(const char* script_id); } /* namespace loc */ #endif /* LOCALIZATIONMAINT_H */ ================================================ FILE: desktop_version/src/LocalizationStorage.cpp ================================================ #define LOCALIZATIONSTORAGE_CPP #include "Localization.h" #include "LocalizationStorage.h" #include "Alloc.h" #include "Constants.h" #include "CustomLevels.h" #include "FileSystemUtils.h" #include "Font.h" #include "Graphics.h" #include "Unused.h" #include "UtilityClass.h" #include "VFormat.h" #include "Vlogging.h" namespace loc { bool inited = false; bool inited_custom = false; char* custom_level_path = NULL; std::vector text_overflows; bool load_lang_doc( const std::string& cat, tinyxml2::XMLDocument& doc, const std::string& langcode /*= lang*/, const std::string& asset_cat /*= ""*/ ) { /* Load a language-related XML file. * cat is the "category", so "strings", "numbers", etc. * * asset_cat is only used when loading * from custom level assets is possible. */ bool asset_loaded = false; if (!asset_cat.empty()) { asset_loaded = FILESYSTEM_loadAssetTiXml2Document(("lang/" + langcode + "/" + asset_cat + ".xml").c_str(), doc); } if (!asset_loaded && !FILESYSTEM_loadTiXml2Document(("lang/" + langcode + "/" + cat + ".xml").c_str(), doc)) { vlog_debug("Could not load language file %s/%s.", langcode.c_str(), cat.c_str()); return false; } if (doc.Error()) { vlog_error("Error parsing language file %s/%s: %s", langcode.c_str(), cat.c_str(), doc.ErrorStr()); return false; } return true; } static void loadmeta(LangMeta& meta, const std::string& langcode = lang) { meta.active = true; meta.code = langcode; meta.nativename = langcode; meta.credit = ""; meta.action_hint = "Press Space, Z, or V to select"; meta.gamepad_hint = "Press {button} to select"; meta.autowordwrap = true; meta.toupper = true; meta.toupper_i_dot = false; meta.toupper_lower_escape_char = false; meta.rtl = false; meta.menu_select = "[ {label} ]"; meta.menu_select_tight = "[{label}]"; meta.font_idx = font::get_font_idx_8x8(); tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("meta", doc, langcode)) { return; } FOR_EACH_XML_ELEMENT(hDoc, pElem) { const char* pKey = pElem->Value(); const char* pText = pElem->GetText(); if (pText == NULL) { pText = ""; } if (SDL_strcmp(pKey, "active") == 0) meta.active = help.Int(pText); else if (SDL_strcmp(pKey, "nativename") == 0) meta.nativename = std::string(pText); else if (SDL_strcmp(pKey, "credit") == 0) meta.credit = std::string(pText); else if (SDL_strcmp(pKey, "action_hint") == 0) meta.action_hint = std::string(pText); else if (SDL_strcmp(pKey, "gamepad_hint") == 0) meta.gamepad_hint = std::string(pText); else if (SDL_strcmp(pKey, "autowordwrap") == 0) meta.autowordwrap = help.Int(pText); else if (SDL_strcmp(pKey, "toupper") == 0) meta.toupper = help.Int(pText); else if (SDL_strcmp(pKey, "toupper_i_dot") == 0) meta.toupper_i_dot = help.Int(pText); else if (SDL_strcmp(pKey, "toupper_lower_escape_char") == 0) meta.toupper_lower_escape_char = help.Int(pText); else if (SDL_strcmp(pKey, "rtl") == 0) meta.rtl = help.Int(pText); else if (SDL_strcmp(pKey, "menu_select") == 0) meta.menu_select = std::string(pText); else if (SDL_strcmp(pKey, "menu_select_tight") == 0) meta.menu_select_tight = std::string(pText); else if (SDL_strcmp(pKey, "font") == 0) font::find_main_font_by_name(pText, &meta.font_idx); } } static void map_store_translation(Textbook* textbook, hashmap* map, const char* eng, const char* tra) { /* Add the texts to the given textbook and set the translation in the given hashmap. */ if (eng == NULL) { return; } if (tra == NULL) { tra = ""; } const char* tb_eng = textbook_store(textbook, eng); const char* tb_tra = textbook_store(textbook, tra); if (tb_eng == NULL || tb_tra == NULL) { return; } hashmap_set(map, tb_eng, SDL_strlen(tb_eng), (uintptr_t) tb_tra); } unsigned char form_for_count(int n) { int n_ix; if (n > -100 && n < 100) { /* Plural forms for negative numbers are debatable in any language I'd imagine... * But they shouldn't appear anyway unless there's a bug or you're asking for it. * Or do YOU ever get -10 deaths while collecting -1 trinket? */ n_ix = SDL_abs(n); } else { /* Plural forms for 100 and above always just keep repeating. Thank goodness. */ n_ix = SDL_abs(n % 100) + 100; } return number_plural_form[n_ix]; } static void callback_free_map_value(void* key, size_t ksize, uintptr_t value, void* usr) { UNUSED(key); UNUSED(ksize); UNUSED(usr); hashmap_free((hashmap*) value); } static void resettext_custom(bool final_shutdown) { /* Reset/initialize custom level strings only. * If final_shutdown, this just does a last cleanup of any allocations, * otherwise it makes storage ready for first use (or reuse by a new language). */ if (inited_custom) { hashmap_iterate(map_translation_cutscene_custom, callback_free_map_value, NULL); hashmap_free(map_translation_cutscene_custom); textbook_clear(&textbook_custom); } else if (!final_shutdown) { inited_custom = true; textbook_init(&textbook_custom); } if (!final_shutdown) { map_translation_cutscene_custom = hashmap_create(); SDL_zeroa(translation_roomnames_custom); SDL_zeroa(explanation_roomnames_custom); n_untranslated_roomnames_custom = 0; n_unexplained_roomnames_custom = 0; } } void unloadtext_custom(void) { resettext_custom(false); loc::lang_custom = ""; VVV_free(custom_level_path); custom_level_path = NULL; } void resettext(bool final_shutdown) { /* Reset/initialize strings. * If final_shutdown, this just does a last cleanup of any allocations, * otherwise it makes storage ready for first use (or reuse by a new language). */ if (inited) { hashmap_free(map_translation); hashmap_iterate(map_translation_cutscene, callback_free_map_value, NULL); hashmap_free(map_translation_cutscene); hashmap_free(map_translation_plural); hashmap_free(map_translation_roomnames_special); textbook_clear(&textbook_main); } else if (!final_shutdown) { inited = true; textbook_init(&textbook_main); } if (!final_shutdown) { map_translation = hashmap_create(); map_translation_cutscene = hashmap_create(); map_translation_plural = hashmap_create(); for (size_t i = 0; i <= 100; i++) { number[i] = ""; number2[i] = ""; } SDL_zeroa(number_plural_form); number_plural_form[1] = 1; SDL_zeroa(translation_roomnames); SDL_zeroa(explanation_roomnames); n_untranslated_roomnames = 0; n_unexplained_roomnames = 0; SDL_zeroa(n_untranslated_roomnames_area); SDL_zeroa(n_untranslated); map_translation_roomnames_special = hashmap_create(); } resettext_custom(final_shutdown); } bool parse_max(const char* max, unsigned short* max_w, unsigned short* max_h) { /* Parse a max string, like "33" or "33*3", into two shorts. * Returns true if successful and max_w/max_h have gotten valid values, false otherwise. */ if (max == NULL) { return false; } char* max_mut = SDL_strdup(max); if (max_mut == NULL) { return false; } char* asterisk = SDL_strchr(max_mut, '*'); if (asterisk != NULL) { asterisk[0] = '\0'; *max_h = (unsigned short) help.Int(&asterisk[1], 0); } else { *max_h = 1; } *max_w = (unsigned short) help.Int(max_mut, 0); VVV_free(max_mut); return *max_w != 0 && *max_h != 0; } static bool max_check_string(const char* str, const char* max) { /* Stores a detected overflow in the overflows vector, returns true if this happened */ unsigned short max_w, max_h; if (str == NULL || !parse_max(max, &max_w, &max_h)) { return false; } /* Special case that must ALWAYS be 2 lines even when the font is bigger */ if (SDL_strcmp(str, "You have rescued a crew member!") == 0 && max_h == 1) { max_h = 2; } uint8_t font_idx = get_langmeta()->font_idx; uint32_t print_flags = PR_FONT_IDX(font_idx, get_langmeta()->rtl) | PR_CJK_LOW; uint8_t font_w = 8; uint8_t font_h = 8; font::glyph_dimensions(print_flags, &font_w, &font_h); unsigned short max_w_px = max_w * 8; unsigned short max_h_px = max_h * 10; bool does_overflow = false; if (max_h == 1) { max_h_px = font_h; does_overflow = font::len(print_flags, str) > (int) max_w_px; } else { short lines; font::string_wordwrap(print_flags, str, max_w_px, &lines); does_overflow = lines*SDL_max(10, font_h) > (short) max_h_px; } // Convert max_w and max_h from 8x8 into local max_w = max_w_px / font_w; max_h = max_h_px / SDL_max(10, font_h); if (does_overflow) { TextOverflow overflow; overflow.lang = lang; overflow.text = textbook_store(&textbook_main, str); overflow.max_w = max_w; overflow.max_h = max_h; overflow.max_w_px = max_w_px; overflow.max_h_px = max_h_px; overflow.multiline = max_h > 1; overflow.flags = print_flags; text_overflows.push_back(overflow); vlog_warn("\"%s\" DOESN'T FIT into %s which is %dx%d or %dx%dpx", str, max, max_w, max_h, max_w_px, max_h_px ); } else { vlog_debug("\"%s\" fits into %s which is %dx%d or %dx%dpx", str, max, max_w, max_h, max_w_px, max_h_px ); } return does_overflow; } static void max_check_string_plural(unsigned char form, const char* str, const char* max, const char* var, unsigned int expect) { if (str == NULL || var == NULL) { return; } /* Create an args index from just the name of the variable. * Also get rid of all other placeholders.*/ char args_index[60]; vformat_buf(args_index, sizeof(args_index), "{var}:int, _:int", "var:str", var); char buf[20*SCREEN_WIDTH_CHARS + 1]; if (expect > 100) { /* Treat `expect` as a single example, it's the number of digits that's most important */ if (form_for_count(expect) == form) { vformat_buf(buf, sizeof(buf), str, args_index, expect, 0); max_check_string(buf, max); } } else { /* Test all numbers from 0 to `expect`, since if we have wordy numbers, they have differing lengths */ for (unsigned int test = 0; test <= expect; test++) { if (form_for_count(test) == form) { vformat_buf(buf, sizeof(buf), str, args_index, test, 0); if (max_check_string(buf, max)) { /* One is enough */ break; } } } } } static void tally_untranslated(const char* tra, int* counter) { /* Count this translation in the untranslated count if it's untranslated. */ if (!show_translator_menu) { return; } if (tra == NULL || tra[0] == '\0') { (*counter)++; } } static void loadtext_strings(bool check_max) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("strings", doc)) { return; } FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "string"); const char* eng = pElem->Attribute("english"); const char* tra = pElem->Attribute("translation"); char textcase = pElem->UnsignedAttribute("case", 0); if (textcase == 0) { map_store_translation( &textbook_main, map_translation, eng, tra ); } else { /* Only prefix with a disambiguator if a specific case number is set */ char* eng_prefixed = add_disambiguator(textcase, eng, NULL); if (eng_prefixed == NULL) { continue; } map_store_translation( &textbook_main, map_translation, eng_prefixed, tra ); VVV_free(eng_prefixed); } /* Only tally an untranslated string if English isn't blank */ if (eng != NULL && eng[0] != '\0') { tally_untranslated(tra, &n_untranslated[UNTRANSLATED_STRINGS]); } if (check_max) { /* VFormat placeholders distort the limits check. * (max_check_string ignores NULL strings.) */ char* filled = vformat_alloc(tra, "_:int", 0); max_check_string(filled, pElem->Attribute("max")); VVV_free(filled); } } } static void loadtext_strings_plural(bool check_max) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("strings_plural", doc)) { return; } FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "string"); const char* eng_plural = pElem->Attribute("english_plural"); if (eng_plural == NULL) { continue; } tinyxml2::XMLElement* subElem; FOR_EACH_XML_SUB_ELEMENT(pElem, subElem) { EXPECT_ELEM(subElem, "translation"); unsigned char form = subElem->IntAttribute("form", 0); char* key = add_disambiguator(form+1, eng_plural, NULL); if (key == NULL) { continue; } map_store_translation( &textbook_main, map_translation_plural, key, subElem->Attribute("translation") ); VVV_free(key); tally_untranslated(subElem->Attribute("translation"), &n_untranslated[UNTRANSLATED_STRINGS_PLURAL]); if (check_max) { max_check_string_plural( form, subElem->Attribute("translation"), pElem->Attribute("max"), pElem->Attribute("var"), pElem->UnsignedAttribute("expect", 101) ); } } } } static bool get_level_lang_path(bool custom_level, const char* cat, std::string& doc_path, std::string& doc_path_asset) { /* Calculate the path to a translation file for either the MAIN GAME or * a CUSTOM LEVEL. cat can be "roomnames", "cutscenes", etc. * * doc_path and doc_path_asset are "out" parameters, and will be set to * the appropriate filenames to use for language files outside of or * inside level assets respectively (translations for custom levels can * live in the main language folders too) * * Returns whether this is a (valid) custom level path. */ if (custom_level && custom_level_path != NULL && SDL_strncmp(custom_level_path, "levels/", 7) == 0 && SDL_strlen(custom_level_path) > (sizeof(".vvvvvv")-1) ) { /* Get rid of .vvvvvv */ size_t len = SDL_strlen(custom_level_path)-7; doc_path = std::string(custom_level_path, len); doc_path.append("/custom_"); doc_path.append(cat); /* For the asset path, also get rid of the levels/LEVELNAME/ */ doc_path_asset = "custom_"; doc_path_asset.append(cat); return true; } else { doc_path = cat; doc_path_asset = ""; return false; } } const char* get_level_original_lang(tinyxml2::XMLHandle& hDoc) { /* cutscenes and roomnames files can specify the original language as * an attribute of the root tag to change the attribute names of the * original text (normally "english"). This makes level translations * less confusing if the original language isn't English. */ const char* original = NULL; tinyxml2::XMLElement* pRoot = hDoc.FirstChildElement().ToElement(); if (pRoot != NULL) { original = pRoot->Attribute("original"); } if (original == NULL) { original = "english"; } return original; } static std::string& get_level_lang_code(bool custom_level) { if (!custom_level || lang_custom == "") { return lang; } return lang_custom; } static void loadtext_cutscenes(bool custom_level) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; std::string doc_path; std::string doc_path_asset; bool valid_custom_level = get_level_lang_path(custom_level, "cutscenes", doc_path, doc_path_asset); if (custom_level && !valid_custom_level) { return; } if (!load_lang_doc(doc_path, doc, get_level_lang_code(custom_level), doc_path_asset)) { return; } Textbook* textbook; hashmap* map; if (custom_level) { textbook = &textbook_custom; map = map_translation_cutscene_custom; } else { textbook = &textbook_main; map = map_translation_cutscene; } const char* original = get_level_original_lang(hDoc); FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "cutscene"); const char* script_id = textbook_store(textbook, pElem->Attribute("id")); if (script_id == NULL) { continue; } hashmap* cutscene_map = hashmap_create(); hashmap_set_free( map, script_id, SDL_strlen(script_id), (uintptr_t) cutscene_map, callback_free_map_value, NULL ); tinyxml2::XMLElement* subElem; FOR_EACH_XML_SUB_ELEMENT(pElem, subElem) { EXPECT_ELEM(subElem, "dialogue"); const char* eng = subElem->Attribute(original); const char* tra = subElem->Attribute("translation"); if (!custom_level) { tally_untranslated(tra, &n_untranslated[UNTRANSLATED_CUTSCENES]); } if (eng == NULL || tra == NULL) { continue; } const std::string eng_unwrapped = font::string_unwordwrap(eng); char* eng_prefixed = add_disambiguator(subElem->UnsignedAttribute("case", 1), eng_unwrapped.c_str(), NULL); if (eng_prefixed == NULL) { continue; } const char* tb_eng = textbook_store(textbook, eng_prefixed); const char* tb_tra = textbook_store(textbook, tra); VVV_free(eng_prefixed); if (tb_eng == NULL || tb_tra == NULL) { continue; } TextboxFormat format; format.text = tb_tra; format.tt = subElem->BoolAttribute("tt", false); format.centertext = subElem->BoolAttribute("centertext", false); format.pad_left = subElem->UnsignedAttribute("pad_left", 0); format.pad_right = subElem->UnsignedAttribute("pad_right", 0); unsigned short pad = subElem->UnsignedAttribute("pad", 0); format.pad_left += pad; format.pad_right += pad; format.wraplimit_raw = subElem->UnsignedAttribute("wraplimit", 0); format.wraplimit = format.wraplimit_raw; if (format.wraplimit == 0) { format.wraplimit = 36*8 - (format.pad_left+format.pad_right)*8; } format.padtowidth = subElem->UnsignedAttribute("padtowidth", 0); const TextboxFormat* tb_format = (TextboxFormat*) textbook_store_raw( textbook, &format, sizeof(TextboxFormat) ); if (tb_format == NULL) { continue; } hashmap_set(cutscene_map, tb_eng, SDL_strlen(tb_eng), (uintptr_t) tb_format); } } } static void loadtext_numbers(void) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("numbers", doc)) { return; } FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "number"); const char* value_str = pElem->Attribute("value"); int value = help.Int(value_str); if (value >= 0 && value <= 100) { const char* tra = pElem->Attribute("translation"); if (tra == NULL) { tra = ""; } number[value] = std::string(tra); tally_untranslated(tra, &n_untranslated[UNTRANSLATED_NUMBERS]); // FIXME: implement a more flexible system later, where translators define the classes tra = pElem->Attribute("translation2"); if (tra == NULL) { tra = ""; } number2[value] = std::string(tra); } if (value >= 0 && value <= 199) { int form = pElem->IntAttribute("form", 0); number_plural_form[value] = form; if (value < 100) { number_plural_form[value+100] = form; } } } } bool fix_room_coords(bool custom_level, int* roomx, int* roomy) { *roomx %= 100; *roomy %= 100; if (!custom_level && *roomx == 9 && *roomy == 4) { // The Tower has two rooms, unify them *roomy = 9; } int max_x = MAP_MAX_X; int max_y = MAP_MAX_Y; if (custom_level) { max_x = CUSTOM_MAP_MAX_X; max_y = CUSTOM_MAP_MAX_Y; } return !(*roomx < 0 || *roomy < 0 || *roomx > max_x || *roomy > max_y); } static unsigned coords_to_area(int roomx, int roomy) { if (!fix_room_coords(false, &roomx, &roomy)) { return false; } /* We want to know per-area how many room names are untranslated... */ enum area_letter { _, /* None */ S, /* SS1 */ L, /* Lab */ T, /* Tower */ Y, /* SS2 */ W, /* Warp */ I, /* Intermission */ G, /* Gravitron */ F /* Final */ }; static enum area_letter area_map[MAP_MAX_Y+1][MAP_MAX_Y+1] = { {_,L,L,L,L,L,L,L,_,T,_,_,_,W,W,W,W,W,W,W}, {_,L,L,L,L,L,L,_,_,T,_,_,_,_,W,W,W,W,W,W}, {_,_,_,_,L,_,_,_,_,T,_,_,_,_,W,W,W,W,W,W}, {_,_,_,_,L,_,_,_,_,T,_,_,S,S,S,S,W,W,W,W}, {_,_,L,L,L,_,_,_,_,T,T,T,S,S,S,S,_,_,_,_}, {_,_,_,_,_,_,_,_,_,T,Y,Y,S,S,S,S,_,_,_,_}, {_,_,_,_,_,_,_,_,_,T,Y,Y,S,S,S,S,S,_,_,_}, {_,_,_,_,_,_,_,_,_,T,Y,Y,S,S,S,S,S,S,S,_}, {_,_,_,_,_,_,_,_,_,T,_,_,_,Y,Y,S,Y,Y,Y,_}, {_,_,_,_,_,_,_,_,T,T,_,_,_,Y,Y,Y,Y,Y,Y,_}, {_,_,_,_,_,_,_,_,_,T,_,_,_,Y,Y,Y,Y,Y,Y,_}, {_,_,_,_,_,_,_,_,_,T,_,Y,Y,Y,Y,Y,Y,Y,Y,_}, {_,_,_,_,_,_,_,_,_,T,_,Y,Y,Y,Y,Y,Y,_,Y,_}, {_,_,_,_,_,_,_,_,_,T,_,Y,Y,Y,Y,Y,Y,_,Y,_}, {_,_,_,_,_,_,_,_,_,T,_,Y,Y,_,_,_,_,_,Y,_}, {_,_,_,_,_,_,_,L,_,T,_,_,_,_,_,_,_,_,_,_}, {_,_,L,L,L,L,L,L,_,T,_,_,_,_,_,_,_,_,_,_}, {_,L,L,L,L,L,L,L,_,T,_,_,_,_,_,_,_,_,_,_}, {L,L,L,L,L,_,_,L,_,T,_,_,_,_,_,_,_,_,_,_}, {L,L,L,L,L,_,_,L,_,T,_,_,_,_,_,_,_,_,_,_} }; static bool area_map_has_final = false; if (!area_map_has_final) { static const enum area_letter final_map[9][14] = { {_,_,_,_,_,_,_,_,_,_,_,_,G,F}, {_,_,_,_,_,_,_,_,_,_,_,_,G,F}, {_,_,_,_,_,_,_,_,_,_,_,_,G,F}, {F,F,F,F,F,F,F,F,F,F,_,_,G,F}, {F,F,F,F,F,_,F,F,F,F,_,_,G,F}, {_,_,_,_,_,_,_,_,F,F,F,F,F,F}, {_,_,_,_,_,F,F,F,F,F,F,_,_,_}, {_,_,_,_,_,_,_,_,_,_,_,_,_,_}, {I,I,I,I,I,I,I,I,I,I,I,I,I,I} }; for (int y = 0; y < 9; y++) { for (int x = 0; x < 14; x++) { area_map[MAP_MAX_Y+1 - 9 + y][MAP_MAX_X+1 - 14 + x] = final_map[y][x]; } } area_map_has_final = true; } if (area_map[roomy][roomx] == 0) { vlog_error("LocalizationStorage: Room %d,%d has no area associated with it", roomx, roomy); } return area_map[roomy][roomx]; } static void update_left_counter(const char* old_text, const char* new_text, int* counter, int* counter_area) { bool now_filled = new_text[0] != '\0'; if ((old_text == NULL || old_text[0] == '\0') && now_filled) { (*counter)--; if (counter_area != NULL) { (*counter_area)--; } } else if (old_text != NULL && old_text[0] != '\0' && !now_filled) { (*counter)++; if (counter_area != NULL) { (*counter_area)++; } } } bool store_roomname_translation(bool custom_level, int roomx, int roomy, const char* tra, const char* explanation) { if (!fix_room_coords(custom_level, &roomx, &roomy)) { return false; } /* We have some arrays filled with pointers, and we need to change those pointers */ const char** ptr_translation; const char** ptr_explanation; int* ptr_n_untranslated; int* ptr_n_untranslated_area = NULL; int* ptr_n_unexplained; if (custom_level) { ptr_translation = &translation_roomnames_custom[roomy][roomx]; ptr_explanation = &explanation_roomnames_custom[roomy][roomx]; ptr_n_untranslated = &n_untranslated_roomnames_custom; ptr_n_unexplained = &n_unexplained_roomnames_custom; } else { ptr_translation = &translation_roomnames[roomy][roomx]; ptr_explanation = &explanation_roomnames[roomy][roomx]; ptr_n_untranslated = &n_untranslated_roomnames; ptr_n_untranslated_area = &n_untranslated_roomnames_area[coords_to_area(roomx, roomy)]; ptr_n_unexplained = &n_unexplained_roomnames; } if (tra != NULL) { update_left_counter(*ptr_translation, tra, ptr_n_untranslated, ptr_n_untranslated_area); *ptr_translation = textbook_store(&textbook_main, tra); } if (explanation != NULL) { update_left_counter(*ptr_explanation, explanation, ptr_n_unexplained, NULL); *ptr_explanation = textbook_store(&textbook_main, explanation); } return true; } static void loadtext_roomnames(bool custom_level, bool check_max) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; std::string doc_path; std::string doc_path_asset; bool valid_custom_level = get_level_lang_path(custom_level, "roomnames", doc_path, doc_path_asset); if (custom_level && !valid_custom_level) { return; } if (!load_lang_doc(doc_path, doc, get_level_lang_code(custom_level), doc_path_asset)) { return; } const char* original = get_level_original_lang(hDoc); FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "roomname"); int x = pElem->IntAttribute("x", -1); int y = pElem->IntAttribute("y", -1); if (custom_level) { /* Extra safeguard: make sure the original room name matches! */ const char* original_roomname = pElem->Attribute(original); if (original_roomname == NULL) { continue; } const RoomProperty* const room = cl.getroomprop(x, y); if (SDL_strcmp(original_roomname, room->roomname.c_str()) != 0) { continue; } n_untranslated_roomnames_custom++; n_unexplained_roomnames_custom++; } else { n_untranslated_roomnames++; n_unexplained_roomnames++; n_untranslated_roomnames_area[coords_to_area(x, y)]++; if (check_max) { max_check_string(pElem->Attribute("translation"), "40"); } } store_roomname_translation( custom_level, x, y, pElem->Attribute("translation"), show_translator_menu ? pElem->Attribute("explanation") : NULL ); } } static void loadtext_roomnames_special(bool check_max) { tinyxml2::XMLDocument doc; tinyxml2::XMLHandle hDoc(&doc); tinyxml2::XMLElement* pElem; if (!load_lang_doc("roomnames_special", doc)) { return; } FOR_EACH_XML_ELEMENT(hDoc, pElem) { EXPECT_ELEM(pElem, "roomname"); map_store_translation( &textbook_main, map_translation_roomnames_special, pElem->Attribute("english"), pElem->Attribute("translation") ); if (check_max) { max_check_string(pElem->Attribute("translation"), "40"); } tally_untranslated(pElem->Attribute("translation"), &n_untranslated[UNTRANSLATED_ROOMNAMES_SPECIAL]); } } void loadtext_custom(const char* custom_path) { resettext_custom(false); if (custom_level_path == NULL && custom_path != NULL) { custom_level_path = SDL_strdup(custom_path); } loadtext_cutscenes(true); loadtext_roomnames(true, false); } void loadtext(bool check_max) { resettext(false); loadmeta(langmeta); if (lang == "en") { if (show_translator_menu) { // We may still need the room name explanations loadtext_roomnames(false, false); n_untranslated_roomnames = 0; SDL_zeroa(n_untranslated_roomnames_area); } } else { loadtext_numbers(); loadtext_strings(check_max); loadtext_strings_plural(check_max); loadtext_cutscenes(false); loadtext_roomnames(false, check_max); loadtext_roomnames_special(check_max); } if (custom_level_path != NULL) { loadtext_custom(NULL); } } void loadlanguagelist(void) { // Load the list of languages for the language screen languagelist.clear(); size_t opt = 0; languagelist_curlang = 0; EnumHandle handle = {}; const char* code; while ((code = FILESYSTEM_enumerateLanguageCodes(&handle)) != NULL) { LangMeta meta; loadmeta(meta, code); if (meta.active) { languagelist.push_back(meta); if (SDL_strcmp(lang.c_str(), code) == 0) { languagelist_curlang = opt; } opt++; } } FILESYSTEM_freeEnumerate(&handle); } const char* map_lookup_text(hashmap* map, const char* eng, const char* fallback) { uintptr_t ptr_tra; bool found = hashmap_get(map, eng, SDL_strlen(eng), &ptr_tra); const char* tra = (const char*) ptr_tra; if (found && tra != NULL && tra[0] != '\0') { return tra; } return fallback; } char* add_disambiguator(char disambiguator, const char* original_string, size_t* ext_alloc_len) { /* Create a version of the string prefixed with the given byte. * This byte is used when the English string is just not enough to identify the correct translation. * It's needed to store plural forms, and when the same text appears multiple times in a cutscene. * Caller must VVV_free. */ size_t alloc_len = 1+SDL_strlen(original_string)+1; char* alloc = (char*) SDL_malloc(alloc_len); if (alloc == NULL) { return NULL; } alloc[0] = disambiguator; SDL_memcpy(&alloc[1], original_string, alloc_len-1); if (ext_alloc_len != NULL) { *ext_alloc_len = alloc_len; } return alloc; } } /* namespace loc */ ================================================ FILE: desktop_version/src/LocalizationStorage.h ================================================ #ifndef LOCALIZATIONSTORAGE_H #define LOCALIZATIONSTORAGE_H #include #include "Textbook.h" #include "XMLUtils.h" extern "C" { #include } #if defined(LOCALIZATIONSTORAGE_CPP) #define LS_INTERN #else #define LS_INTERN extern #endif namespace loc { #if defined(LOCALIZATION_CPP) || defined(LOCALIZATIONSTORAGE_CPP) || defined(LOCALIZATIONMAINT_CPP) LS_INTERN Textbook textbook_main; LS_INTERN Textbook textbook_custom; LS_INTERN hashmap* map_translation; LS_INTERN hashmap* map_translation_plural; LS_INTERN std::string number[101]; /* 0..100 */ LS_INTERN std::string number2[101]; /* 0..100 */ LS_INTERN unsigned char number_plural_form[200]; /* [0..99] for 0..99, [100..199] for *00..*99 */ LS_INTERN hashmap* map_translation_cutscene; LS_INTERN hashmap* map_translation_cutscene_custom; LS_INTERN hashmap* map_translation_roomnames_special; #define MAP_MAX_X 54 #define MAP_MAX_Y 56 #define CUSTOM_MAP_MAX_X 19 #define CUSTOM_MAP_MAX_Y 19 LS_INTERN const char* translation_roomnames[MAP_MAX_Y+1][MAP_MAX_X+1]; LS_INTERN const char* explanation_roomnames[MAP_MAX_Y+1][MAP_MAX_X+1]; LS_INTERN const char* translation_roomnames_custom[CUSTOM_MAP_MAX_Y+1][CUSTOM_MAP_MAX_X+1]; LS_INTERN const char* explanation_roomnames_custom[CUSTOM_MAP_MAX_Y+1][CUSTOM_MAP_MAX_X+1]; #endif struct TextOverflow { std::string lang; const char* text; unsigned short max_w, max_h; unsigned short max_w_px, max_h_px; bool multiline; uint32_t flags; }; extern std::vector text_overflows; bool load_lang_doc( const std::string& cat, tinyxml2::XMLDocument& doc, const std::string& langcode = lang, const std::string& asset_cat = "" ); unsigned char form_for_count(int n); void unloadtext_custom(void); void resettext(bool final_shutdown); bool parse_max(const char* max, unsigned short* max_w, unsigned short* max_h); const char* get_level_original_lang(tinyxml2::XMLHandle& hDoc); bool store_roomname_translation(bool custom_level, int roomx, int roomy, const char* tra, const char* explanation); bool fix_room_coords(bool custom_level, int* roomx, int* roomy); void loadtext(bool check_max); void loadtext_custom(const char* custom_path); void loadlanguagelist(void); const char* map_lookup_text(hashmap* map, const char* eng, const char* fallback); char* add_disambiguator(char disambiguator, const char* original_string, size_t* ext_alloc_len); } /* namespace loc */ #undef LS_INTERN #endif /* LOCALIZATIONSTORAGE_H */ ================================================ FILE: desktop_version/src/Logic.cpp ================================================ #include "Credits.h" #include "Entity.h" #include "Enums.h" #include "FileSystemUtils.h" #include "Game.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "LevelDebugger.h" #include "Map.h" #include "Music.h" #include "Network.h" #include "Script.h" #include "UtilityClass.h" void titlelogic(void) { //Misc //map.updatetowerglow(graphics.titlebg); help.updateglow(); graphics.titlebg.bypos -= 2; graphics.titlebg.bscroll = -2; if (game.menucountdown > 0) { game.menucountdown--; if (game.menucountdown == 0) { if (game.menudest == Menu::mainmenu) { music.play(Music_PRESENTINGVVVVVV); } else if (game.menudest == Menu::gameover2) { music.playef(Sound_VIRIDIAN); } else if (game.menudest == Menu::timetrialcomplete3) { music.playef(Sound_TRINKET); } game.createmenu(game.menudest, true); } } } void maplogic(void) { //Misc help.updateglow(); } void gamecompletelogic(void) { //Misc map.updatetowerglow(graphics.titlebg); help.updateglow(); graphics.crewframe = 0; graphics.titlebg.scrolldir = 1; game.creditposition--; if (game.creditposition <= -Credits::creditmaxposition) { game.creditposition = -Credits::creditmaxposition; graphics.titlebg.bscroll = 0; } else if (!game.press_action) { graphics.titlebg.bscroll = +1; } if (graphics.fademode == FADE_FULLY_BLACK) { //Fix some graphical things graphics.showcutscenebars = false; graphics.setbars(0); graphics.titlebg.scrolldir = 0; graphics.titlebg.bypos = 0; //Return to game game.gamestate = GAMECOMPLETE2; graphics.fademode = FADE_START_FADEIN; game.skip_message_timer = 1000; game.old_skip_message_timer = 1000; } } void gamecompletelogic2(void) { //Misc map.updatetowerglow(graphics.titlebg); 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; } } if (graphics.fademode == FADE_FULLY_BLACK) { //Fix some graphical things graphics.showcutscenebars = false; graphics.setbars(0); //Fix the save thingy game.deletequick(); int tmp=music.currentsong; music.currentsong = Music_PASSIONFOREXPLORING; obj.flags[67] = true; game.savetele(); music.currentsong=tmp; //Return to game game.quittomenu(); game.createmenu(Menu::gamecompletecontinue); graphics.titlebg.colstate = 10; map.nexttowercolour(); } } static void gotoroom_wrapper(const int rx, const int ry) { map.gotoroom(rx, ry); } void gamelogic(void) { if (game.physics_frozen()) { level_debugger::logic(); return; } bool roomchange = false; #define GOTOROOM(rx, ry) \ gotoroom_wrapper(rx, ry); \ roomchange = true #define gotoroom Do not use map.gotoroom directly. /* Update old lerp positions of entities */ {size_t i; for (i = 0; i < obj.entities.size(); ++i) { obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; }} if (!game.blackout && !game.completestop) { size_t i; for (i = 0; i < obj.entities.size(); ++i) { /* Is this entity on the ground? (needed for jumping) */ if (obj.entitycollidefloor(i)) { obj.entities[i].onground = 2; } else { --obj.entities[i].onground; } if (obj.entitycollideroof(i)) { obj.entities[i].onroof = 2; } else { --obj.entities[i].onroof; } obj.animatehumanoidcollision(i); } } //Misc if (map.towermode) { map.updatetowerglow(graphics.towerbg); } help.updateglow(); if (game.alarmon) { game.alarmdelay--; if (game.alarmdelay <= 0) { music.playef(Sound_ALARM); game.alarmdelay = 20; } } if (obj.nearelephant) { obj.upset++; if (obj.upset == 300) { obj.upsetmode = true; //change player to sad int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 144; } music.playef(Sound_CRY); } 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(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 0; } } } else { obj.upset = 0; } obj.oldtrophytext = obj.trophytext; if (map.towermode) { map.oldypos = map.ypos; map.oldspikeleveltop = map.spikeleveltop; map.oldspikelevelbottom = map.spikelevelbottom; if(!game.completestop) { if (map.cameramode == 0) { //do nothing! //a trigger will set this off in the game map.cameramode = 1; } else if (map.cameramode == 1) { //move normally if(graphics.towerbg.scrolldir==0) { map.ypos -= 2; } else { map.ypos += 2; } } else if (map.cameramode == 2) { //do nothing, but cycle colours (for taking damage) } else if (map.cameramode == 4) { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { map.cameraseek = map.ypos - (obj.entities[i].yp - 120); } map.cameraseek = map.cameraseek / 10; map.cameraseekframe = 10; map.cameramode = 5; } 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 && INBOUNDS_VEC(i, obj.entities)) { if (map.ypos < obj.entities[i].yp - 120) { map.ypos = obj.entities[i].yp - 120; } } else if (INBOUNDS_VEC(i, obj.entities)) { if (map.ypos > obj.entities[i].yp - 120) { map.ypos = obj.entities[i].yp - 120; } } map.cameraseekframe--; } else { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { map.ypos = obj.entities[i].yp - 120; } map.cameramode = 0; map.colsuperstate = 0; } } } if (map.ypos <= 0) { map.ypos = 0; } if (map.towermode && map.minitowermode) { if (map.ypos >= 568) { map.ypos = 568; } //100-29 * 8 = 568 } else { if (map.ypos >= 5368) { map.ypos = 5368; //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(); if (game.lifeseq == 0) map.cameramode = 1; } else { map.resumedelay--; } } } } else { game.lifesequence(); } graphics.kludgeswnlinewidth = false; if (game.deathseq != -1) { if (map.towermode) { map.colsuperstate = 1; map.cameramode = 2; } for (size_t i = 0; i < obj.entities.size(); i++) { if (game.roomx == 111 && game.roomy == 107 && !map.custommode) { if (obj.entities[i].type == EntityType_MOVING) { if (obj.entities[i].xp < 152) { //Move the platform to the right side of the disappearing platform, //otherwise it will get stuck on the kludge 18,9 tile we placed //(and if the tile wasn't there it would pass straight through again) int prevx = obj.entities[i].xp; int prevy = obj.entities[i].yp; obj.disableblockat(prevx, prevy); obj.entities[i].xp = 152; obj.entities[i].newxp = 152; obj.moveblockto(prevx, prevy, obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); } } } if (obj.entities[i].type == EntityType_DISAPPEARING_PLATFORM && 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 || map.custommode) { obj.entities[i].state = 4; } else { obj.entities[i].state = 4; map.settile(18, 9, 59); } } else if (obj.entities[i].type == EntityType_DISAPPEARING_PLATFORM && 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! bool entitygone = false; while (obj.entities[i].state == 2) { entitygone = obj.updateentities(i); if (entitygone) { i--; break; } } if (!entitygone) obj.entities[i].state = 4; } else if (obj.entities[i].type == EntityType_GRAVITRON_ENEMY && 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 == SWN_GRAVITRON) { game.swnpenalty(); } else if (game.swngame == SWN_SUPERGRAVITRON) { game.swnstate = 0; game.swnstate2 = 0; game.swnstate3 = 0; game.swnstate4 = 0; game.swndelay = 0; #ifndef MAKEANDPLAY if (game.swntimer >= game.swnrecord && !map.custommode) { game.swnrecord = game.swntimer; if (game.swnmessage == 0) { music.playef(Sound_NEWRECORD); game.savestatsandsettings(); } game.swnmessage = 1; } #endif } } game.deathsequence(); game.deathseq--; if (game.deathseq <= 0) { game.invalidate_ndm_trophy(); if (game.nodeathmode) { game.deathseq = 1; game.gethardestroom(); //start depressing sequence here... if (game.gameoverdelay <= -10 && graphics.fademode == FADE_NONE) { graphics.fademode = FADE_START_FADEOUT; } if (graphics.fademode == FADE_FULLY_BLACK) { game.copyndmresults(); obj.entities.clear(); game.quittomenu(); game.createmenu(Menu::gameover); } } else { if (game.swnmode) { //if playing SWN game b, reset the clock if (game.swngame == SWN_SUPERGRAVITRON) { game.swntimer = 0; game.swnmessage = 0; game.swnrank = 0; } } game.gethardestroom(); game.hascontrol = true; game.gravitycontrol = game.savegc; graphics.textboxremove(); map.resetplayer(true); } } } 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; int temp = 1+int(fRandom() * 5); if (temp == map.final_mapcol) temp = (temp + 1) % 6; if (temp == 0) temp = 6; map.changefinalcol(temp); } else if (map.final_colorframe == 2) { map.final_colorframedelay = 15; int temp = 1+int(fRandom() * 5); if (temp == map.final_mapcol) temp = (temp + 1) % 6; if (temp == 0) temp = 6; map.changefinalcol(temp); } } } } } //State machine for game logic game.updatestate(); 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 (INBOUNDS_VEC(i, obj.entities) && 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? { switch (game.swngame) { case SWN_GRAVITRON: // intermission, survive 60 seconds game game.swntimer -= 1; if (game.swntimer <= 0) { music.niceplay(Music_PREDESTINEDFATE); game.swngame = SWN_FINISH_GRAVITRON_STEP_1; } else { obj.generateswnwave(0); } break; case SWN_SUPERGRAVITRON: game.swntimer += 1; #ifndef MAKEANDPLAY if (!map.custommode) { if (game.swntimer > game.swnrecord) { game.swnrecord = game.swntimer; } if (game.swntimer >= 150 && game.swnrank == 0) { game.swnrank = 1; if (game.swnbestrank < 1) { game.unlockAchievement("vvvvvvsupgrav5"); game.swnbestrank = 1; game.swnmessage = 2+30; music.playef(Sound_TROPHY); } } else if (game.swntimer >= 300 && game.swnrank == 1) { game.swnrank = 2; if (game.swnbestrank < 2) { game.unlockAchievement("vvvvvvsupgrav10"); game.swnbestrank = 2; game.swnmessage = 2+30; music.playef(Sound_TROPHY); } } else if (game.swntimer >= 450 && game.swnrank == 2) { game.swnrank = 3; if (game.swnbestrank < 3) { game.unlockAchievement("vvvvvvsupgrav15"); game.swnbestrank = 3; game.swnmessage = 2+30; music.playef(Sound_TROPHY); } } else if (game.swntimer >= 600 && game.swnrank == 3) { game.swnrank = 4; if (game.swnbestrank < 4) { game.unlockAchievement("vvvvvvsupgrav20"); game.swnbestrank = 4; game.swnmessage = 2+30; music.playef(Sound_TROPHY); } } else if (game.swntimer >= 900 && game.swnrank == 4) { game.swnrank = 5; if (game.swnbestrank < 5) { game.unlockAchievement("vvvvvvsupgrav30"); game.swnbestrank = 5; game.swnmessage = 2+30; music.playef(Sound_TROPHY); } } else if (game.swntimer >= 1800 && game.swnrank == 5) { game.swnrank = 6; if (game.swnbestrank < 6) { game.unlockAchievement("vvvvvvsupgrav60"); game.swnbestrank = 6; game.swnmessage = 2+30; music.playef(Sound_TROPHY); } } } #endif obj.generateswnwave(1); game.swncoldelay--; if(game.swncoldelay<=0) { game.swncolstate = (game.swncolstate+1)%6; game.swncoldelay = 30; graphics.rcol = game.swncolstate; obj.swnenemiescol(game.swncolstate); } break; case SWN_START_GRAVITRON_STEP_3: //introduce game a game.swndelay--; if (game.swndelay <= 0) { game.swngame = SWN_GRAVITRON; game.swndelay = 0; game.swntimer = (60 * 30) - 1; //game.swntimer = 15; } break; case SWN_START_GRAVITRON_STEP_2: //extend line { int line = obj.getlineat(84 - 32); if (INBOUNDS_VEC(line, obj.entities)) { obj.entities[line].w += 24; if (obj.entities[line].w > 332) { obj.entities[line].w = 332; game.swngame = SWN_START_GRAVITRON_STEP_3; graphics.kludgeswnlinewidth = true; } } break; } case SWN_START_GRAVITRON_STEP_1: //create top line game.swngame = SWN_START_GRAVITRON_STEP_2; obj.createentity(-8, 84 - 32, 11, 8); // (horizontal gravity line) music.niceplay(Music_POSITIVEFORCE); game.swndeaths = game.deathcounts; break; case SWN_FINISH_GRAVITRON_STEP_1: //remove line { int line = obj.getlineat(148 + 32); if (INBOUNDS_VEC(line, obj.entities)) { obj.entities[line].xp += 24; if (obj.entities[line].xp > 320) { obj.disableentity(line); game.swngame = SWN_FINISH_GRAVITRON_STEP_2; } } break; } case SWN_START_SUPERGRAVITRON_STEP_1: //Init the super gravitron game.swngame = SWN_START_SUPERGRAVITRON_STEP_2; music.niceplay(Music_POTENTIALFORANYTHING); break; case SWN_START_SUPERGRAVITRON_STEP_2: //introduce game b game.swndelay--; if (game.swndelay <= 0) { game.swngame = SWN_SUPERGRAVITRON; game.swndelay = 0; game.swntimer = 0; game.swncolstate = 3; game.swncoldelay = 30; } break; case SWN_FINISH_GRAVITRON_STEP_2: //extra kludge if player dies after game a ends { bool square_onscreen = false; for (size_t i = 0; i < obj.entities.size(); i++) { if (obj.entities[i].type == EntityType_GRAVITRON_ENEMY) { square_onscreen = true; break; } } if (!square_onscreen) { game.swnmode = false; } break; } case SWN_NONE: break; } } //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(Sound_COUNTDOWN); if(game.timetrialcountdown == 90) music.playef(Sound_COUNTDOWN); if(game.timetrialcountdown == 60) music.playef(Sound_COUNTDOWN); if (game.timetrialcountdown == 30) { switch(game.timetriallevel) { case TimeTrial_SPACESTATION1: music.play(Music_PUSHINGONWARDS); break; case TimeTrial_LABORATORY: music.play(Music_POTENTIALFORANYTHING); break; case TimeTrial_TOWER: if (graphics.flipmode) { music.play(Music_POSITIVEFORCEREVERSED); } else { music.play(Music_POSITIVEFORCE); } break; case TimeTrial_SPACESTATION2: music.play(Music_PUSHINGONWARDS); break; case TimeTrial_WARPZONE: music.play(Music_PRESSURECOOKER); break; case TimeTrial_FINALLEVEL: music.play(Music_PREDESTINEDFATEREMIX); break; } music.playef(Sound_GO); } } //Have we lost the par? if (!game.timetrialparlost) { if ((game.minutes * 60) + game.seconds > game.timetrialpar) { game.timetrialparlost = true; int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 144; } music.playef(Sound_CRY); } } } //Update entities //Ok, moving platform fuckers if(!game.completestop) { if(obj.vertplatforms) { for (int i = obj.entities.size() - 1; i >= 0; i--) { if (!obj.entities[i].isplatform || SDL_abs(obj.entities[i].vx) >= 0.000001f) { continue; } int prevx = obj.entities[i].xp; int prevy = obj.entities[i].yp; obj.disableblockat(prevx, prevy); bool entitygone = obj.updateentities(i); // Behavioral logic if (entitygone) continue; obj.updateentitylogic(i); // Basic Physics obj.entitymapcollision(i); // Collisions with walls obj.moveblockto(prevx, prevy, obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); obj.movingplatformfix(i, obj.getplayer()); if (game.supercrewmate) { obj.movingplatformfix(i, obj.getscm()); } } } if (obj.horplatforms) { for (int ie = obj.entities.size() - 1; ie >= 0; ie--) { if (!obj.entities[ie].isplatform || SDL_abs(obj.entities[ie].vy) >= 0.000001f) { continue; } int prevx = obj.entities[ie].xp; int prevy = obj.entities[ie].yp; obj.disableblockat(prevx, prevy); bool entitygone = obj.updateentities(ie); // Behavioral logic if (entitygone) continue; obj.updateentitylogic(ie); // Basic Physics obj.entitymapcollision(ie); // Collisions with walls obj.moveblockto(prevx, prevy, obj.entities[ie].xp, obj.entities[ie].yp, obj.entities[ie].w, obj.entities[ie].h); } //is the player standing on a moving platform? int i = obj.getplayer(); float j = obj.entitycollideplatformfloor(i); // To match 2.2, we need to give a bit of leeway in the lifeseq // before we start pushing the player. const bool horz_active = game.lifeseq < 8; if (horz_active && INBOUNDS_VEC(i, obj.entities) && j > -1000) { obj.entities[i].newxp = obj.entities[i].xp + j; obj.entitymapcollision(i); } else { j = obj.entitycollideplatformroof(i); if (horz_active && INBOUNDS_VEC(i, obj.entities) && j > -1000) { obj.entities[i].newxp = obj.entities[i].xp + j; obj.entitymapcollision(i); } } } for (int ie = obj.entities.size() - 1; ie >= 0; ie--) { if (obj.entities[ie].isplatform) { continue; } bool entitygone = obj.updateentities(ie); // Behavioral logic if (entitygone) continue; obj.updateentitylogic(ie); // Basic Physics obj.entitymapcollision(ie); // Collisions with walls } obj.entitycollisioncheck(); // Check ent v ent collisions, update states if (map.towermode) { //special for tower: is the player touching any spike blocks? int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities) && obj.checktowerspikes(player) /* not really needed, but is slight improvement when exiting to menu near spikes */ && graphics.fademode == FADE_NONE) { game.deathseq = 30; } } if(map.towermode && game.lifeseq==0) { int player = obj.getplayer(); if(!map.invincibility && INBOUNDS_VEC(player, obj.entities)) { 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 (INBOUNDS_VEC(player, obj.entities)) { const bool above_screen = obj.entities[player].yp-map.ypos <= 8; const bool below_screen = obj.entities[player].yp-map.ypos >= 200; if (above_screen) { if (obj.entities[player].yp - map.ypos <= 0) { if (graphics.towerbg.scrolldir == 1) { /* Descending tower: * Counteract 10 pixels of terminal velocity * + 2 pixels of camera movement */ map.ypos -= 12; } else { /* Ascending tower: * Move 8 out of 10 pixels of terminal velocity * Camera movement will move 2 pixels for us */ map.ypos -= 8; } } else { /* Counter 2 pixels of camera movement */ map.ypos -= 2; } } else if (below_screen) { if (obj.entities[player].yp - map.ypos >= 208) { if (graphics.towerbg.scrolldir == 0) { /* Ascending tower: * Counteract 10 pixels of terminal velocity * + 2 pixels of camera movement */ map.ypos += 12; } else { /* Descending tower: * Move 8 out of 10 pixels of terminal velocity * Camera movement will move 2 pixels for us */ map.ypos += 8; } } else { /* Counter 2 pixels of camera movement */ map.ypos += 2; } } if (above_screen || below_screen) { /* The buffer isn't big enough; we have to redraw */ graphics.towerbg.tdrawback = true; } } if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp - map.ypos <= 40) { map.spikeleveltop++; if (map.spikeleveltop >= 8) map.spikeleveltop = 8; } else { if (map.spikeleveltop > 0) map.spikeleveltop--; } if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp - map.ypos >= 164) { map.spikelevelbottom++; if (map.spikelevelbottom >= 8) map.spikelevelbottom = 8; } else { if (map.spikelevelbottom > 0) map.spikelevelbottom--; } } } //Using warplines? if (obj.customwarpmode) { if (!GlitchrunnerMode_less_than_or_equal(Glitchrunner2_0)) { //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 (INBOUNDS_VEC(i, obj.entities) && (obj.entities[i].yp >= 226-16 || obj.entities[i].yp < -2+16 || obj.entities[i].xp < -14+16 || 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.towermode) { size_t i; for (i = 0; i < obj.entities.size(); ++i) { if (obj.entities[i].type == EntityType_WARP_LINE_LEFT || obj.entities[i].type == EntityType_WARP_LINE_RIGHT || obj.entities[i].type == EntityType_WARP_LINE_TOP || obj.entities[i].type == EntityType_WARP_LINE_BOTTOM /* Don't warp warp lines */ || obj.entities[i].size == 12) /* Don't warp gravitron squares */ { continue; } if (game.roomx == 118 && game.roomy == 102 && obj.entities[i].rule==1 && !map.custommode) { //ascii snakes if (obj.entities[i].xp <= -80) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp + 400, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].xp += 400; obj.entities[i].lerpoldxp += 400; } else if (obj.entities[i].xp > 320) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp - 400, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].xp -= 400; obj.entities[i].lerpoldxp -= 400; } } else { if (obj.entities[i].xp <= -10) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp + 320, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].xp += 320; obj.entities[i].lerpoldxp += 320; } else if (obj.entities[i].xp > 310) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp - 320, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].xp -= 320; obj.entities[i].lerpoldxp -= 320; } } } } if (map.warpy && !map.towermode) { size_t i; for (i = 0; i < obj.entities.size(); ++i) { if (obj.entities[i].type == EntityType_WARP_LINE_LEFT || obj.entities[i].type == EntityType_WARP_LINE_RIGHT || obj.entities[i].type == EntityType_WARP_LINE_TOP || obj.entities[i].type == EntityType_WARP_LINE_BOTTOM) /* Don't warp warp lines */ { continue; } if (obj.entities[i].yp <= -12) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp, obj.entities[i].yp + 232, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].yp += 232; obj.entities[i].lerpoldyp += 232; } else if (obj.entities[i].yp > 226) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp, obj.entities[i].yp - 232, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].yp -= 232; obj.entities[i].lerpoldyp -= 232; } } } if (map.warpy && !map.warpx && !map.towermode) { size_t i; for (i = 0; i < obj.entities.size(); ++i) { if ((obj.entities[i].type == EntityType_WARP_LINE_LEFT || obj.entities[i].type == EntityType_WARP_LINE_RIGHT || obj.entities[i].type == EntityType_WARP_LINE_TOP || obj.entities[i].type == EntityType_WARP_LINE_BOTTOM) /* Don't warp warp lines */ || obj.entities[i].rule == 0) /* Don't warp the player */ { continue; } if (obj.entities[i].xp <= -30) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp + 350, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].xp += 350; obj.entities[i].lerpoldxp += 350; } else if (obj.entities[i].xp > 320) { if (obj.entities[i].isplatform) { obj.moveblockto(obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].xp - 350, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); } obj.entities[i].xp -= 350; obj.entities[i].lerpoldxp -= 350; } } } if (!map.warpy && !map.towermode) { //Normal! Just change room int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp >= 238) { obj.entities[player].yp -= 240; GOTOROOM(game.roomx, game.roomy + 1); } if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].yp < -2) { obj.entities[player].yp += 240; GOTOROOM(game.roomx, game.roomy - 1); } } if (!map.warpx && !map.towermode) { //Normal! Just change room int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { obj.entities[player].xp += 320; GOTOROOM(game.roomx - 1, game.roomy); } if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; GOTOROOM(game.roomx + 1, game.roomy); } } //Right so! Screenwraping for tower: if (map.towermode && map.minitowermode) { if (graphics.towerbg.scrolldir == 1) { //This is minitower 1! int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { obj.entities[player].xp += 320; GOTOROOM(48, 52); } if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; obj.entities[player].yp -= (71*8); GOTOROOM(game.roomx + 1, game.roomy+1); } } else { //This is minitower 2! int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { if (obj.entities[player].yp > 300) { obj.entities[player].xp += 320; obj.entities[player].yp -= (71 * 8); GOTOROOM(50, 54); } else { obj.entities[player].xp += 320; GOTOROOM(50, 53); } } if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; GOTOROOM(52, 53); } } } else if (map.towermode) { //Always wrap except for the very top and very bottom of the tower if(map.ypos>=500 && map.ypos <=5000) { for (size_t i = 0; i < obj.entities.size(); i++) { if (obj.entities[i].xp <= -10) { obj.entities[i].xp += 320; obj.entities[i].lerpoldxp += 320; } else if (obj.entities[i].xp > 310) { obj.entities[i].xp -= 320; obj.entities[i].lerpoldxp -= 320; } } } else { //Do not wrap! Instead, go to the correct room int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp < -14) { obj.entities[player].xp += 320; obj.entities[player].yp -= (671 * 8); GOTOROOM(108, 109); } if (INBOUNDS_VEC(player, obj.entities) && obj.entities[player].xp >= 308) { obj.entities[player].xp -= 320; GOTOROOM(110, 104); } } } //Warp tokens if (map.custommode){ if (game.teleport && INBOUNDS_VEC(game.edteleportent, obj.entities)) { int edi=obj.entities[game.edteleportent].behave; int edj=obj.entities[game.edteleportent].para; int edi2, edj2; edi2 = edi/40; edj2 = edj/30; map.warpto(100+edi2, 100+edj2, obj.getplayer(), edi%40, (edj%30)+2); 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(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].yp = 225; } GOTOROOM(119, 100); game.teleport = false; } else if (game.roomx == 119 && game.roomy == 100) { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].yp = 225; } GOTOROOM(119, 103); game.teleport = false; } else if (game.roomx == 119 && game.roomy == 103) { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp = 0; } GOTOROOM(116, 103); game.teleport = false; } else if (game.roomx == 116 && game.roomy == 103) { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].yp = 225; } GOTOROOM(116, 100); game.teleport = false; } else if (game.roomx == 116 && game.roomy == 100) { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp = 0; } GOTOROOM(114, 102); game.teleport = false; } else if (game.roomx == 114 && game.roomy == 102) { int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].yp = 225; } GOTOROOM(113, 100); game.teleport = false; } else if (game.roomx == 116 && game.roomy == 104) { //pre warp zone here map.warpto(107, 101, obj.getplayer(), 14, 16); } else if (game.roomx == 107 && game.roomy == 101) { map.warpto(105, 119, obj.getplayer(), 5, 26); } else if (game.roomx == 105 && game.roomy == 118) { map.warpto(101, 111, obj.getplayer(), 34, 6); } 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); break; case 2: map.warpto(101, 111, obj.getplayer(), 12, 27); break; case 3: map.warpto(119, 111, obj.getplayer(), 31, 7); break; case 4: map.warpto(114, 117, obj.getplayer(), 19, 16); break; } } else if (game.roomx == 108 && game.roomy == 106) { map.warpto(119, 111, obj.getplayer(), 4, 27); } else if (game.roomx == 100 && game.roomy == 111) { map.warpto(101, 111, obj.getplayer(), 24, 6); } else if (game.roomx == 119 && game.roomy == 107) { //Secret lab, to super gravitron map.warpto(119, 108, obj.getplayer(), 19, 10); } if (game.teleport == false) { game.flashlight = 6; game.screenshake = 25; } } } if (roomchange) { map.twoframedelayfix(); } } if (map.towermode) { map.setbgobjlerp(graphics.towerbg); } //Update colour cycling for final level if (map.finalmode && map.final_colormode) { map.final_aniframedelay--; if (map.final_aniframedelay == 0) { graphics.foregrounddrawn = false; } if (map.final_aniframedelay <= 0) { map.final_aniframedelay = 2; map.final_aniframe++; if (map.final_aniframe >= 4) { map.final_aniframe = 0; } } } game.activeactivity = obj.checkactivity(); if (game.hascontrol && !script.running && INBOUNDS_VEC(game.activeactivity, obj.blocks)) { game.activity_lastprompt = obj.blocks[game.activeactivity].prompt; game.activity_gettext = obj.blocks[game.activeactivity].gettext; game.activity_r = obj.blocks[game.activeactivity].r; game.activity_g = obj.blocks[game.activeactivity].g; game.activity_b = obj.blocks[game.activeactivity].b; game.activity_y = obj.blocks[game.activeactivity].activity_y; } game.oldreadytotele = game.readytotele; if (game.activetele && game.hascontrol && !script.running && (!game.intimetrial || game.translator_exploring_allowtele)) { int i = obj.getplayer(); SDL_Rect temprect = SDL_Rect(); if (INBOUNDS_VEC(i, obj.entities)) { temprect.x = obj.entities[i].xp + obj.entities[i].cx; temprect.y = obj.entities[i].yp + obj.entities[i].cy; temprect.w = obj.entities[i].w; temprect.h = obj.entities[i].h; } if (help.intersects(game.teleblock, 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(); #undef gotoroom #undef GOTOROOM level_debugger::logic(); } ================================================ FILE: desktop_version/src/Logic.h ================================================ #ifndef LOGIC_H #define LOGIC_H void titlelogic(void); void maplogic(void); void gamecompletelogic(void); void gamecompletelogic2(void); void gamelogic(void); #endif /* LOGIC_H */ ================================================ FILE: desktop_version/src/MakeAndPlay.h ================================================ #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 */ ================================================ FILE: desktop_version/src/Map.cpp ================================================ #define MAP_DEFINITION #include "Map.h" #include "Alloc.h" #include "Constants.h" #include "CustomLevels.h" #include "Entity.h" #include "Game.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "Localization.h" #include "MakeAndPlay.h" #include "Maths.h" #include "Music.h" #include "Script.h" #include "Unused.h" #include "UtilityClass.h" mapclass::mapclass(void) { //Start here! colstatedelay = 0; colsuperstate = 0; spikeleveltop = 0; spikelevelbottom = 0; oldspikeleveltop = 0; oldspikelevelbottom = 0; warpx = false; warpy = false; extrarow = 0; showteleporters = false; showtargets = false; showtrinkets = false; finalmode = false; finalstretch = false; cursorstate = 0; cursordelay = 0; towermode = false; cameraseekframe = 0; resumedelay = 0; final_colormode = false; final_colorframe = 0; final_colorframedelay = 0; final_mapcol = 0; final_aniframe = 0; final_aniframedelay = 0; custommode=false; custommodeforreal=false; customshowmm=true; revealmap = true; rcol = 0; //This needs to be in map instead! invincibility = false; //We create a blank map SDL_memset(contents, 0, sizeof(contents)); SDL_memset(roomdeaths, 0, sizeof(roomdeaths)); SDL_memset(roomdeathsfinal, 0, sizeof(roomdeathsfinal)); resetmap(); setroomname(""); hiddenname = ""; roomname_special = false; specialroomnames.clear(); roomnameset = false; tileset = 0; initmapdata(); ypos = 0; oldypos = 0; background = 0; cameramode = 0; cameraseek = 0; minitowermode = false; roomtexton = false; nexttowercolour_set = false; currentregion = 0; SDL_zeroa(region); } static char roomname_static[SCREEN_WIDTH_CHARS]; static char* roomname_heap; void mapclass::destroy(void) { VVV_free(roomname_heap); } //Areamap starts at 100,100 and extends 20x20 const int mapclass::areamap[] = { 1,2,2,2,2,2,2,2,0,3,0,0,0,4,4,4,4,4,4,4, 1,2,2,2,2,2,2,0,0,3,0,0,0,0,4,4,4,4,4,4, 0,1,0,0,2,0,0,0,0,3,0,0,0,0,4,4,4,4,4,4, 0,0,0,0,2,0,0,0,0,3,0,0,5,5,5,5,4,4,4,4, 0,0,2,2,2,0,0,0,0,3,11,11,5,5,5,5,0,0,0,0, 0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,0,0,0,0, 0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,5,0,0,0, 0,0,0,0,0,0,0,0,0,3,5,5,5,5,5,5,5,5,5,0, 0,0,0,0,0,0,0,0,0,3,0,0,0,5,5,5,5,5,5,0, 0,0,0,0,0,0,0,0,11,3,0,0,0,5,5,5,5,5,5,0, 0,0,0,0,0,0,0,0,0,3,0,0,0,5,5,5,5,5,5,0, 0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,5,5,0, 0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,0,5,0, 0,0,0,0,0,0,0,0,0,3,0,5,5,5,5,5,5,0,5,0, 0,0,0,0,0,0,0,0,0,3,0,5,5,0,0,0,0,0,5,0, 0,0,0,0,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,0,3,0,0,0,0,0,0,0,0,0,0, 0,2,2,2,2,2,2,2,0,3,0,0,0,0,0,0,0,0,0,0, 2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0, 2,2,2,2,2,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0, }; int mapclass::getwidth(void) { if (custommode) { return cl.mapwidth; } return 20; } int mapclass::getheight(void) { if (custommode) { return cl.mapheight; } return 20; } int mapclass::intpol(int a, int b, float c) { return static_cast(a + ((b - a) * c)); } void mapclass::setteleporter(int x, int y) { if (x < 0 || x >= getwidth() || y < 0 || y >= getheight()) { return; } SDL_Point temp; temp.x = x; temp.y = y; teleporters.push_back(temp); } void mapclass::settrinket(int x, int y) { if (x < 0 || x >= getwidth() || y < 0 || y >= getheight()) { return; } SDL_Point temp; temp.x = x; temp.y = y; shinytrinkets.push_back(temp); } void mapclass::setroomname(const char* name) { VVV_free(roomname_heap); const size_t size = SDL_strlcpy( roomname_static, name, sizeof(roomname_static) ) + 1; roomname = roomname_static; if (size > sizeof(roomname_static)) { roomname_heap = SDL_strdup(name); if (roomname_heap != NULL) { roomname = roomname_heap; } } } void mapclass::resetmap(void) { //clear the explored area of the map SDL_memset(explored, 0, sizeof(explored)); } void mapclass::fullmap(void) { //mark the whole map as explored SDL_memset(explored, 1, sizeof(explored)); } void mapclass::updateroomnames(void) { if (roomnameset) { return; } const int rx = game.roomx; const int ry = game.roomy; for (int i = specialroomnames.size() - 1; i >= 0; i--) { Roomname* roomname = &specialroomnames[i]; if (rx == roomname->x && ry == roomname->y && (roomname->flag == -1 || (INBOUNDS_ARR(roomname->flag, obj.flags) && obj.flags[roomname->flag]))) { roomname_special = true; if (roomname->type == RoomnameType_STATIC && roomname->text.size() >= 1) { setroomname(roomname->text[0].c_str()); } if (roomname->type == RoomnameType_GLITCH && roomname->text.size() >= 2) { roomname->delay--; if (roomname->delay <= 0) { roomname->progress = (roomname->progress + 1) % 2; roomname->delay = 5; if (roomname->progress == 0) { roomname->delay = 25 + (int) (fRandom() * 10); } } setroomname(roomname->text[roomname->progress].c_str()); } if (roomname->type == RoomnameType_TRANSFORM && roomname->text.size() >= 1) { roomname->delay--; if (roomname->delay <= 0) { roomname->progress++; roomname->delay = 2; if ((size_t) roomname->progress >= roomname->text.size()) { roomname->progress = roomname->loop ? 0 : roomname->text.size() - 1; } } setroomname(roomname->text[roomname->progress].c_str()); } break; } } } void mapclass::initmapdata(void) { if (custommode) { initcustommapdata(); return; } teleporters.clear(); shinytrinkets.clear(); //Set up static map information like teleporters and shiny trinkets. setteleporter(0, 0); setteleporter(0, 16); setteleporter(2, 4); setteleporter(2, 11); setteleporter(7, 9); setteleporter(7, 15); setteleporter(8, 11); setteleporter(10, 5); setteleporter(11, 4); setteleporter(13, 2); setteleporter(13, 8); setteleporter(14, 19); setteleporter(15, 0); setteleporter(17, 12); setteleporter(17, 17); setteleporter(18, 1); setteleporter(18, 7); settrinket(14, 4); settrinket(13, 6); settrinket(11, 12); settrinket(15, 12); settrinket(14, 11); settrinket(18, 14); settrinket(11, 7); settrinket(9, 2); settrinket(9, 16); settrinket(2, 18); settrinket(7, 18); settrinket(6, 1); settrinket(17, 3); settrinket(10, 19); settrinket(5, 15); settrinket(1, 10); settrinket(3, 2); settrinket(10, 8); //Special room names specialroomnames.clear(); { static const char* lines[] = { "Television Newsvel", "TelevisvonvNewsvel", "TvlvvvsvonvNevsvel", "vvvvvvsvovvNe svel", "vhv vvv'vvovv vevl", "vhv V v'Cvovv vewv", "vhe 9 v'Cvovv vewv", "vhe 9 v'Cvovv Newv", "The 9 O'Cvovk Newv", "The 9 O'Clock News" }; roomnamechange(45, 51, lines, SDL_arraysize(lines)); } { static const char* lines[] = { "Vwitvhed", "vVwivcvedv", "vvvwMvcvMdvv", "DvvvwMvfvvMdvvv", "Dvav Mvfvr Mdvvvv", "Diav M for Mdrver", "Dial M for Murder" }; roomnamechange(46, 51, lines, SDL_arraysize(lines)); } { static const char* lines[] = { "Gvnsmove", "Gvnvmovevv", "Gunvmove1vv6", "Vunsmoke 19v6", "Gunsmoke 1966" }; roomnamechange(47, 51, lines, SDL_arraysize(lines)); } { static const char* lines[] = { "Please envoy theve repeats", "Plse envoy tse rvpvas", "Plse envoy tse rvpvas", "Vl envoy te rvevs", "Vv evo tv vevs", "Iv vhv Mvrvivs", "In the Margins" }; roomnamechange(50, 53, lines, SDL_arraysize(lines)); } { static const char* lines[] = { "Try Viggling the Antenna", "TryJivglvng theAvtevna", "Tvvivglvng thAvtvvv", "Vvvgglvnv tvnvva", "Vvavvnvs vvtv", "Veavvn's Gvte", "Heaven's Gate" }; roomnamechange(50, 54, lines, SDL_arraysize(lines)); } roomnameglitch(42, 51, "Rear Window", "Rear Vindow"); roomnameglitch(48, 51, "On the Waterfront", "On the Vaterfront"); roomnameglitch(49, 51, "The Untouchables", "The Untouchavles"); } void mapclass::roomnameglitch(int x, int y, const char* name, const char* text) { Roomname roomname; roomname.x = x; roomname.y = y; roomname.type = RoomnameType_GLITCH; roomname.flag = -1; roomname.loop = false; roomname.progress = 1; roomname.delay = -1; roomname.text.push_back(name); roomname.text.push_back(text); specialroomnames.push_back(roomname); } void mapclass::roomnamechange(const int x, const int y, const char** lines, const size_t size) { Roomname roomname; roomname.x = x; roomname.y = y; roomname.type = RoomnameType_TRANSFORM; roomname.flag = 72; // Flag 72 is synced with finalstretch roomname.loop = false; roomname.progress = 0; roomname.delay = 2; roomname.text.insert(roomname.text.end(), lines, lines + size); specialroomnames.push_back(roomname); } void mapclass::initcustommapdata(void) { shinytrinkets.clear(); for (size_t i = 0; i < customentities.size(); i++) { const CustomEntity& ent = customentities[i]; if (ent.t != 9) { continue; } settrinket(ent.rx, ent.ry); } } int mapclass::finalat(int x, int y) { //return the tile index of the final stretch tiles offset by the colour difference const int tile = contents[TILE_IDX(x, y)]; if (tile == 740) { //Special case: animated tiles if (final_mapcol == 1) { int offset; if (game.noflashingmode) { offset = 0; } else { offset = int(fRandom() * 11) * 40; } return 737 + offset; } else { int offset; if (game.noflashingmode) { offset = 0; } else { offset = final_aniframe * 40; } return tile - (final_mapcol * 3) + offset; } } else if (tile >= 80) { return tile - (final_mapcol * 3); } else { return tile; } } int mapclass::maptiletoenemycol(int t) { //returns the colour index for enemies that matches the map colour t switch(t) { case 0: return EntityColour_ENEMY_CYAN; break; case 1: return EntityColour_ENEMY_RED; break; case 2: return EntityColour_ENEMY_PINK; break; case 3: return EntityColour_ENEMY_BLUE; break; case 4: return EntityColour_ENEMY_YELLOW; break; case 5: return EntityColour_ENEMY_GREEN; break; case 6: return EntityColour_ENEMY_GRAY; break; } return EntityColour_ENEMY_CYAN; } void mapclass::changefinalcol(int t) { //change the map to colour t - for the game's final stretch. //First up, the tiles. This is just a setting: final_mapcol = t; const int temp = 6 - t; //Next, entities for (size_t i = 0; i < obj.entities.size(); i++) { if (obj.entities[i].type == EntityType_MOVING) { 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 == EntityType_DISAPPEARING_PLATFORM) { obj.entities[i].tile = 915+(temp*40); } } } void mapclass::setcol(TowerBG& bg_obj, const int r1, const int g1, const int b1 , const int r2, const int g2, const int b2, const int c) { bg_obj.r = intpol(r1, r2, c / 5); bg_obj.g = intpol(g1, g2, c / 5); bg_obj.b = intpol(b1, b2, c / 5); } void mapclass::updatebgobj(TowerBG& bg_obj) { const int check = bg_obj.colstate % 5; //current state of phase const int cmode = (bg_obj.colstate - check) / 5; // current colour transition; switch(cmode) { case 0: setcol(bg_obj, 255, 93, 107, 255, 255, 93, check); break; case 1: setcol(bg_obj, 255, 255, 93, 159, 255, 93, check); break; case 2: setcol(bg_obj, 159, 255, 93, 93, 245, 255, check); break; case 3: setcol(bg_obj, 93, 245, 255, 177, 93, 255, check); break; case 4: setcol(bg_obj, 177, 93, 255, 255, 93, 255, check); break; case 5: setcol(bg_obj, 255, 93, 255, 255, 93, 107, check); break; } bg_obj.tdrawback = true; } void mapclass::setbgobjlerp(TowerBG& bg_obj) { bg_obj.bypos = ypos / 2; bg_obj.bscroll = (ypos - oldypos) / 2; } void mapclass::updatetowerglow(TowerBG& bg_obj) { if (colstatedelay <= 0 || colsuperstate > 0) { if (colsuperstate > 0) bg_obj.colstate--; bg_obj.colstate++; if (bg_obj.colstate >= 30) bg_obj.colstate = 0; const int check = bg_obj.colstate % 5; updatebgobj(bg_obj); if (check == 0) { colstatedelay = 45; } else { colstatedelay = 0; } if (colsuperstate > 0) colstatedelay = 0; } else { colstatedelay--; } } void mapclass::nexttowercolour(void) { /* Prevent cycling title BG more than once per frame. */ if (nexttowercolour_set) { return; } nexttowercolour_set = true; graphics.titlebg.colstate+=5; if (graphics.titlebg.colstate >= 30) graphics.titlebg.colstate = 0; updatebgobj(graphics.titlebg); } void mapclass::settowercolour(int t) { graphics.titlebg.colstate=t*5; if (graphics.titlebg.colstate >= 30) graphics.titlebg.colstate = 0; updatebgobj(graphics.titlebg); } bool mapclass::towerspikecollide(int x, int y) { if (tower.at(x,y,0)>= 6 && tower.at(x,y,0) <= 11) return true; return false; } bool mapclass::collide(int x, int y, const bool invincible) { if (towermode) { if (tower.at(x, y, 0) >= 12 && tower.at(x, y, 0) <= 27) return true; if (invincible) { if (tower.at(x, y, 0) >= 6 && tower.at(x, y, 0) <= 11) return true; } } else if (tileset == 2) { int tile; if (y == -1) return collide(x, y + 1, invincible); if (y == 29+extrarow) return collide(x, y - 1, invincible); if (x == -1) return collide(x + 1, y, invincible); if (x == 40) return collide(x - 1, y, invincible); if (x < 0 || y < 0 || x >= 40 || y >= 29 + extrarow) return false; tile = contents[TILE_IDX(x, y)]; if (tile >= 12 && tile <= 27) return true; if (invincible) { if (tile >= 6 && tile <= 11) return true; } } else { int tile; if (y == -1) return collide(x, y + 1, invincible); if (y == 29+extrarow) return collide(x, y - 1, invincible); if (x == -1) return collide(x + 1, y, invincible); if (x == 40) return collide(x - 1, y, invincible); if (x < 0 || y < 0 || x >= 40 || y >= 29+extrarow) return false; tile = contents[TILE_IDX(x, y)]; if (tile == 1) return true; if (tileset==0 && tile == 59) return true; if (tile>= 80 && tile < 680) return true; if (tile == 740 && tileset==1) return true; if (invincible) { if (tile>= 6 && tile <= 9) return true; if (tile>= 49 && tile <= 50) return true; if (tileset == 1) { if (tile>= 49 && tile < 80) return true; } } } return false; } void mapclass::settile(int xp, int yp, int t) { if (xp >= 0 && xp < 40 && yp >= 0 && yp < 29+extrarow) { contents[TILE_IDX(xp, yp)] = t; } } int mapclass::area(int _rx, int _ry) { //THIS IS THE BUG if (finalmode) { return 6; } else { int lookup = (_rx - 100) + ((_ry - 100) * 20); if(_rx-100>=0 && _rx-100<20 && _ry-100>=0 && _ry-100<20){ return areamap[lookup]; } else { return 6; } } } bool mapclass::isexplored(const int rx, const int ry) { const int roomnum = rx + ry*20; if (INBOUNDS_ARR(roomnum, explored)) { return explored[roomnum]; } return false; } void mapclass::setexplored(const int rx, const int ry, const bool status) { const int roomnum = rx + ry*20; if (INBOUNDS_ARR(roomnum, explored)) { explored[roomnum] = status; } } void mapclass::exploretower(void) { for (int i = 0; i < 20; i++) { setexplored(9, i, true); } } void mapclass::hideship(void) { //remove the ship from the explored areas setexplored(2, 10, false); setexplored(3, 10, false); setexplored(4, 10, false); setexplored(2, 11, false); setexplored(3, 11, false); setexplored(4, 11, false); } void mapclass::showship(void) { //show the ship in the explored areas setexplored(2, 10, true); setexplored(3, 10, true); setexplored(4, 10, true); setexplored(2, 11, true); setexplored(3, 11, true); setexplored(4, 11, true); } void mapclass::resetplayer(void) { resetplayer(false); } void mapclass::resetplayer(const bool player_died) { bool was_in_tower = towermode; if (game.roomx != game.saverx || game.roomy != game.savery) { gotoroom(game.saverx, game.savery); } game.deathseq = -1; int i = obj.getplayer(); if(INBOUNDS_VEC(i, obj.entities)) { 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; //Fix conveyor death loop glitch obj.entities[i].newxp = obj.entities[i].xp; obj.entities[i].newyp = obj.entities[i].yp; obj.entities[i].dir = game.savedir; obj.entities[i].colour = game.savecolour; if (player_died) { game.lifeseq = 10; obj.entities[i].invis = true; } else { obj.entities[i].invis = false; } if (!GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { obj.entities[i].size = 0; obj.entities[i].cx = 6; obj.entities[i].cy = 2; obj.entities[i].w = 12; obj.entities[i].h = 21; } // If we entered a tower as part of respawn, reposition camera if (!was_in_tower && towermode) { ypos = obj.entities[i].yp - 120; if (ypos < 0) { ypos = 0; } oldypos = ypos; setbgobjlerp(graphics.towerbg); } } if (game.state == 0 && !script.running && game.completestop) { /* Looks like a collection dialogue was interrupted. * Undo its effects! */ game.advancetext = false; graphics.showcutscenebars = false; if (music.currentsong > -1) { music.fadeMusicVolumeIn(3000); } } 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; } } } void mapclass::warpto(int rx, int ry , int t, int tx, int ty) { gotoroom(rx, ry); game.teleport = false; if (INBOUNDS_VEC(t, obj.entities)) { obj.entities[t].xp = tx * 8; obj.entities[t].yp = (ty * 8) - obj.entities[t].h; obj.entities[t].lerpoldxp = obj.entities[t].xp; obj.entities[t].lerpoldyp = obj.entities[t].yp; } game.gravitycontrol = 0; } void mapclass::gotoroom(int rx, int ry) { int roomchangedir; std::vector linecrosskludge; //First, destroy the current room obj.removeallblocks(); game.activetele = false; game.readytotele = 0; game.oldreadytotele = 0; //Ok, let's save the position of all lines on the screen for (size_t i = 0; i < obj.entities.size(); i++) { if (obj.entities[i].type == EntityType_HORIZONTAL_GRAVITY_LINE) { //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(linecrosskludge, i); } } } /* Disable all entities in the room, and deallocate any unnecessary entity slots. */ /* However don't disable player entities, but do preserve holes between them (if any). */ bool player_found = false; for (int i = obj.entities.size() - 1; i >= 0; --i) { /* Iterate in reverse order to prevent unnecessary indice shifting */ if (obj.entities[i].rule == 0) { player_found = true; continue; } if (!player_found) { obj.entities.erase(obj.entities.begin() + i); } else { obj.disableentity(i); } } if (rx < game.roomx) { roomchangedir = 0; } else { roomchangedir = 1; } if (finalmode) { //Ok, what way are we moving? game.roomx = rx; game.roomy = ry; if (game.roomy < 10) { game.roomy = 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 && game.roomx == 46 && game.roomy == 54) { music.niceplay(Music_PREDESTINEDFATEREMIX); } } else if (custommode) { game.roomx = rx; game.roomy = ry; if (game.roomx < 100) game.roomx = 100 + cl.mapwidth-1; if (game.roomy < 100) game.roomy = 100 + cl.mapheight-1; if (game.roomx > 100 + cl.mapwidth-1) game.roomx = 100; if (game.roomy > 100 + cl.mapheight-1) game.roomy = 100; } else { game.roomx = rx; game.roomy = ry; 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: music.changemusicarea(game.roomx - 100, game.roomy - 100); } loadlevel(game.roomx, game.roomy); //Do we need to reload the background? bool redrawbg = game.roomx != game.prevroomx || game.roomy != game.prevroomy; if (redrawbg) { graphics.backgrounddrawn = false; //Used for background caching speedup } graphics.foregrounddrawn = false; //Used for background caching speedup game.prevroomx = game.roomx; game.prevroomy = game.roomy; //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] && !finalmode) { game.setstate(0); if (game.roomx == 113 && game.roomy == 104) { game.setstate(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! const int player_idx = obj.getplayer(); if (INBOUNDS_VEC(player_idx, obj.entities)) { entclass* player = &obj.entities[player_idx]; player->oldxp = player->xp; player->oldyp = player->yp; player->lerpoldxp = player->xp - int(player->vx); player->lerpoldyp = player->yp - int(player->vy); } for (size_t i = 0; i < obj.entities.size(); i++) { if (obj.entities[i].type == EntityType_HORIZONTAL_GRAVITY_LINE) { //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 (size_t j = 0; j < linecrosskludge.size(); j++) { if (obj.entities[i].yp == linecrosskludge[j].yp) { //y's match, how about x's? //we're moving left: if (roomchangedir == 0) { if (obj.entities[i].xp + obj.entities[i].w >= 312 && linecrosskludge[j].xp <= 0) { obj.revertlinecross(linecrosskludge, i, j); } } else { if (obj.entities[i].xp <= 0 && linecrosskludge[j].xp + linecrosskludge[j].w >= 312) { obj.revertlinecross(linecrosskludge, i, j); } } } } } } } if (game.companion > 0) { //We've changed room? Let's bring our companion along! spawncompanion(); } } void mapclass::spawncompanion(void) { int i = obj.getplayer(); if (!INBOUNDS_VEC(i, obj.entities)) { return; } //ok, we'll presume our companion has been destroyed in the room change. So: switch(game.companion) { case 6: { obj.createentity(obj.entities[i].xp, 121.0f, 15.0f,1); //Y=121, the floor in that particular place! int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { 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(320, 86, 16, 1); //Y=86, the ROOF in that particular place! } else { obj.createentity(obj.entities[i].xp, 86.0f, 16.0f, 1); //Y=86, the ROOF in that particular place! } int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { 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(310, 177, 17, 1); int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[j].vx = obj.entities[i].vx; obj.entities[j].dir = obj.entities[i].dir; } } else { obj.createentity(obj.entities[i].xp, 177.0f, 17.0f, 1); int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[j].vx = obj.entities[i].vx; obj.entities[j].dir = obj.entities[i].dir; } } } break; case 9: if (!towermode) //don't go back into the tower! { if (game.roomx == 110 && obj.entities[i].xp<20) { obj.createentity(100, 185, 18, 15, 0, 1); } else { obj.createentity(obj.entities[i].xp, 185.0f, 18.0f, 15, 0, 1); } int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { 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]) { obj.createentity(225.0f, 169.0f, 18, graphics.crewcolour(game.lastsaved), 0, 10); int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { 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]) { obj.createentity(160.0f, 177.0f, 18, graphics.crewcolour(game.lastsaved), 0, 18, 1); int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[j].vx = obj.entities[i].vx; obj.entities[j].dir = obj.entities[i].dir; } } else { obj.flags[59] = true; obj.createentity(obj.entities[i].xp, -20.0f, 18.0f, graphics.crewcolour(game.lastsaved), 0, 10, 0); int j = obj.getcompanion(); if (INBOUNDS_VEC(j, obj.entities)) { 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! if(game.roomx-41==game.scmprogress) { switch(game.scmprogress) { case 0: obj.createentity(76, 161, 24, graphics.crewcolour(game.lastsaved), 2); break; case 1: obj.createentity(10, 169, 24, graphics.crewcolour(game.lastsaved), 2); break; case 2: obj.createentity(10, 177, 24, graphics.crewcolour(game.lastsaved), 2); break; case 3: obj.createentity(10, 177, 24, graphics.crewcolour(game.lastsaved), 2); break; case 4: obj.createentity(10, 185, 24, graphics.crewcolour(game.lastsaved), 2); break; case 5: obj.createentity(10, 185, 24, graphics.crewcolour(game.lastsaved), 2); break; case 6: obj.createentity(10, 185, 24, graphics.crewcolour(game.lastsaved), 2); break; case 7: obj.createentity(10, 41, 24, graphics.crewcolour(game.lastsaved), 2); break; case 8: obj.createentity(10, 169, 24, graphics.crewcolour(game.lastsaved), 2); break; case 9: obj.createentity(10, 169, 24, graphics.crewcolour(game.lastsaved), 2); break; case 10: obj.createentity(10, 129, 24, graphics.crewcolour(game.lastsaved), 2); break; case 11: obj.createentity(10, 129, 24, graphics.crewcolour(game.lastsaved), 2); break; case 12: obj.createentity(10, 65, 24, graphics.crewcolour(game.lastsaved), 2); break; case 13: obj.createentity(10, 177, 24, graphics.crewcolour(game.lastsaved)); break; } } break; } } const char* mapclass::currentarea(const int roomx, const int roomy) { /* For translation, the returned value is passed to loc::gettext_roomname_special(). * Returned strings must therefore be found in roomnames_special.xml! */ if (roomx >= 102 && roomx <= 104 && roomy >= 110 && roomy <= 111) { return "The Ship"; } switch (area(roomx, roomy)) { 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 "Warp Zone"; 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 "???"; } static void copy_short_to_int(int* dest, const short* src, const size_t size) { size_t i; for (i = 0; i < size; ++i) { dest[i] = src[i]; } } void mapclass::loadlevel(int rx, int ry) { int t; if (revealmap) { if (!finalmode) { setexplored(rx - 100, ry - 100, true); if (rx == 109 && !custommode) { exploretower(); } } } roomtexton = false; roomtext.clear(); roomnameset = false; obj.platformtile = 0; obj.customplatformtile=0; obj.vertplatforms = false; obj.horplatforms = false; setroomname(""); hiddenname = ""; background = 1; warpx = false; warpy = false; towermode = false; ypos = 0; oldypos = 0; extrarow = 0; spikeleveltop = 0; spikelevelbottom = 0; oldspikeleveltop = 0; oldspikelevelbottom = 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 int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].yp += (671 * 8); } ypos = (700-29) * 8; oldypos = ypos; setbgobjlerp(graphics.towerbg); cameramode = 0; graphics.towerbg.colstate = 0; colsuperstate = 0; } else if (ry == 104) { //you've entered from the top floor ypos = 0; oldypos = ypos; setbgobjlerp(graphics.towerbg); cameramode = 0; graphics.towerbg.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) graphics.rcol = 1; if (rx == 117 && ry == 105) graphics.rcol = 5; if (rx == 118 && ry == 105) graphics.rcol = 4; if (rx == 117 && ry == 106) graphics.rcol = 2; if (rx == 118 && ry == 106) graphics.rcol = 0; if (rx == 119 && ry == 106) graphics.rcol = 3; if (rx == 119 && ry == 107) graphics.rcol = 1; } } } } } } if (rx == 119 && ry == 108 && !custommode) { background = 5; graphics.rcol = 3; warpx = true; warpy = true; } roomname_special = false; switch(t) { #ifdef MAKEANDPLAY UNUSED(copy_short_to_int); #else case 0: case 1: //World Map { tileset = 1; extrarow = 1; const short* tmap = otherlevel.loadlevel(rx, ry); copy_short_to_int(contents, tmap, SDL_arraysize(contents)); setroomname(otherlevel.roomname); roomname_special = otherlevel.roomname_special; hiddenname = otherlevel.hiddenname; tileset = otherlevel.roomtileset; break; } case 2: //The Lab { const short* tmap = lablevel.loadlevel(rx, ry); copy_short_to_int(contents, tmap, SDL_arraysize(contents)); setroomname(lablevel.roomname); roomname_special = lablevel.roomname_special; tileset = 1; background = 2; graphics.rcol = lablevel.rcol; break; } case 3: //The Tower graphics.towerbg.tdrawback = true; minitowermode = false; tower.minitowermode = false; graphics.towerbg.scrolldir = 0; setbgobjlerp(graphics.towerbg); setroomname("The Tower"); tileset = 1; background = 3; towermode = true; //All the entities for here are just loaded here; it's essentially one room after all obj.createentity(48, 5456, 10, 1, 505007); // (savepoint) obj.createentity(224, 4528, 10, 1, 505017); // (savepoint) obj.createentity(232, 4168, 10, 0, 505027); // (savepoint) obj.createentity(280, 3816, 10, 1, 505037); // (savepoint) obj.createentity(152, 3552, 10, 1, 505047); // (savepoint) obj.createentity(216, 3280, 10, 0, 505057); // (savepoint) obj.createentity(216, 4808, 10, 1, 505067); // (savepoint) obj.createentity(72, 3096, 10, 0, 505077); // (savepoint) obj.createentity(176, 2600, 10, 0, 505087); // (savepoint) obj.createentity(216, 2392, 10, 0, 505097); // (savepoint) obj.createentity(152, 1184, 10, 1, 505107); // (savepoint) obj.createentity(152, 912, 10, 1, 505117); // (savepoint) obj.createentity(152, 536, 10, 1, 505127); // (savepoint) obj.createentity(120, 5136, 10, 0, 505137); // (savepoint) obj.createentity(144, 1824, 10, 0, 505147); // (savepoint) obj.createentity(72, 2904, 10, 0, 505157); // (savepoint) obj.createentity(224, 1648, 10, 1, 505167); // (savepoint) obj.createentity(112, 5280, 10, 1, 50517); // (savepoint) obj.createentity(24, 4216, 9, 7); // (shiny trinket) obj.createentity(280, 3216, 9, 8); // (shiny trinket) break; case 4: //The Warpzone { const short* tmap = warplevel.loadlevel(rx, ry); copy_short_to_int(contents, tmap, SDL_arraysize(contents)); setroomname(warplevel.roomname); roomname_special = warplevel.roomname_special; tileset = 1; background = 3; graphics.rcol = warplevel.rcol; graphics.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 { const short* tmap = spacestation2.loadlevel(rx, ry); copy_short_to_int(contents, tmap, SDL_arraysize(contents)); setroomname(spacestation2.roomname); roomname_special = spacestation2.roomname_special; tileset = 0; break; } case 6: //final level { const short* tmap = finallevel.loadlevel(rx, ry); copy_short_to_int(contents, tmap, SDL_arraysize(contents)); setroomname(finallevel.roomname); roomname_special = finallevel.roomname_special; tileset = 1; background = 3; graphics.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; } graphics.rcol = 6; changefinalcol(final_mapcol); break; } case 7: //Final Level, Tower 1 graphics.towerbg.tdrawback = true; minitowermode = true; tower.minitowermode = true; graphics.towerbg.scrolldir = 1; setbgobjlerp(graphics.towerbg); setroomname("Panic Room"); tileset = 1; background = 3; towermode = true; tower.loadminitower1(); ypos = 0; oldypos = 0; setbgobjlerp(graphics.towerbg); cameramode = 0; graphics.towerbg.colstate = 0; colsuperstate = 0; break; case 8: //Final Level, Tower 1 (reentered from below) { graphics.towerbg.tdrawback = true; minitowermode = true; tower.minitowermode = true; graphics.towerbg.scrolldir = 1; setbgobjlerp(graphics.towerbg); setroomname("Panic Room"); tileset = 1; background = 3; towermode = true; tower.loadminitower1(); int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].yp += (71 * 8); } game.roomy--; ypos = (100-29) * 8; oldypos = ypos; setbgobjlerp(graphics.towerbg); cameramode = 0; graphics.towerbg.colstate = 0; colsuperstate = 0;} break; case 9: //Final Level, Tower 2 { graphics.towerbg.tdrawback = true; minitowermode = true; tower.minitowermode = true; graphics.towerbg.scrolldir = 0; setbgobjlerp(graphics.towerbg); setroomname("The Final Challenge"); tileset = 1; background = 3; towermode = true; tower.loadminitower2(); obj.createentity(56, 556, 11, 136); // (horizontal gravity line) obj.createentity(184, 592, 10, 0, 50500); // (savepoint) obj.createentity(184, 644, 11, 88); // (horizontal gravity line) obj.createentity(56, 460, 11, 136); // (horizontal gravity line) obj.createentity(216, 440, 10, 0, 50501); // (savepoint) obj.createentity(104, 508, 11, 168); // (horizontal gravity line) obj.createentity(219, 264, 12, 56); // (vertical gravity line) obj.createentity(120, 332, 11, 96); // (horizontal gravity line) obj.createentity(219, 344, 12, 56); // (vertical gravity line) obj.createentity(224, 332, 11, 48); // (horizontal gravity line) obj.createentity(56, 212, 11, 144); // (horizontal gravity line) obj.createentity(32, 20, 11, 96); // (horizontal gravity line) obj.createentity(72, 156, 11, 200); // (horizontal gravity line) int i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].yp += (71 * 8); } game.roomy--; ypos = (100-29) * 8; oldypos = ypos; setbgobjlerp(graphics.towerbg); cameramode = 0; graphics.towerbg.colstate = 0; colsuperstate = 0; break; } case 10: //Final Level, Tower 2 { graphics.towerbg.tdrawback = true; minitowermode = true; tower.minitowermode = true; graphics.towerbg.scrolldir = 0; setbgobjlerp(graphics.towerbg); setroomname("The Final Challenge"); tileset = 1; background = 3; towermode = true; tower.loadminitower2(); obj.createentity(56, 556, 11, 136); // (horizontal gravity line) obj.createentity(184, 592, 10, 0, 50500); // (savepoint) obj.createentity(184, 644, 11, 88); // (horizontal gravity line) obj.createentity(56, 460, 11, 136); // (horizontal gravity line) obj.createentity(216, 440, 10, 0, 50501); // (savepoint) obj.createentity(104, 508, 11, 168); // (horizontal gravity line) obj.createentity(219, 264, 12, 56); // (vertical gravity line) obj.createentity(120, 332, 11, 96); // (horizontal gravity line) obj.createentity(219, 344, 12, 56); // (vertical gravity line) obj.createentity(224, 332, 11, 48); // (horizontal gravity line) obj.createentity(56, 212, 11, 144); // (horizontal gravity line) obj.createentity(32, 20, 11, 96); // (horizontal gravity line) obj.createentity(72, 156, 11, 200); // (horizontal gravity line) ypos = 0; oldypos = 0; setbgobjlerp(graphics.towerbg); cameramode = 0; graphics.towerbg.colstate = 0; colsuperstate = 0; break; } case 11: //Tower Hallways //Content is held in final level routine { const short* tmap = finallevel.loadlevel(rx, ry); copy_short_to_int(contents, tmap, SDL_arraysize(contents)); setroomname(finallevel.roomname); roomname_special = finallevel.roomname_special; 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 { const RoomProperty* const room = cl.getroomprop(rx - 100, ry - 100); game.customcol = cl.getlevelcol(room->tileset, room->tilecol) + 1; obj.customplatformtile = game.customcol * 12; switch (room->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; graphics.rcol = room->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: bool redrawbg = game.roomx != game.prevroomx || game.roomy != game.prevroomy; if (redrawbg) { graphics.backgrounddrawn = false; } switch (room->warpdir) { case 1: warpx = true; background = 3; graphics.rcol = cl.getwarpbackground(rx - 100, ry - 100); break; case 2: warpy = true; background = 4; graphics.rcol = cl.getwarpbackground(rx - 100, ry - 100); break; case 3: warpx = true; warpy = true; background = 5; graphics.rcol = cl.getwarpbackground(rx - 100, ry - 100); break; } setroomname(room->roomname.c_str()); extrarow = 1; const int* tmap = cl.loadlevel(rx, ry); SDL_memcpy(contents, tmap, sizeof(contents)); roomtexton = false; roomtext.clear(); // Entities have to be created HERE, akwardly int tempcheckpoints = 0; int tempscriptbox = 0; for (size_t edi = 0; edi < customentities.size(); edi++) { // If entity is in this room, create it const CustomEntity& ent = customentities[edi]; if (ent.rx != rx - 100 || ent.ry != ry - 100) { continue; } const int ex = ent.x * 8; const int ey = ent.y * 8; // Platform and enemy bounding boxes int bx1 = 0, by1 = 0, bx2 = 0, by2 = 0; bool enemy = ent.t == 1; bool moving_plat = ent.t == 2 && ent.p1 <= 4; if (enemy || moving_plat) { if (enemy) { bx1 = room->enemyx1; by1 = room->enemyy1; bx2 = room->enemyx2; by2 = room->enemyy2; } else if (moving_plat) { bx1 = room->platx1; by1 = room->platy1; bx2 = room->platx2; by2 = room->platy2; } // Enlarge bounding boxes to fix warping entities if (warpx && bx1 == 0 && bx2 == 320) { bx1 -= 100; bx2 += 100; } if (warpy && by1 == 0 && by2 == 240) { by1 -= 100; by2 += 100; } } switch (ent.t) { case 1: // Enemies obj.customenemy = room->enemytype; obj.createentity(ex, ey, 56, ent.p1, 4 + room->enemyv, bx1, by1, bx2, by2); break; case 2: // Platforms and conveyors if (ent.p1 <= 4) { obj.createentity(ex, ey, 2, ent.p1, room->platv, bx1, by1, bx2, by2); } else if (ent.p1 >= 5 && ent.p1 <= 8) // Conveyor { obj.createentity(ex, ey, 2, ent.p1 + 3, 4); } break; case 3: // Disappearing platforms obj.createentity(ex, ey, 3); break; case 9: // Trinkets obj.createentity(ex, ey, 9, cl.findtrinket(edi)); break; case 10: // Checkpoints obj.createentity(ex, ey, 10, ent.p1, (rx + ry*100) * 20 + tempcheckpoints); tempcheckpoints++; break; case 11: // Gravity Lines if (ent.p1 == 0) //Horizontal { obj.createentity(ent.p2 * 8, ey + 4, 11, ent.p3); } else //Vertical { obj.createentity(ex + 3, ent.p2 * 8, 12, ent.p3); } break; case 13: // Warp Tokens obj.createentity(ex, ey, 13, ent.p1, ent.p2); break; case 15: // Collectable crewmate obj.createentity(ex - 4, ey + 1, 55, cl.findcrewmate(edi), ent.p1, ent.p2); break; case 17: // Roomtext! { roomtexton = true; Roomtext text; text.x = ex / 8; text.y = ey / 8; text.text = ent.scriptname.c_str(); text.rtl = ent.p1; roomtext.push_back(text); break; } case 18: // Terminals { obj.customscript = ent.scriptname; int usethistile = ent.p1; int usethisy = ey; // This isn't a boolean: we just swap 0 and 1 around and leave the rest alone if (usethistile == 0) { usethistile = 1; // Unflipped } else if (usethistile == 1) { usethistile = 0; // Flipped; usethisy -= 8; } obj.createentity(ex, usethisy + 8, 20 + SDL_clamp(ent.p2, 0, 1), usethistile); for (size_t i = 0; i < script.customscripts.size(); i++) { if (script.customscripts[i].name == obj.customscript) { obj.createblock(ACTIVITY, ex - 8, usethisy + 8, 20, 16, 35); break; } } break; } case 19: //Script Box if (INBOUNDS_ARR(tempscriptbox, game.customscript)) { game.customscript[tempscriptbox] = ent.scriptname; } obj.createblock(TRIGGER, ex, ey, ent.p1 * 8, ent.p2 * 8, 300 + tempscriptbox, "custom_" + ent.scriptname); tempscriptbox++; break; case 50: // Warp Lines obj.customwarpmode=true; switch (ent.p1) { case 0: // Vertical, left obj.createentity(ex + 4, ent.p2 * 8, 51, ent.p3); break; case 1: //Horizontal, right obj.createentity(ex + 4, ent.p2 * 8, 52, ent.p3); break; case 2: //Vertical, top obj.createentity(ent.p2 * 8, ey + 7, 53, ent.p3); break; case 3: // Horizontal, bottom obj.createentity(ent.p2 * 8, ey, 54, ent.p3); break; } break; } } //do the appear/remove roomname here break; } } //The room's loaded: now we fill out damage blocks based on the tiles. if (towermode) { } else { for (int j = 0; j < 29 + extrarow; j++) { for (int i = 0; i < 40; i++) { int tile = contents[TILE_IDX(i, j)]; //Damage blocks if(tileset==0) { if (tile == 6 || tile == 8) { //sticking up obj.createblock(2, (i * 8), (j * 8)+4, 8, 4); } if (tile == 7 || tile == 9) { //Sticking down obj.createblock(2, (i * 8), (j * 8), 8, 4); } if (tile == 49 || tile == 50) { //left or right obj.createblock(2, (i * 8), (j * 8)+3, 8, 2); } } else if(tileset==1) { if ((tile >= 63 && tile <= 74) || (tile >= 6 && tile <= 9)) { //sticking up) { if (tile < 10) tile++; //sticking up if(tile%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 (tile < 11) tile--; } if (tile >= 49 && tile <= 62) { //left or right obj.createblock(2, (i * 8), (j * 8)+3, 8, 2); } } else if(tileset==2) { if (tile == 6 || tile == 8) { //sticking up obj.createblock(2, (i * 8), (j * 8)+4, 8, 4); } if (tile == 7 || tile == 9) { //Sticking down obj.createblock(2, (i * 8), (j * 8), 8, 4); } } //Breakable blocks if (tile == 10) { settile(i, j, 0); obj.createentity(i * 8, j * 8, 4); } //Directional blocks if (tile >= 14 && tile <= 17) { obj.createblock(3, i * 8, j * 8, 8, 8, tile-14); } } } for (size_t i = 0; i < obj.entities.size(); i++) { if (obj.entities[i].type == EntityType_MOVING && obj.entities[i].behave >= 8 && obj.entities[i].behave < 10) { //put a block underneath int temp = obj.entities[i].xp / 8.0f; int 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 && !custommode) { //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(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(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(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(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(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(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(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(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(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(249, 62, 18, 16, 0, 18); int j = obj.getcrewman(EntityColour_CREW_BLUE); if (INBOUNDS_VEC(j, obj.entities)) { 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); } } } } void mapclass::twoframedelayfix(void) { // Fixes the two-frame delay in custom levels that use scripts to spawn an entity upon room load. // Because when the room loads and newscript is set to run, newscript has already ran for that frame, // and when the script gets loaded script.run() has already ran for that frame, too. // A bit kludge-y, but it's the least we can do without changing the frame ordering. if (GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2) || !custommode || game.deathseq != -1) return; int block_idx = -1; // obj.checktrigger() sets block_idx int activetrigger = obj.checktrigger(&block_idx); if (activetrigger <= -1 || !INBOUNDS_VEC(block_idx, obj.blocks) || activetrigger < 300) { return; } game.newscript = obj.blocks[block_idx].script; obj.removetrigger(activetrigger); game.setstate(0); game.setstatedelay(0); script.load(game.newscript); } MapRenderData mapclass::get_render_data(void) { MapRenderData data; data.width = getwidth(); data.height = getheight(); data.startx = 0; data.starty = 0; // Region handling if (region[currentregion].isvalid) { data.startx = region[currentregion].rx; data.starty = region[currentregion].ry; data.width = ((region[currentregion].rx2 - data.startx) + 1); data.height = ((region[currentregion].ry2 - data.starty) + 1); } data.zoom = 1; if (data.width <= 10 && data.height <= 10) { data.zoom = 2; } if (data.width <= 5 && data.height <= 5) { data.zoom = 4; } data.xoff = 0; data.yoff = 0; // Set minimap offsets switch (data.zoom) { case 4: data.xoff = 24 * (5 - data.width); data.yoff = 18 * (5 - data.height); break; case 2: data.xoff = 12 * (10 - data.width); data.yoff = 9 * (10 - data.height); break; default: data.xoff = 6 * (20 - data.width); data.yoff = (int)(4.5 * (20 - data.height)); break; } data.pixelsx = 240 - (data.xoff * 2); data.pixelsy = 180 - (data.yoff * 2); data.legendxoff = 40 + data.xoff; data.legendyoff = 21 + data.yoff; // Magic numbers for centering legend tiles. switch (data.zoom) { case 4: data.legendxoff += 21; data.legendyoff += 16; break; case 2: data.legendxoff += 9; data.legendyoff += 5; break; default: data.legendxoff += 3; data.legendyoff += 1; break; } return data; } void mapclass::setregion(int id, int rx, int ry, int rx2, int ry2) { if (INBOUNDS_ARR(id, region) && id > 0) { // swap the variables if they're entered in the wrong order if (rx2 < rx) { int temp = rx; rx = rx2; rx2 = temp; } if (ry2 < ry) { int temp = ry; ry = ry2; ry2 = temp; } region[id].isvalid = true; region[id].rx = SDL_clamp(rx, 0, cl.mapwidth - 1); region[id].ry = SDL_clamp(ry, 0, cl.mapheight - 1); region[id].rx2 = SDL_clamp(rx2, 0, cl.mapwidth - 1); region[id].ry2 = SDL_clamp(ry2, 0, cl.mapheight - 1); if (id == currentregion) { cl.generatecustomminimap(); } } } void mapclass::removeregion(int id) { if (INBOUNDS_ARR(id, region) && id > 0) { SDL_zero(region[id]); if (id == currentregion) { cl.generatecustomminimap(); } } } void mapclass::changeregion(int id) { if (INBOUNDS_ARR(id, region)) { currentregion = id; cl.generatecustomminimap(); } } ================================================ FILE: desktop_version/src/Map.h ================================================ #ifndef MAPGAME_H #define MAPGAME_H #include #include #include "Finalclass.h" #include "Labclass.h" #include "Otherlevel.h" #include "Spacestation2.h" #include "Tower.h" #include "TowerBG.h" #include "WarpClass.h" struct MapRenderData { int zoom; int xoff; int yoff; int legendxoff; int legendyoff; int startx; int starty; int width; int height; int pixelsx; int pixelsy; }; struct Roomtext { int x, y; const char* text; bool rtl; }; enum RoomnameType { RoomnameType_STATIC, RoomnameType_GLITCH, RoomnameType_TRANSFORM }; struct Roomname { int x; int y; bool loop; int flag; RoomnameType type; std::vector text; int progress; int delay; }; class mapclass { public: mapclass(void); void destroy(void); int getwidth(void); int getheight(void); int intpol(int a, int b, float c); void setteleporter(int x, int y); void settrinket(int x, int y); void setroomname(const char* name); void resetmap(void); void fullmap(void); void updateroomnames(void); void initmapdata(void); void initcustommapdata(void); void roomnamechange(int x, int y, const char** lines, size_t size); void roomnameglitch(int x, int y, const char* name, const char* glitch); int finalat(int x, int y); int maptiletoenemycol(int t); void changefinalcol(int t); void setcol(TowerBG& bg_obj, const int r1, const int g1, const int b1 , const int r2, const int g2, const int b2, const int c); void updatebgobj(TowerBG& bg_obj); void setbgobjlerp(TowerBG& bg_obj); void updatetowerglow(TowerBG& bg_obj); void nexttowercolour(void); bool nexttowercolour_set; void settowercolour(int t); bool towerspikecollide(int x, int y); bool collide(int x, int y, bool invincible); void settile(int xp, int yp, int t); int area(int _rx, int _ry); void exploretower(void); void hideship(void); void showship(void); void resetplayer(const bool player_died); void resetplayer(void); void warpto(int rx, int ry , int t, int tx, int ty); void gotoroom(int rx, int ry); void spawncompanion(void); const char* currentarea(int roomx, int roomy); void loadlevel(int rx, int ry); void twoframedelayfix(void); int roomdeaths[20 * 20]; int roomdeathsfinal[20 * 20]; static const int areamap[20 * 20]; int contents[40 * 30]; bool explored[20 * 20]; bool isexplored(const int rx, const int ry); void setexplored(const int rx, const int ry, const bool status); bool revealmap; int background; int rcol; int tileset; bool warpx; bool warpy; const char* roomname; bool roomname_special; bool roomnameset; const char* hiddenname; std::vector specialroomnames; //Special tower stuff bool towermode; int ypos; int oldypos; int cameramode; int cameraseek, cameraseekframe; int resumedelay; bool minitowermode; int colstatedelay; int colsuperstate; int spikeleveltop, spikelevelbottom; int oldspikeleveltop, oldspikelevelbottom; //final level navigation bool finalmode; bool finalstretch; //Variables for playing custom levels bool custommode; bool custommodeforreal; bool customshowmm; //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; bool showteleporters, showtargets, showtrinkets; //Roomtext bool roomtexton; std::vector roomtext; //Levels otherlevelclass otherlevel; spacestation2class spacestation2; labclass lablevel; finalclass finallevel; warpclass warplevel; towerclass tower; int extrarow; //Accessibility options bool invincibility; //Map cursor int cursorstate, cursordelay; //Region system struct Region { bool isvalid; int rx; int ry; int rx2; int ry2; }; struct Region region[401]; void setregion(int id, int rx, int ry, int rx2, int ry2); void removeregion(int id); void changeregion(int id); int currentregion; int regionx, regiony; int regionwidth, regionheight; MapRenderData get_render_data(void); }; #ifndef MAP_DEFINITION extern mapclass map; #endif #endif /* MAPGAME_H */ ================================================ FILE: desktop_version/src/Maths.h ================================================ #ifndef MATHGAME_H #define MATHGAME_H #include //// This header holds Maths functions that emulate the functionality of flash's //random //Returns 0..1 float inline fRandom(void) { return ( float(rand()) / float(RAND_MAX)) ; } #endif /* MATHGAME_H */ ================================================ FILE: desktop_version/src/Music.cpp ================================================ #define MUSIC_DEFINITION #include "Music.h" #include #include #include #include "Alloc.h" #include "BinaryBlob.h" #include "FileSystemUtils.h" #include "Game.h" #include "Graphics.h" #include "Map.h" #include "Script.h" #include "Unused.h" #include "UtilityClass.h" #include "Vlogging.h" #include /* stb_vorbis */ #define malloc SDL_malloc #define realloc SDL_realloc #define free VVV_free #ifdef memset /* Thanks, Apple! */ #undef memset #endif #define memset SDL_memset #ifdef memcpy /* Thanks, Apple! */ #undef memcpy #endif #define memcpy SDL_memcpy #define memcmp SDL_memcmp #define pow SDL_pow #define log(x) SDL_log(x) #define sin(x) SDL_sin(x) #define cos(x) SDL_cos(x) #define floor SDL_floor #define abs(x) SDL_abs(x) #define ldexp(v, e) SDL_scalbn((v), (e)) #define exp(x) SDL_exp(x) #define qsort SDL_qsort #define assert SDL_assert #define FILE SDL_RWops #ifdef SEEK_SET #undef SEEK_SET #endif #ifdef SEEK_CUR #undef SEEK_CUR #endif #ifdef SEEK_END #undef SEEK_END #endif #ifdef EOF #undef EOF #endif #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 #define EOF -1 #define fopen(path, mode) SDL_RWFromFile(path, mode) #define fopen_s(io, path, mode) (!(*io = fopen(path, mode))) #define fclose(io) SDL_RWclose(io) #define fread(dst, size, count, io) SDL_RWread(io, dst, size, count) #define fseek(io, offset, whence) SDL_RWseek(io, offset, whence) #define ftell(io) SDL_RWtell(io) #define FAudio_alloca(x) SDL_stack_alloc(uint8_t, x) #define FAudio_dealloca(x) SDL_stack_free(x) #define STB_VORBIS_NO_PUSHDATA_API 1 #define STB_VORBIS_NO_INTEGER_CONVERSION 1 #include /* End stb_vorbis include */ #define VVV_MAX_VOLUME 128 #define VVV_MAX_CHANNELS 8 class SoundTrack; class MusicTrack; static std::vector soundTracks; static std::vector musicTracks; static FAudio* faudioctx = NULL; static FAudioMasteringVoice* masteringvoice = NULL; class SoundTrack { public: SoundTrack(const char* fileName, const char* _id, bool _extra) { unsigned char* mem; size_t length; voice_index = -1; FILESYSTEM_loadAssetToMemory(fileName, &mem, &length); if (mem == NULL) { vlog_error("Unable to load sound file %s", fileName); SDL_assert(0 && "Sound file missing!"); return; } SDL_zerop(this); if (length >= 4 && SDL_memcmp(mem, "OggS", 4) == 0) { LoadOGG(fileName, mem, length); callbacks.OnBufferStart = &SoundTrack::refillReserve; callbacks.OnBufferEnd = &SoundTrack::swapBuffers; } else { LoadWAV(fileName, mem, length); } extra = _extra; id = SDL_strdup(_id); } void LoadWAV(const char* fileName, unsigned char* mem, const size_t length) { SDL_AudioSpec spec; SDL_RWops *fileIn; fileIn = SDL_RWFromConstMem(mem, length); if (SDL_LoadWAV_RW(fileIn, 1, &spec, &wav_buffer, &wav_length) == NULL) { vlog_error("Unable to load WAV file %s", fileName); goto end; } format.nChannels = spec.channels; format.nSamplesPerSec = spec.freq; format.wFormatTag = FAUDIO_FORMAT_PCM; format.wBitsPerSample = SDL_AUDIO_BITSIZE(spec.format); format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8); format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign; format.cbSize = 0; valid = true; end: VVV_free(mem); } void LoadOGG(const char* fileName, unsigned char* mem, const size_t length) { int err; stb_vorbis_info vorbis_info; vorbis = stb_vorbis_open_memory(mem, length, &err, NULL); if (vorbis == NULL) { vlog_error("Unable to create Vorbis handle for %s, error %d", fileName, err); VVV_free(mem); return; } vorbis_info = stb_vorbis_get_info(vorbis); format.wFormatTag = FAUDIO_FORMAT_IEEE_FLOAT; format.wBitsPerSample = sizeof(float) * 8; format.nChannels = vorbis_info.channels; format.nSamplesPerSec = vorbis_info.sample_rate; format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8); format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign; format.cbSize = 0; channels = format.nChannels; size = format.nAvgBytesPerSec / 20; decoded_buf_playing = (Uint8*) SDL_malloc(size); decoded_buf_reserve = (Uint8*) SDL_malloc(size); ogg_file = mem; valid = true; } void Dispose(void) { VVV_free(wav_buffer); VVV_free(decoded_buf_playing); VVV_free(decoded_buf_reserve); VVV_freefunc(stb_vorbis_close, vorbis); VVV_free(ogg_file); VVV_free(id); } void Play(void) { if (!valid) { return; } for (int i = 0; i < VVV_MAX_CHANNELS; i++) { FAudioVoiceState voicestate; FAudioSourceVoice_GetState(voices[i], &voicestate, 0); if (voicestate.BuffersQueued == 0) { if (SDL_memcmp(&voice_formats[i], &format, sizeof(format)) != 0) { VVV_freefunc(FAudioVoice_DestroyVoice, voices[i]); if (vorbis != NULL) { FAudio_CreateSourceVoice(faudioctx, &voices[i], &format, 0, 2.0f, &callbacks, NULL, NULL); } else { FAudio_CreateSourceVoice(faudioctx, &voices[i], &format, 0, 2.0f, NULL, NULL, NULL); } voice_formats[i] = format; } FAudioBuffer faudio_buffer = { FAUDIO_END_OF_STREAM, /* Flags */ wav_length, /* AudioBytes */ wav_buffer, /* AudioData */ 0, /* playbegin */ 0, /* playlength */ 0, /* LoopBegin */ 0, /* LoopLength */ 0, /* LoopCount */ NULL }; if (vorbis != NULL) { stb_vorbis_seek_start(vorbis); faudio_buffer.PlayLength = stb_vorbis_get_samples_float_interleaved( vorbis, channels, (float*) decoded_buf_playing, size / sizeof(float) ); faudio_buffer.AudioBytes = size; faudio_buffer.pAudioData = decoded_buf_playing; faudio_buffer.pContext = this; } if (FAudioSourceVoice_SubmitSourceBuffer(voices[i], &faudio_buffer, NULL)) { vlog_error("Unable to queue sound buffer"); voice_index = -1; return; } FAudioVoice_SetVolume(voices[i], volume, FAUDIO_COMMIT_NOW); if (FAudioSourceVoice_Start(voices[i], 0, FAUDIO_COMMIT_NOW)) { vlog_error("Unable to start voice processing"); voice_index = -1; } voice_index = i; return; } } } static void Init(int audio_rate) { if (voices == NULL) { voices = (FAudioSourceVoice**) SDL_malloc(sizeof(FAudioSourceVoice*) * VVV_MAX_CHANNELS); for (int i = 0; i < VVV_MAX_CHANNELS; i++) { FAudioWaveFormatEx format; format.nChannels = 1; /* Assume 1 for SoundTracks. Will be recreated if mismatched during play */ format.nSamplesPerSec = audio_rate; format.wFormatTag = FAUDIO_FORMAT_PCM; format.wBitsPerSample = 16; format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8); format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign; format.cbSize = 0; voice_formats[i] = format; if (FAudio_CreateSourceVoice(faudioctx, &voices[i], &format, 0, 2.0f, NULL, NULL, NULL)) { vlog_error("Unable to create source voice no. %i", i); return; } } } } static void Pause(void) { for (size_t i = 0; i < VVV_MAX_CHANNELS; i++) { FAudioSourceVoice_Stop(voices[i], 0, FAUDIO_COMMIT_NOW); } } static void Resume(void) { for (size_t i = 0; i < VVV_MAX_CHANNELS; i++) { FAudioSourceVoice_Start(voices[i], 0, FAUDIO_COMMIT_NOW); } } static void Destroy(void) { if (voices != NULL) { for (int i = 0; i < VVV_MAX_CHANNELS; i++) { VVV_freefunc(FAudioVoice_DestroyVoice, voices[i]); } VVV_free(voices); } } static void SetVolume(int soundVolume) { volume = (float) soundVolume / VVV_MAX_VOLUME; for (size_t i = 0; i < VVV_MAX_CHANNELS; i++) { FAudioVoice_SetVolume(voices[i], volume, FAUDIO_COMMIT_NOW); } } static void refillReserve(FAudioVoiceCallback* callback, void* ctx) { bool inbounds; SoundTrack* t = (SoundTrack*) ctx; FAudioBuffer faudio_buffer; SDL_zero(faudio_buffer); UNUSED(callback); faudio_buffer.PlayLength = stb_vorbis_get_samples_float_interleaved(t->vorbis, t->channels, (float*) t->decoded_buf_reserve, t->size / sizeof(float)); faudio_buffer.AudioBytes = t->size; faudio_buffer.pAudioData = t->decoded_buf_reserve; faudio_buffer.pContext = t; if (faudio_buffer.PlayLength == 0) { return; } inbounds = t->voice_index >= 0 && t->voice_index < VVV_MAX_CHANNELS; if (!inbounds) { return; } FAudioSourceVoice_SubmitSourceBuffer(voices[t->voice_index], &faudio_buffer, NULL); } static void swapBuffers(FAudioVoiceCallback* callback, void* ctx) { SoundTrack* t = (SoundTrack*) ctx; Uint8* tmp = t->decoded_buf_playing; UNUSED(callback); t->decoded_buf_playing = t->decoded_buf_reserve; t->decoded_buf_reserve = tmp; } Uint8 *wav_buffer; Uint32 wav_length; FAudioWaveFormatEx format; int voice_index; unsigned char* ogg_file; stb_vorbis* vorbis; int channels; Uint32 size; Uint8* decoded_buf_playing; Uint8* decoded_buf_reserve; FAudioVoiceCallback callbacks; bool valid; static FAudioSourceVoice** voices; static FAudioWaveFormatEx voice_formats[VVV_MAX_CHANNELS]; static float volume; char* id; bool extra; }; FAudioSourceVoice** SoundTrack::voices = NULL; FAudioWaveFormatEx SoundTrack::voice_formats[VVV_MAX_CHANNELS]; float SoundTrack::volume = 0.0f; class MusicTrack { public: MusicTrack(SDL_RWops *rw) { SDL_zerop(this); read_buf = (Uint8*) SDL_malloc(rw->size(rw)); SDL_RWread(rw, read_buf, rw->size(rw), 1); int err; stb_vorbis_info vorbis_info; stb_vorbis_comment vorbis_comment; vorbis = stb_vorbis_open_memory(read_buf, rw->size(rw), &err, NULL); if (vorbis == NULL) { vlog_error("Unable to create Vorbis handle, error %d", err); VVV_free(read_buf); goto end; } vorbis_info = stb_vorbis_get_info(vorbis); format.wFormatTag = FAUDIO_FORMAT_IEEE_FLOAT; format.wBitsPerSample = sizeof(float) * 8; format.nChannels = vorbis_info.channels; format.nSamplesPerSec = vorbis_info.sample_rate; format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8); format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign; format.cbSize = 0; channels = format.nChannels; size = format.nAvgBytesPerSec / 20; decoded_buf_playing = (Uint8*) SDL_malloc(size); decoded_buf_reserve = (Uint8*) SDL_malloc(size); loopbegin = 0; looplength = 0; vorbis_comment = stb_vorbis_get_comment(vorbis); parseComments(this, vorbis_comment.comment_list, vorbis_comment.comment_list_length); valid = true; end: SDL_RWclose(rw); } void Dispose(void) { VVV_freefunc(stb_vorbis_close, vorbis); VVV_free(read_buf); VVV_free(decoded_buf_playing); VVV_free(decoded_buf_reserve); if (!IsHalted()) { VVV_freefunc(FAudioVoice_DestroyVoice, musicVoice); } } bool Play(bool loop) { if (!valid) { return false; } shouldloop = loop; sample_pos = 0; stb_vorbis_seek_start(vorbis); Halt(); SDL_zero(callbacks); callbacks.OnBufferStart = &MusicTrack::refillReserve; callbacks.OnBufferEnd = &MusicTrack::swapBuffers; FAudio_CreateSourceVoice(faudioctx, &musicVoice, &format, 0, 2.0f, &callbacks, NULL, NULL); FAudioBuffer faudio_buffer; SDL_zero(faudio_buffer); if (looplength == 0) { faudio_buffer.PlayLength = stb_vorbis_get_samples_float_interleaved(vorbis, channels, (float*) decoded_buf_playing, size / sizeof(float)); } else { int samples_read = stb_vorbis_get_samples_float_interleaved(vorbis, channels, (float*) decoded_buf_playing, size / sizeof(float)); faudio_buffer.PlayLength = SDL_min(samples_read, (loopbegin + looplength) - sample_pos); } faudio_buffer.AudioBytes = size; faudio_buffer.pAudioData = decoded_buf_playing; faudio_buffer.pContext = this; sample_pos += faudio_buffer.PlayLength; if (FAudioSourceVoice_SubmitSourceBuffer(musicVoice, &faudio_buffer, NULL)) { vlog_error("Unable to queue sound buffer"); return false; } Resume(); return true; } static void Halt(void) { if (!IsHalted()) { FAudioSourceVoice_FlushSourceBuffers(musicVoice); VVV_freefunc(FAudioVoice_DestroyVoice, musicVoice); paused = true; } } static bool IsHalted(void) { return musicVoice == NULL; } static void Pause(void) { if (!IsHalted()) { FAudioSourceVoice_Stop(musicVoice, 0, FAUDIO_COMMIT_NOW); paused = true; } } static bool IsPaused(void) { return paused || IsHalted(); } static void Resume(void) { if (!IsHalted()) { FAudioSourceVoice_Start(musicVoice, 0, FAUDIO_COMMIT_NOW); paused = false; } } static void SetVolume(int controlVolume) { float adj_vol = (float)controlVolume / VVV_MAX_VOLUME; if (!IsHalted()) { FAudioVoice_SetVolume(musicVoice, adj_vol, FAUDIO_COMMIT_NOW); } } stb_vorbis* vorbis; int channels; Uint32 size; int loopbegin; int looplength; int sample_pos; //stb_vorbis offset not yet functional on pulldata API. TODO Replace when fixed FAudioVoiceCallback callbacks; FAudioWaveFormatEx format; Uint8* decoded_buf_playing; Uint8* decoded_buf_reserve; Uint8* read_buf; bool shouldloop; bool valid; static bool paused; static FAudioSourceVoice* musicVoice; static void refillReserve(FAudioVoiceCallback* callback, void* ctx) { MusicTrack* t = (MusicTrack*) ctx; FAudioBuffer faudio_buffer; SDL_zero(faudio_buffer); UNUSED(callback); if (t->looplength == 0) { faudio_buffer.PlayLength = stb_vorbis_get_samples_float_interleaved(t->vorbis, t->channels, (float*) t->decoded_buf_reserve, t->size / sizeof(float)); } else { int samples_read = stb_vorbis_get_samples_float_interleaved(t->vorbis, t->channels, (float*) t->decoded_buf_reserve, t->size / sizeof(float)); faudio_buffer.PlayLength = SDL_min(samples_read, (t->loopbegin + t->looplength) - t->sample_pos); } faudio_buffer.AudioBytes = t->size; faudio_buffer.pAudioData = t->decoded_buf_reserve; faudio_buffer.pContext = t; if (faudio_buffer.PlayLength == 0) { if (t->shouldloop) { stb_vorbis_seek(t->vorbis, t->loopbegin); t->sample_pos = t->loopbegin; if (t->looplength != 0) { int samples_read = stb_vorbis_get_samples_float_interleaved(t->vorbis, t->channels, (float*) t->decoded_buf_reserve, t->size / sizeof(float)); faudio_buffer.PlayLength = SDL_min(samples_read, (t->loopbegin + t->looplength) - t->sample_pos); } else { faudio_buffer.PlayLength = stb_vorbis_get_samples_float_interleaved(t->vorbis, t->channels, (float*) t->decoded_buf_reserve, t->size / sizeof(float)); } if (faudio_buffer.PlayLength == 0) { return; } } else { return; } } t->sample_pos += faudio_buffer.PlayLength; FAudioSourceVoice_SubmitSourceBuffer(musicVoice, &faudio_buffer, NULL); } static void swapBuffers(FAudioVoiceCallback* callback, void* ctx) { MusicTrack* t = (MusicTrack*) ctx; Uint8* tmp = t->decoded_buf_playing; UNUSED(callback); t->decoded_buf_playing = t->decoded_buf_reserve; t->decoded_buf_reserve = tmp; } /* Lifted from SDL_mixer, we used it in 2.3 and previous */ static void parseComments( MusicTrack* t, char** comments, const int comment_list_length ) { int loopend = 0; for (int i = 0; i < comment_list_length; i++) { char* param = SDL_strdup(comments[i]); if (param == NULL) { vlog_error( "Could not allocate memory to parse '%s'. Ignoring comments.", comments[i] ); break; } char* argument = param; char* value = SDL_strchr(param, '='); if (value == NULL) { value = param + SDL_strlen(param); } else { *(value++) = '\0'; } /* Want to match LOOP-START, LOOP_START, etc. Remove - or _ from * string if it is present at position 4. */ char buf[5]; SDL_strlcpy(buf, argument, sizeof(buf)); if (SDL_strcasecmp(buf, "LOOP") == 0 && ((argument[4] == '_') || (argument[4] == '-'))) { SDL_memmove(argument + 4, argument + 5, SDL_strlen(argument) - 4); } if (SDL_strcasecmp(argument, "LOOPSTART") == 0) { t->loopbegin = _Mix_ParseTime(value, t->format.nSamplesPerSec); } else if (SDL_strcasecmp(argument, "LOOPLENGTH") == 0) { t->looplength = SDL_strtoll(value, NULL, 10); } else if (SDL_strcasecmp(argument, "LOOPEND") == 0) { loopend = _Mix_ParseTime(value, t->format.nSamplesPerSec); } if (t->loopbegin < 0 || t->looplength < 0 || loopend < 0) { vlog_warn( "A track loop comment had a negative value. " "Ignoring all comments for the track." ); t->loopbegin = 0; t->looplength = 0; loopend = 0; VVV_free(param); break; } VVV_free(param); } if (loopend != 0) { t->looplength = loopend - t->loopbegin; } } static int _Mix_ParseTime(char* time, const long samplerate_hz) { char* num_start = time; char* p; Sint64 result = 0; int val; /* Time is directly expressed as a sample position */ if (SDL_strchr(time, ':') == NULL) { return SDL_strtoll(time, NULL, 10); } for (p = time; *p != '\0'; ++p) { if (*p == '.' || *p == ':') { const char c = *p; *p = '\0'; val = SDL_atoi(num_start); if (val < 0) { return -1; } result = result * 60 + val; num_start = p + 1; *p = c; } if (*p == '.') { const double val_f = SDL_atof(p); if (val_f < 0) { return -1; } return result * samplerate_hz + (Sint64) (val_f * samplerate_hz); } } val = SDL_atoi(num_start); if (val < 0) { return -1; } return (result * 60 + val) * samplerate_hz; } }; bool MusicTrack::paused = false; FAudioSourceVoice* MusicTrack::musicVoice = NULL; musicclass::musicclass(void) { safeToProcessMusic= false; m_doFadeInVol = false; m_doFadeOutVol = false; controlVolume = 0; user_music_volume = USER_VOLUME_MAX; user_sound_volume = USER_VOLUME_MAX; currentsong = -1; haltedsong = -1; nicechange = -1; nicefade = false; quick_fade = true; usingmmmmmm = false; } static void add_builtin_sound(const char* id) { char asset_filename[256]; SDL_snprintf(asset_filename, sizeof(asset_filename), "sounds/%s.wav", id); soundTracks.push_back(SoundTrack(asset_filename, id, false)); } void musicclass::init(void) { if (FAudioCreate(&faudioctx, 0, FAUDIO_DEFAULT_PROCESSOR)) { vlog_error("Unable to initialize FAudio"); return; } if (FAudio_CreateMasteringVoice(faudioctx, &masteringvoice, 2, 44100, 0, 0, NULL)) { vlog_error("Unable to create mastering voice"); return; } SoundTrack::Init(44100); add_builtin_sound("jump"); add_builtin_sound("jump2"); add_builtin_sound("hurt"); add_builtin_sound("souleyeminijingle"); add_builtin_sound("coin"); add_builtin_sound("save"); add_builtin_sound("crumble"); add_builtin_sound("vanish"); add_builtin_sound("blip"); add_builtin_sound("preteleport"); add_builtin_sound("teleport"); add_builtin_sound("crew1"); add_builtin_sound("crew2"); add_builtin_sound("crew3"); add_builtin_sound("crew4"); add_builtin_sound("crew5"); add_builtin_sound("crew6"); add_builtin_sound("terminal"); add_builtin_sound("gamesaved"); add_builtin_sound("crashing"); add_builtin_sound("blip2"); add_builtin_sound("countdown"); add_builtin_sound("go"); add_builtin_sound("crash"); add_builtin_sound("combine"); add_builtin_sound("newrecord"); add_builtin_sound("trophy"); add_builtin_sound("rescue"); EnumHandle handle = {}; const char* item; while ((item = FILESYSTEM_enumerateAssets("sounds", &handle)) != NULL) { char asset_filename[256]; char id[256]; SDL_snprintf(asset_filename, sizeof(asset_filename), "sounds/%s", item); // Create the ID size_t current_char = 0; size_t item_len = SDL_strlen(item); for (size_t i = 0; i < item_len; i++) { // If it's a space, we don't want to include this. if (item[i] == ' ') { continue; } // Otherwise, add it to our ID string, lowered id[current_char] = SDL_tolower(item[i]); current_char++; if (current_char >= 255) { break; } } // Null-terminate the string id[current_char] = '\0'; // Chop off the extension! char* dot = SDL_strrchr(id, '.'); if (dot != NULL) { *dot = '\0'; } if (soundidexists(id)) { // Make sure we haven't already loaded this file continue; } vlog_info("Reading extra sound file %s as %s", item, id); soundTracks.push_back(SoundTrack(asset_filename, id, true)); } FILESYSTEM_freeEnumerate(&handle); #ifdef VVV_COMPILEMUSIC binaryBlob musicWriteBlob; #define FOREACH_TRACK(blob, track_name) blob.AddFileToBinaryBlob("data/" track_name); TRACK_NAMES(musicWriteBlob) #undef FOREACH_TRACK musicWriteBlob.writeBinaryBlob("data/BinaryMusic.vvv"); musicWriteBlob.clear(); #endif num_mmmmmm_tracks = 0; num_pppppp_tracks = 0; if (!mmmmmm_blob.unPackBinary("mmmmmm.vvv")) { if (pppppp_blob.unPackBinary("vvvvvvmusic.vvv")) { vlog_info("Loading music from PPPPPP blob..."); mmmmmm = false; usingmmmmmm=false; int index; SDL_RWops* rw; #define TRACK_LOAD_BLOB(blob, track_name) \ index = blob.getIndex("data/" track_name); \ if (index >= 0 && index < blob.max_headers) \ { \ rw = SDL_RWFromConstMem(blob.getAddress(index), blob.getSize(index)); \ if (rw == NULL) \ { \ vlog_error("Unable to read music file header: %s", SDL_GetError()); \ } \ else \ { \ musicTracks.push_back(MusicTrack(rw)); \ } \ } #define FOREACH_TRACK(blob, track_name) TRACK_LOAD_BLOB(blob, track_name) TRACK_NAMES(pppppp_blob) #undef FOREACH_TRACK } else { vlog_info("Loading music from loose files..."); SDL_RWops* rw; #define FOREACH_TRACK(_, track_name) \ rw = PHYSFSRWOPS_openRead(track_name); \ if (rw == NULL) \ { \ vlog_error("Unable to read loose music file: %s", SDL_GetError()); \ } \ else \ { \ musicTracks.push_back(MusicTrack(rw)); \ } TRACK_NAMES(_) #undef FOREACH_TRACK } } else { vlog_info("Loading PPPPPP and MMMMMM blobs..."); mmmmmm = true; int index; SDL_RWops* rw; #define FOREACH_TRACK(blob, track_name) TRACK_LOAD_BLOB(blob, track_name) TRACK_NAMES(mmmmmm_blob) num_mmmmmm_tracks += musicTracks.size(); size_t index_ = 0; while (mmmmmm_blob.nextExtra(&index_)) { rw = SDL_RWFromConstMem(mmmmmm_blob.getAddress(index_), mmmmmm_blob.getSize(index_)); musicTracks.push_back(MusicTrack( rw )); num_mmmmmm_tracks++; index_++; } bool ohCrap = pppppp_blob.unPackBinary("vvvvvvmusic.vvv"); SDL_assert(ohCrap && "Music not found!"); TRACK_NAMES(pppppp_blob) #undef FOREACH_TRACK #undef TRACK_LOAD_BLOB } num_pppppp_tracks += musicTracks.size() - num_mmmmmm_tracks; SDL_RWops* rw; size_t index_ = 0; while (pppppp_blob.nextExtra(&index_)) { rw = SDL_RWFromConstMem(pppppp_blob.getAddress(index_), pppppp_blob.getSize(index_)); musicTracks.push_back(MusicTrack( rw )); num_pppppp_tracks++; index_++; } } void musicclass::destroy(void) { for (size_t i = 0; i < soundTracks.size(); ++i) { soundTracks[i].Dispose(); } soundTracks.clear(); SoundTrack::Destroy(); for (size_t i = 0; i < musicTracks.size(); ++i) { musicTracks[i].Dispose(); } musicTracks.clear(); pppppp_blob.clear(); mmmmmm_blob.clear(); VVV_freefunc(FAudioVoice_DestroyVoice, masteringvoice); VVV_freefunc(FAudio_Release, faudioctx); } void musicclass::set_music_volume(int volume) { MusicTrack::SetVolume(volume * user_music_volume / USER_VOLUME_MAX); } void musicclass::set_sound_volume(int volume) { SoundTrack::SetVolume(volume * user_sound_volume / USER_VOLUME_MAX); } void musicclass::play(int t) { if (mmmmmm && usingmmmmmm) { // Don't conjoin this if-statement with the above one... if (num_mmmmmm_tracks > 0) { t %= num_mmmmmm_tracks; } } else if (num_pppppp_tracks > 0) { t %= num_pppppp_tracks; } if (mmmmmm && !usingmmmmmm) { t += num_mmmmmm_tracks; } safeToProcessMusic = true; if (currentsong == t && !m_doFadeOutVol) { return; } currentsong = t; haltedsong = -1; if (t == -1) { return; } if (!INBOUNDS_VEC(t, musicTracks)) { vlog_error("play() out-of-bounds!"); currentsong = -1; return; } if (currentsong == Music_PATHCOMPLETE || currentsong == Music_PLENARY || (!map.custommode && (currentsong == Music_PATHCOMPLETE + num_mmmmmm_tracks || currentsong == Music_PLENARY + num_mmmmmm_tracks))) { // No fade in or repeat if (musicTracks[t].Play(false)) { m_doFadeInVol = false; m_doFadeOutVol = false; controlVolume = VVV_MAX_VOLUME; set_music_volume(controlVolume); } } else { if (m_doFadeOutVol) { // We're already fading out nicechange = t; nicefade = true; currentsong = -1; if (quick_fade) { fadeMusicVolumeOut(500); // fade out quicker } else { quick_fade = true; } } else if (musicTracks[t].Play(true)) { m_doFadeInVol = false; m_doFadeOutVol = false; fadeMusicVolumeIn(3000); } } } void musicclass::resume(void) { if (currentsong == -1) { currentsong = haltedsong; haltedsong = -1; } MusicTrack::Resume(); } void musicclass::resumefade(const int fadein_ms) { resume(); fadeMusicVolumeIn(fadein_ms); } void musicclass::fadein(void) { resumefade(3000); // 3000 ms fadein } void musicclass::pause(void) { MusicTrack::Pause(); } void musicclass::haltdasmusik(void) { haltdasmusik(false); } void musicclass::haltdasmusik(const bool from_fade) { /* Just pauses music. This is intended. */ pause(); haltedsong = currentsong; currentsong = -1; m_doFadeInVol = false; m_doFadeOutVol = false; if (!from_fade) { nicefade = false; nicechange = -1; } } void musicclass::silencedasmusik(void) { controlVolume = 0; m_doFadeInVol = false; m_doFadeOutVol = false; } struct FadeState { int start_volume; int end_volume; int duration_ms; int step_ms; }; static struct FadeState fade; enum FadeCode { Fade_continue, Fade_finished }; static enum FadeCode processmusicfade(struct FadeState* state, int* volume) { int range; int new_volume; if (state->duration_ms == 0 /* Fast path. */ || state->start_volume == state->end_volume /* Fast path. */ || state->step_ms >= state->duration_ms /* We're finished. */) { *volume = state->end_volume; state->step_ms = 0; return Fade_finished; } range = state->end_volume - state->start_volume; new_volume = range * state->step_ms / state->duration_ms; new_volume += state->start_volume; *volume = new_volume; state->step_ms += game.get_timestep(); return Fade_continue; } void musicclass::fadeMusicVolumeIn(int ms) { if (halted()) { return; } m_doFadeInVol = true; m_doFadeOutVol = false; /* Ensure it starts at 0 */ controlVolume = 0; /* Fix 1-frame glitch */ set_music_volume(0); fade.step_ms = 0; fade.duration_ms = ms; fade.start_volume = 0; fade.end_volume = VVV_MAX_VOLUME; } void musicclass::fadeMusicVolumeOut(const int fadeout_ms) { if (halted()) { return; } m_doFadeInVol = false; m_doFadeOutVol = true; fade.step_ms = 0; /* Duration is proportional to current volume. */ fade.duration_ms = fadeout_ms * controlVolume / VVV_MAX_VOLUME; fade.start_volume = controlVolume; fade.end_volume = 0; } void musicclass::fadeout(const bool quick_fade_ /*= true*/) { fadeMusicVolumeOut(quick_fade_ ? 500 : 2000); quick_fade = quick_fade_; } void musicclass::processmusicfadein(void) { enum FadeCode fade_code = processmusicfade(&fade, &controlVolume); if (fade_code == Fade_finished) { m_doFadeInVol = false; } } void musicclass::processmusicfadeout(void) { enum FadeCode fade_code = processmusicfade(&fade, &controlVolume); if (fade_code == Fade_finished) { controlVolume = 0; m_doFadeOutVol = false; haltdasmusik(true); } } void musicclass::processmusic(void) { if(!safeToProcessMusic) { return; } if(m_doFadeInVol) { processmusicfadein(); } if (m_doFadeOutVol) { processmusicfadeout(); } /* This needs to come after processing fades */ if (nicefade && halted()) { play(nicechange); nicechange = -1; nicefade = false; } } void musicclass::niceplay(int t) { /* important: do nothing if the correct song is playing! */ if ((!mmmmmm && currentsong != t) || (mmmmmm && usingmmmmmm && currentsong != t) || (mmmmmm && !usingmmmmmm && currentsong != t + num_mmmmmm_tracks)) { if (currentsong != -1) { fadeout(false); } nicefade = true; } nicechange = t; } static const int areamap[] = { 4, 3, 3, 3, 3, 3, 3, 3, 4,-2, 4, 4, 4,12,12,12,12,12,12,12, 4, 3, 3, 3, 3, 3, 3, 4, 4,-2, 4, 4, 4, 4,12,12,12,12,12,12, 4, 4, 4, 4, 3, 4, 4, 4, 4,-2, 4, 4, 4, 4,12,12,12,12,12,12, 4, 4, 4, 4, 3, 4, 4, 4, 4,-2, 4, 4, 1, 1, 1, 1,12,12,12,12, 4, 4, 3, 3, 3, 4, 4, 4, 4,-2,-2,-2, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,-2, 1, 1, 1, 1, 1, 1,11,11,-1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,-2, 1, 1, 1, 1, 1, 1, 1,11,11,11, 4, 4, 4, 4, 4, 4, 4, 4, 4,-2, 1, 1, 1, 1, 1, 1, 1, 1, 1,11, 4, 4, 4, 4, 4, 4, 4, 4, 4,-2, 4, 4, 4, 1, 1, 1, 1, 1, 1, 3, 4, 4, 4, 4, 4, 4, 4, 4,-2,-2, 4, 4, 4, 1, 1, 1, 1, 1, 1, 4, 4, 4,-1,-1,-1, 4, 4, 4, 4,-2, 4, 4, 4, 1, 1, 1, 1, 1, 1, 4, 4, 4,-1,-1,-1, 4, 4, 4, 4,-2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,-2, 4, 1, 1, 1, 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,-2, 4, 1, 1, 1, 1, 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,-2, 4,-1,-3, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 3, 3, 3, 4,-2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4,-2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4,-2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 4, 4, 3, 4,-2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 4, 4, 3, 4,-2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; SDL_COMPILE_TIME_ASSERT(areamap, SDL_arraysize(areamap) == 20 * 20); void musicclass::changemusicarea(int x, int y) { int room; int track; if (script.running) { return; } room = musicroom(x, y); if (!INBOUNDS_ARR(room, areamap)) { SDL_assert(0 && "Music map index out-of-bounds!"); return; } track = areamap[room]; switch (track) { case -1: /* Don't change music. */ return; case -2: /* Special case: Tower music, changes with Flip Mode. */ if (graphics.setflipmode) { track = 9; /* ecroF evitisoP */ } else { track = 2; /* Positive Force */ } break; case -3: /* Special case: start of Space Station 2. */ if (game.intimetrial) { track = 1; /* Pushing Onwards */ } else { track = 4; /* Passion for Exploring */ } break; } niceplay(track); } bool musicclass::playef(int t) { if (!INBOUNDS_VEC(t, soundTracks)) { return false; } if (soundTracks[t].valid) { soundTracks[t].Play(); return true; } return false; } bool musicclass::playefid(const char* id) { for (size_t i = 0; i < soundTracks.size(); i++) { if (SDL_strcmp(soundTracks[i].id, id) == 0) { return playef(i); } } vlog_error("playefid() couldn't find sound ID: %s", id); return false; } bool musicclass::soundidexists(const char* id) { for (size_t i = 0; i < soundTracks.size(); i++) { if (SDL_strcmp(soundTracks[i].id, id) == 0) { return true; } } return false; } bool musicclass::soundisextra(int t) { if (INBOUNDS_VEC(t, soundTracks)) { return soundTracks[t].extra; } return false; } const char* musicclass::getsoundid(int t) { if (INBOUNDS_VEC(t, soundTracks)) { return soundTracks[t].id; } return NULL; } void musicclass::pauseef(void) { SoundTrack::Pause(); } void musicclass::resumeef(void) { SoundTrack::Resume(); } bool musicclass::halted(void) { return MusicTrack::IsPaused(); } void musicclass::updatemutestate(void) { if (game.muted) { set_music_volume(0); set_sound_volume(0); } else { set_sound_volume(VVV_MAX_VOLUME); if (game.musicmuted) { set_music_volume(0); } else { set_music_volume(controlVolume); } } } ================================================ FILE: desktop_version/src/Music.h ================================================ #ifndef MUSIC_H #define MUSIC_H #include "BinaryBlob.h" #define musicroom(rx, ry) ((rx) + ((ry) * 20)) /* The amount of "space" for the scale of the user-set volume. */ #define USER_VOLUME_MAX 256 /* It is advised that USER_VOLUME_MAX be divisible by this. */ #define USER_VOLUME_STEP 32 enum { Music_PATHCOMPLETE = 0, Music_PUSHINGONWARDS = 1, Music_POSITIVEFORCE = 2, Music_POTENTIALFORANYTHING = 3, Music_PASSIONFOREXPLORING = 4, Music_PAUSE = 5, Music_PRESENTINGVVVVVV = 6, Music_PLENARY = 7, Music_PREDESTINEDFATE = 8, Music_POSITIVEFORCEREVERSED = 9, Music_POPULARPOTPOURRI = 10, Music_PIPEDREAM = 11, Music_PRESSURECOOKER = 12, Music_PACEDENERGY = 13, Music_PIERCINGTHESKY = 14, Music_PREDESTINEDFATEREMIX = 15 }; enum { Sound_FLIP = 0, Sound_UNFLIP = 1, Sound_CRY = 2, Sound_TRINKET = 3, Sound_COIN = 4, Sound_CHECKPOINT = 5, Sound_CRUMBLE = 6, Sound_DISAPPEAR = 7, Sound_GRAVITYLINE = 8, Sound_FLASH = 9, Sound_TELEPORT = 10, Sound_VIRIDIAN = 11, Sound_VERDIGRIS = 12, Sound_VICTORIA = 13, Sound_VITELLARY = 14, Sound_VIOLET = 15, Sound_VERMILION = 16, Sound_TERMINALTOUCH = 17, Sound_GAMESAVED = 18, Sound_ALARM = 19, Sound_TERMINALTEXT = 20, Sound_COUNTDOWN = 21, Sound_GO = 22, Sound_DESTROY = 23, Sound_COMBINE = 24, Sound_NEWRECORD = 25, Sound_TROPHY = 26, Sound_RESCUE = 27 }; class musicclass { public: musicclass(void); void init(void); void destroy(void); void set_music_volume(int volume); void set_sound_volume(int volume); void play(int t); void resume(void); void resumefade(const int fadein_ms); void pause(void); void haltdasmusik(void); void haltdasmusik(bool from_fade); void silencedasmusik(void); void fadeMusicVolumeIn(int ms); void fadeMusicVolumeOut(const int fadeout_ms); void fadeout(const bool quick_fade_ = true); void fadein(void); void processmusicfadein(void); void processmusicfadeout(void); void processmusic(void); void niceplay(int t); void changemusicarea(int x, int y); int currentsong; int haltedsong; bool playef(int t); bool playefid(const char* id); bool soundidexists(const char* id); bool soundisextra(int t); const char* getsoundid(int t); void pauseef(void); void resumeef(void); bool halted(void); void updatemutestate(void); bool safeToProcessMusic; int nicechange; // -1 if no song queued bool nicefade; bool m_doFadeInVol; bool m_doFadeOutVol; int controlVolume; /* 0..USER_VOLUME_MAX */ int user_music_volume; int user_sound_volume; bool quick_fade; // MMMMMM mod settings bool mmmmmm; bool usingmmmmmm; binaryBlob pppppp_blob; binaryBlob mmmmmm_blob; int num_pppppp_tracks; int num_mmmmmm_tracks; }; #ifndef MUSIC_DEFINITION extern musicclass music; #endif #endif /* MUSIC_H */ ================================================ FILE: desktop_version/src/Network.c ================================================ #include #include "MakeAndPlay.h" #include "Unused.h" #ifdef MAKEANDPLAY #ifdef STEAM_NETWORK #undef STEAM_NETWORK #endif #ifdef GOG_NETWORK #undef GOG_NETWORK #endif #endif #ifdef STEAM_NETWORK #define STEAM_NUM 1 #else #define STEAM_NUM 0 #endif #ifdef GOG_NETWORK #define GOG_NUM 1 #else #define GOG_NUM 0 #endif #define NUM_BACKENDS (STEAM_NUM+GOG_NUM) #define DECLARE_BACKEND(name) \ int32_t name##_init(void); \ void name##_shutdown(void); \ void name##_update(void); \ void name##_unlockAchievement(const char *name); #ifdef STEAM_NETWORK DECLARE_BACKEND(STEAM) #endif #ifdef GOG_NETWORK DECLARE_BACKEND(GOG) #endif #undef DECLARE_BACKEND typedef struct NetworkBackend { int32_t IsInit; int32_t (*Init)(void); void (*Shutdown)(void); void (*Update)(void); void (*UnlockAchievement)(const char*); } NetworkBackend; #if NUM_BACKENDS > 0 static NetworkBackend backends[NUM_BACKENDS]; #endif int NETWORK_init(void) { int32_t i, any = 0; #define ASSIGN_BACKEND(name, index) \ backends[index].Init = name##_init; \ backends[index].Shutdown = name##_shutdown; \ backends[index].Update = name##_update; \ backends[index].UnlockAchievement = name##_unlockAchievement; #ifdef STEAM_NETWORK ASSIGN_BACKEND(STEAM, 0) #endif #ifdef GOG_NETWORK ASSIGN_BACKEND(GOG, STEAM_NUM) #endif #undef ASSIGN_BACKEND #if NUM_BACKENDS > 0 for (i = 0; i < NUM_BACKENDS; i += 1) { backends[i].IsInit = backends[i].Init(); any |= backends[i].IsInit; } #else UNUSED(i); #endif return any; } void NETWORK_shutdown(void) { #if NUM_BACKENDS > 0 int32_t i; for (i = 0; i < NUM_BACKENDS; i += 1) if (backends[i].IsInit) { backends[i].Shutdown(); } #endif } void NETWORK_update(void) { #if NUM_BACKENDS > 0 int32_t i; for (i = 0; i < NUM_BACKENDS; i += 1) if (backends[i].IsInit) { backends[i].Update(); } #endif } void NETWORK_unlockAchievement(const char *name) { #if NUM_BACKENDS > 0 int32_t i; for (i = 0; i < NUM_BACKENDS; i += 1) if (backends[i].IsInit) { backends[i].UnlockAchievement(name); } #else UNUSED(name); #endif } ================================================ FILE: desktop_version/src/Network.h ================================================ #ifndef VNETWORK_H #define VNETWORK_H #include #ifdef __cplusplus extern "C" { #endif int32_t NETWORK_init(void); void NETWORK_shutdown(void); void NETWORK_update(void); void NETWORK_unlockAchievement(const char *name); int32_t NETWORK_getAchievementProgress(const char *name); void NETWORK_setAchievementProgress(const char *name, int32_t stat); #ifdef __cplusplus } #endif #endif /* VNETWORK_H */ ================================================ FILE: desktop_version/src/Otherlevel.cpp ================================================ #include "Otherlevel.h" #include "Game.h" #include "Graphics.h" #include "Entity.h" #include "MakeAndPlay.h" #include "UtilityClass.h" const short* otherlevelclass::loadlevel(int rx, int ry) { int t; roomtileset = 1; rx -= 100; ry -= 100; t = rx + (ry * 100); const short* result; roomname = ""; roomname_special = false; hiddenname = "Dimension VVVVVV"; switch(t) { #if !defined(MAKEANDPLAY) case rn(0,0): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(72, 32, 14); //Teleporter! obj.createentity(216, 144, 20, 1); obj.createblock(5, 216-4, 144, 20, 16, 8); result = contents; break; } case rn(0,1): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(0,2): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(0,3): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(0,4): { static const short contents[] = { 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(0,5): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(0,6): { static const short contents[] = { 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, }; result = contents; break; } case rn(0,7): { static const short contents[] = { 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,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, 501,501,501,501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, 501,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, }; result = contents; break; } case rn(0,8): { static const short contents[] = { 498,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, 498,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, 498,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, 498,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, 498,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, 498,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, 498,498,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, 498,498,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, 498,498,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, 498,498,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, 498,498,498,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, 498,498,498,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, 498,498,498,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, 498,498,498,498,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, 498,498,498,498,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, 498,498,498,498,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, 498,498,498,498,498,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, 498,498,498,498,498,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, 498,498,498,498,498,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, 498,498,498,498,498,498,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, 498,498,498,498,498,498,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, 498,498,498,498,498,498,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, 498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, }; result = contents; break; } case rn(0,9): { static const short contents[] = { 480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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(152, 144, 10, 1, 9000); // (savepoint) result = contents; break; } case rn(0,10): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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,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,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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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(224, 96, 10, 0, 10000); // (savepoint) result = contents; break; } case rn(0,11): { static const short contents[] = { 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,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, 480,480,480,480,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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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(56, 32, 13); //Warp Token result = contents; break; } case rn(0,12): { static const short contents[] = { 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(0,13): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(0,14): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,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, }; result = contents; break; } case rn(0,15): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,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, 498,498,498,498,498,498,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, 498,498,498,498,498,498,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, 498,498,498,498,498,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, 498,498,498,498,498,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(0,16): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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(120, 40, 14); //Teleporter! result = contents; break; } case rn(0,17): { static const short contents[] = { 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(1,2): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656,656, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(1,3): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,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, 0,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, 0,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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(1,4): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(144, 136, 10, 1, 4010); // (savepoint) result = contents; break; } case rn(1,5): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,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, 480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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(88, 104, 10, 1, 106010); // (savepoint) result = contents; break; } case rn(1,6): { static const short contents[] = { 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(1,8): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,574,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(1,9): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(152, 64, 10, 0, 9010); // (savepoint) result = contents; break; } case rn(1,10): { static const short contents[] = { 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,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(208, 120, 9, 15); // (shiny trinket) result = contents; break; } case rn(1,11): { static const short contents[] = { 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 492,492,492,492,492,492,492,492,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, 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, 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, 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, 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, 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, 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, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,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(40, 192, 13); //Warp Token obj.createentity(168, 136, 13); //Warp Token obj.createentity(224, 136, 13); //Warp Token obj.createentity(96, 80, 13); //Warp Token result = contents; break; } case rn(1,12): { static const short contents[] = { 489,489,489,489,489,489,489,489,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, 489,489,489,489,489,489,489,489,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, 489,489,489,489,489,489,489,489,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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, }; result = contents; break; } case rn(1,13): { static const short contents[] = { 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,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, 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, 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, 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, 0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 480,480,480,480,480,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, 480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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(112, 152, 10, 1, 13010); // (savepoint) result = contents; break; } case rn(1,14): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(1,15): { static const short contents[] = { 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,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, 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, 0,0,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, 0,0,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, }; result = contents; break; } case rn(1,16): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,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, 495,495,495,495,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, 495,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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,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(280, 120, 10, 1, 16010); // (savepoint) result = contents; break; } case rn(2,2): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(56, 32, 10, 1, 2020); // (savepoint) result = contents; break; } case rn(2,3): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(2,5): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(2,6): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(40, 88, 10, 1, 6020); // (savepoint) result = contents; break; } case rn(2,8): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,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,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, }; result = contents; break; } case rn(2,9): { static const short contents[] = { 0,0,0,0,0,0,0,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,0,0,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,0,0,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,0,0,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,0,0,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,0,0,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,0,0,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,0,0,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,0,0,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,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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, }; result = contents; break; } case rn(2, 10): if(obj.altstates==0) { static const short contents[] = { 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,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,274,274,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,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(40, 32, 22, 0); // (shiny trinket) obj.createentity(64, 32, 22, 1); // (shiny trinket) obj.createentity(88, 32, 22, 2); // (shiny trinket) obj.createentity(40, 80, 22, 3); // (shiny trinket) obj.createentity(64, 80, 22, 4); // (shiny trinket) obj.createentity(88, 80, 22, 5); // (shiny trinket) obj.createentity(112, 80, 22, 6); // (shiny trinket) obj.createentity(40, 128, 22, 7); // (shiny trinket) obj.createentity(64, 128, 22, 8); // (shiny trinket) obj.createentity(88, 128, 22, 9); // (shiny trinket) obj.createentity(112, 128, 22, 10); // (shiny trinket) obj.createentity(136, 128, 22, 11); // (shiny trinket) obj.createentity(40, 176, 22, 12); // (shiny trinket) obj.createentity(64, 176, 22, 13); // (shiny trinket) obj.createentity(88, 176, 22, 14); // (shiny trinket) obj.createentity(112, 176, 22, 15); // (shiny trinket) obj.createentity(136, 176, 22, 16); // (shiny trinket) obj.createentity(112, 32, 22, 17); // (shiny trinket) obj.createentity(136, 80, 22, 18); // (shiny trinket) obj.createentity(136, 32, 22, 19); // (shiny trinket) if(!game.nocutscenes && !obj.flags[70]) { obj.createblock(1, 304, 0, 16, 240, 48); } result = contents; } else { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, 113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,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(90, 52, 26, 0); // (super warp) result = contents; } hiddenname = "The Ship"; break; case rn(2,11): { static const short contents[] = { 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 104,104,104,104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,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(64, 64, 14); //Teleporter! hiddenname = "The Ship"; result = contents; break; } case rn(2,12): { static const short contents[] = { 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 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, 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, 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, 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, 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, 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, 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, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; hiddenname = "The Ship"; result = contents; break; } case rn(2,13): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, }; result = contents; break; } case rn(2,14): { static const short contents[] = { 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(2,15): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,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, 489,489,489,489,489,489,489,489,489,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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,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(240, 96, 10, 0, 15020); // (savepoint) result = contents; break; } case rn(3,2): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,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(152, 96, 9, 16); // (shiny trinket) result = contents; break; } case rn(3,3): { static const short contents[] = { 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 501,501,501,501,501,501,501,501,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501, 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501, 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,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(24, 192, 10, 1, 3030); // (savepoint) result = contents; break; } case rn(3,5): { static const short contents[] = { 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(3,6): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(3,7): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(3,8): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(3,9): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,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(248, 168, 10, 1, 9030); // (savepoint) result = contents; break; } case rn(3,10): { static const short contents[] = { 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(88, 80, 21, 1); //Terminal // UU Brothers obj.createblock(5, 88 - 4, 80, 20, 16, 25); if(game.stat_trinkets>=5) { obj.createentity(128, 80, 21, 1); //Terminal obj.createblock(5, 128 - 4, 80, 20, 16, 26); } if(game.stat_trinkets>=8) { obj.createentity(176, 80, 21, 1); //Terminal obj.createblock(5, 176 - 4, 80, 20, 16, 27); } if(game.stat_trinkets>=10) { obj.createentity(216, 80, 21, 1); //Terminal obj.createblock(5, 216 - 4, 80, 20, 16, 28); } if(game.stat_trinkets>=12) { obj.createentity(88, 128, 21, 0); //Terminal obj.createblock(5, 88 - 4, 128, 20, 16, 29); } if(game.stat_trinkets>=14) { obj.createentity(128, 128, 21, 0); //Terminal obj.createblock(5, 128 - 4, 128, 20, 16, 33); } if(game.stat_trinkets>=16) { obj.createentity(176, 128, 21, 0); //Terminal obj.createblock(5, 176 - 4, 128, 20, 16, 30); } if(game.stat_trinkets>=18) { obj.createentity(216, 128, 21, 0); //Terminal obj.createblock(5, 216 - 4, 128, 20, 16, 32); } //Special cases if(game.stat_trinkets>=20) { obj.createentity(40, 40, 21, 0); //Terminal obj.createblock(5, 40 - 4, 40, 20, 16, 31); } if(game.stat_trinkets>=20) { obj.createentity(264, 40, 21, 0); //Terminal obj.createblock(5, 264 - 4, 40, 20, 16, 34); } obj.createentity(152, 40, 21, 0); //Terminal (jukebox instructions) obj.createblock(5, 152 - 4, 40, 20, 16, 24); hiddenname = "The Ship"; result = contents; break; } case rn(3,11): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, }; hiddenname = "The Ship"; result = contents; break; } case rn(3,12): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 492,492,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, 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, 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, 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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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(128, 160, 10, 1, 113030); // (savepoint) result = contents; break; } case rn(3,13): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(192, 96, 10, 0, 114030); // (savepoint) result = contents; break; } case rn(3,14): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, }; result = contents; break; } case rn(3,15): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,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, 483,483,483,483,483,483,483,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, 483,483,483,483,483,483,483,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, 483,483,483,483,483,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, 483,483,483,483,483,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, 483,483,483,483,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, 483,483,483,483,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, 483,483,483,483,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, 483,483,483,483,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(4,5): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,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,659,659,659,659,659,659,659,659,659,659,659,659,659,500,498,498,498,498,498,498,498,498,498,498, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(4,7): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(4,9): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 110,110,110,110,110,110,110,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, }; result = contents; break; } case rn(4,10): { static const short contents[] = { 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, 110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,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(256, 120, 20, 1); //Terminal Ship computer obj.createblock(5, 256 - 4, 120, 20, 16, 22); obj.createentity(256, 184, 20, 1); //Terminal obj.createentity(232, 184, 20, 1); //Terminal obj.createentity(208, 184, 20, 1); //Terminal obj.createblock(5, 208 + 4, 184, 56, 16, 23); hiddenname = "The Ship"; result = contents; break; } case rn(4,11): { static const short contents[] = { 116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116, 116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116, 116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116, 116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116, 116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116,116, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; hiddenname = "The Ship"; result = contents; break; } case rn(4,12): { static const short contents[] = { 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(4,13): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(248, 112, 10, 1, 114040); // (savepoint) result = contents; break; } case rn(4,14): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(104, 176, 10, 1, 115040); // (savepoint) result = contents; break; } case rn(4,15): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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(16, 40, 10, 1, 15040); // (savepoint) result = contents; break; } case rn(5,2): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,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, 483,483,483,483,483,483,483,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, 483,483,483,483,483,483,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, 483,483,483,483,483,483,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, 483,483,483,483,483,483,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, 483,483,483,483,483,483,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, 483,483,483,483,483,483,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, 483,483,483,483,483,483,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, 483,483,483,483,483,483,483,483,483,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, 483,483,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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(5,3): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(272, 128, 10, 0, 3050); // (savepoint) result = contents; break; } case rn(5,4): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,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, 489,489,489,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(5,5): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(5,6): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(5,7): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,564,564,564,564,564,564,564,564,564,564,564,564, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(5,8): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(5,9): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(5,10): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(5,11): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(5,12): { static const short contents[] = { 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(5,13): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,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(184, 176, 10, 1, 13050); // (savepoint) result = contents; break; } case rn(5,14): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,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, 495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, }; result = contents; break; } case rn(5,15): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(72, 16, 9, 14); // (shiny trinket) result = contents; break; } case rn(5,18): { static const short contents[] = { 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,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,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(224, 160, 13); //Warp Token result = contents; break; } case rn(5,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, }; result = contents; break; } case rn(6,2): { static const short contents[] = { 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(152, 152, 10, 0, 103060); // (savepoint) result = contents; break; } case rn(6,4): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,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, 0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(128, 120, 10, 1, 4060); // (savepoint) result = contents; break; } case rn(6,5): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,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, 0,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, 0,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, 0,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, 0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, }; result = contents; break; } case rn(6,6): { static const short contents[] = { 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,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, 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, 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, 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, 0,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, 0,0,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, 0,0,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, 0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, }; result = contents; break; } case rn(6,7): { static const short contents[] = { 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 0,0,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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,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(64, 88, 10, 1, 7060); // (savepoint) result = contents; break; } case rn(6,8): { static const short contents[] = { 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(6,9): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(6,10): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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(152, 128, 10, 0, 10060); // (savepoint) result = contents; break; } case rn(6,11): { static const short contents[] = { 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(6,12): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(6,13): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(6,14): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,480,480,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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, }; result = contents; break; } case rn(6,15): { static const short contents[] = { 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(96, 48, 20, 1);//Terminal obj.createblock(5, 96 - 4, 48, 20, 16, 12); } obj.createentity(128, 216, 10, 1, 116061); // (savepoint) result = contents; break; } case rn(6,18): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,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, 483,483,483,483,483,483,483,483,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(6,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, }; result = contents; break; } case rn(7,1): { static const short contents[] = { 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,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,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,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, 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, 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, 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, 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, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,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(192, 104, 13); //Warp Token result = contents; break; } case rn(7,2): { static const short contents[] = { 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 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, 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, 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, 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, 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, 0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(88, 136, 10, 0, 103070); // (savepoint) result = contents; break; } case rn(7,3): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(7,4): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,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(208, 128, 10, 1, 4070); // (savepoint) result = contents; break; } case rn(7,5): { static const short contents[] = { 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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,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,480,480,480,481,641,642,0,0,680,0,640,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,480,602,0,0,0,0,680,0,0,0,640,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,481,642,0,0,0,0,680,0,0,0,0,680,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,480,480,480,602,0,0,0,0,0,680,0,0,0,0,680,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,480,480,480,602,0,0,0,0,0,680,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(7,6): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(7,7): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(7,8): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(7,9): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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(64, 112, 14); //Teleporter! result = contents; break; } case rn(7,10): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,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, 495,495,495,495,495,495,495,495,495,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, }; result = contents; break; } case rn(7,11): { static const short contents[] = { 486,486,486,486,486,486,486,486,486,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,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,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,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,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,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,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(7,14): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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(48, 192, 10, 1, 14070); // (savepoint) result = contents; break; } case rn(8,0): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,1): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,2): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, }; result = contents; break; } case rn(8,3): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, }; result = contents; break; } case rn(8,4): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,5): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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(80, 40, 10, 1, 5080); // (savepoint) result = contents; break; } case rn(8,6): { static const short contents[] = { 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(96, 72, 13); //Warp Token result = contents; break; } case rn(8,7): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,8): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(8,10): { static const short contents[] = { 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,11): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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(176, 40, 14); //Teleporter! obj.createentity(120, 128, 20, 1); // (terminal) obj.createblock(5, 120-4, 128, 20, 16, 7); result = contents; break; } case rn(8,12): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, }; result = contents; break; } case rn(8,13): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, }; result = contents; break; } case rn(8,14): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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(40, 152, 10, 1, 14080); // (savepoint) result = contents; break; } case rn(8,15): { static const short contents[] = { 495,495,617,0,0,0,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,0,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,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, 495,495,495,495,617,0,0,0,0,0,0,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,617,0,0,0,0,0,0,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,617,0,0,0,0,0,0,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,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, 495,495,495,495,617,0,0,0,0,0,0,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,617,0,0,0,0,0,0,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,617,0,0,0,0,0,0,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,617,0,0,0,0,0,0,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,617,0,0,0,0,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,495,495,617,0,0,0,0,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,617,0,0,0,0,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,16): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(152, 80, 10, 1, 16080); // (savepoint) result = contents; break; } case rn(8,17): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,18): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(8,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(10,0): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(10,1): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(10,2): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(10,3): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, }; result = contents; break; } case rn(10,8): { static const short contents[] = { 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(80, 40, 9, 17); // (shiny trinket) roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(10,9): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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) result = contents; break; } case rn(10,10): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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) result = contents; break; } case rn(10,11): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 116,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, 116,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, 116,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, 116,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, 116,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, 116,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) result = contents; break; } case rn(10,12): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(184, 176, 10, 1, 12100); // (savepoint) roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(10,13): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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) result = contents; break; } case rn(10,14): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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) result = contents; break; } case rn(10,15): { static const short contents[] = { 495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 495,495,495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(10,16): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,486,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, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,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(216, 72, 10, 1, 16100); // (savepoint) result = contents; break; } case rn(10,17): { static const short contents[] = { 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,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,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, 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, 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, 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, 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, 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, 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, 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, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, }; result = contents; break; } case rn(10,18): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,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, 483,483,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, 483,483,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, 483,483,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, 483,483,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, 483,483,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, 483,483,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, 483,483,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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(10,19): { static const short contents[] = { 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501, 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501, 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501, 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501, 501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,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,662,503,501,501,501,501,501,501,501,501,501,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,661,662,662,503,501,501,501,501,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,701,0,0,661,662,662,503,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(40, 112, 9, 13); // (shiny trinket) result = contents; break; } case rn(11,0): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(11,1): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(11,2): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(11,3): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(11,8): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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,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, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,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((8 * 8), (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy obj.nearelephant = true; roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(11,9): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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(8 * 8, -240 + (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy obj.nearelephant = true; roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(11,10): { static const short contents[] = { 92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92, 92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92, 92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92, 92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92, 92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,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,253,253,253,253,253,253,253,253,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 92,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, 92,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, 92,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, 92,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, 92,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, 92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,92,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) result = contents; break; } case rn(11,16): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(11,17): { static const short contents[] = { 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(11,18): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(11,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(12,0): { static const short contents[] = { 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,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,489,489,489,489,489,489, 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, 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, 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, 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, 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, 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, 489,489,489,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, 489,489,489,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, 489,489,489,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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,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, 489,489,489,489,489,489,489,489,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, 489,489,489,489,489,489,489,489,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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(12,1): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(12,2): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(12,8): { static const short contents[] = { 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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(-320 + (8 * 8), (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy obj.nearelephant = true; obj.createentity(240, 72, 10, 1, 8120); // (savepoint) roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(12,9): { static const short contents[] = { 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 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, 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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 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, 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, 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(-320 + (8 * 8), -240 + (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy obj.nearelephant = true; roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(12,10): { static const short contents[] = { 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 104,104,104,104,104,104,104,104,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, 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, 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, 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, 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, 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, 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, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,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) result = contents; break; } case rn(12,16): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, }; result = contents; break; } case rn(12,17): { static const short contents[] = { 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(12,18): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(12,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(13,1): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(13,2): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,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(48, 96, 14); //Teleporter! result = contents; break; } case rn(13,14): { static const short contents[] = { 89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(280, 32, 20, 1); //terminal obj.createblock(5, 280-4, 32, 20, 16, 9); roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(13,15): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(13,16): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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(80, 104, 10, 1, 16130); // (savepoint) result = contents; break; } case rn(13,17): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(240, 128, 10, 1, 17130); // (savepoint) result = contents; break; } case rn(13,18): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(13,19): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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,483,483,483,483,483,483,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,483,483,483,483,483,483,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,483,483,483,483,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,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,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, 483,483,483,483,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, 483,483,483,483,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, 483,483,483,483,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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,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, 483,483,483,483,483,483,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, 483,483,483,483,483,483,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,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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(14,14): { static const short contents[] = { 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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) result = contents; break; } case rn(14,16): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, 492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, }; result = contents; break; } case rn(14,17): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, }; result = contents; break; } case rn(14,18): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(14,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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(176, 72, 14); //Teleporter! obj.createentity(88, 160, 20, 1);//terminal obj.createblock(5, 88-4, 160, 20, 16, 11); result = contents; break; } case rn(15,14): { static const short contents[] = { 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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) result = contents; break; } case rn(15,16): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(15,17): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(15,18): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(88, 96, 10, 0, 18150); // (savepoint) result = contents; break; } case rn(15,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, 489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489, }; result = contents; break; } case rn(16,4): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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(72, 120, 13); //Warp Token result = contents; break; } case rn(16,14): { static const short contents[] = { 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 107,107,107,107,107,107,107,107,107,107,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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(176, 152, 10, 1, 14160); // (savepoint) result = contents; break; } case rn(16,17): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,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,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,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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(16,19): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(17,4): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,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,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 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, 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, 498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,498,498,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, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, }; result = contents; break; } case rn(17,12): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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,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,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, 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, 495,495,617,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,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,617,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,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, 495,495,495,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, 495,495,495,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, 495,495,495,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, 495,495,495,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, 495,495,495,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, 495,495,495,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, 495,495,495,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, 495,495,495,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, 495,495,495,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(40, 40, 14); //Teleporter! obj.createentity(192, 120, 20, 1);//terminal obj.createblock(5, 192-4, 120, 20, 16, 10); roomtileset = 0; // (Use space station tileset) result = contents; break; } case rn(17,13): { static const short contents[] = { 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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, 92,92,92,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) result = contents; break; } case rn(17,14): { static const short contents[] = { 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 89,89,89,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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) result = contents; break; } case rn(17,15): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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) result = contents; break; } case rn(17,16): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(17,17): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(112, 72, 14); //Teleporter! result = contents; break; } case rn(17,18): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(17,19): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486, 486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,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(152, 152, 10, 0, 19170); // (savepoint) result = contents; break; } case rn(18,4): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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,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,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, 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, 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, 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, 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, 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, 0,0,0,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, 0,0,0,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, 0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, }; result = contents; break; } case rn(18,15): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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(104, 152, 10, 1, 15180); // (savepoint) result = contents; break; } case rn(18,17): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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,522,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,560,561,522,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,600,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,640,641,482,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,640,641,482,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,0,0,640,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; result = contents; break; } case rn(18,19): { static const short contents[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, }; result = contents; break; } case rn(19,4): { static const short contents[] = { 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,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, 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, 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(192, 176, 10, 1, 105190); // (savepoint) result = contents; break; } case rn(19,5): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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(40, 192, 10, 1, 106190); // (savepoint) result = contents; break; } case rn(19,9): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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,497,495,496,656,656,656,656,656,656,656,656,656,656,656,656,497,495,496,656,656,656,656, 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, 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, 495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 495,495,617,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(19,10): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,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(72, 168, 10, 1, 111190); // (savepoint) result = contents; break; } case rn(19,11): { static const short contents[] = { 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,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,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, 495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495, }; result = contents; break; } case rn(19,12): { static const short contents[] = { 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498, 498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,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,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659,659, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(19,13): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(19,14): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(80, 144, 10, 1, 14190); // (savepoint) result = contents; break; } case rn(19,15): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, }; result = contents; break; } case rn(19,16): { static const short contents[] = { 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, }; result = contents; break; } case rn(19,17): { static const short contents[] = { 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,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, 0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(168, 88, 10, 1, 17190); // (savepoint) result = contents; break; } case rn(19,18): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, }; result = contents; break; } case rn(19,19): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, 480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, }; result = contents; break; } ///Secret lab! case rn(17, 6): //Phase 1 if(obj.altstates==1) { static const short contents[] = { 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,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,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, }; result = contents; } else if(obj.altstates==2) { //Phase 2 static const short contents[] = { 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,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,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, }; result = contents; } else { //Phase 3 static const short contents[] = { 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,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,288,286,286,286,287,447,447,447,288,286,286,286,287,447,447,447, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, 286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, }; result = contents; } hiddenname = "Secret Lab"; break; case rn(18,6): { static const short contents[] = { 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, 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, 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, 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, 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, 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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 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, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, 280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, }; hiddenname = "Secret Lab"; result = contents; break; } case rn(18,5): { static const short contents[] = { 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, 292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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(256, 88, 21, 1); //Terminal obj.createentity(128, 88, 21, 1); //Terminal obj.createentity(104, 88, 21, 1); //Terminal obj.createentity(80, 88, 21, 1); //Terminal obj.createentity(128, 128, 21, 0); //Terminal obj.createentity(128, 192, 21, 1); //Terminal obj.createentity(104, 192, 21, 1); //Terminal obj.createentity(80, 192, 21, 1); //Terminal if(game.insecretlab) { //vitellary obj.createentity(231, 81, 18, 14, 0, 18); obj.createblock(5, 231- 32, 0, 32 + 32 + 32, 240, 2); //violet obj.createentity(83, 126, 18, 20, 0, 18); int crewman = obj.getcrewman(EntityColour_CREW_PURPLE); if (INBOUNDS_VEC(crewman, obj.entities)) { obj.entities[crewman].rule = 7; obj.entities[crewman].tile +=6; } obj.createblock(5, 83 - 32, 0, 32 + 32 + 32, 240, 1); } hiddenname = "Secret Lab"; result = contents; break; } case rn(17,5): { static const short contents[] = { 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, 295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,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(96, 48, 25, 0, 1); // Trophy obj.createentity(128, 48, 25, 0, 2); // Trophy obj.createentity(160, 48, 25, 0, 3); // Trophy obj.createentity(192, 48, 25, 0, 4); // Trophy obj.createentity(224, 48, 25, 0, 5); // Trophy obj.createentity(256, 48, 25, 0, 6); // Trophy obj.createentity(96, 88, 25, 1, 13); // Trophy obj.createentity(128, 88, 25, 1, 14); // Trophy obj.createentity(160, 88, 25, 1, 15); // Trophy obj.createentity(192, 88, 25, 1, 16); // Trophy obj.createentity(224, 88, 25, 1, 17); // Trophy obj.createentity(256, 88, 25, 1, 18); // Trophy obj.createentity(96, 128, 25, 0, 7); // Trophy obj.createentity(96, 168, 25, 1, 8); // Trophy obj.createentity(160, 128, 25, 0, 12); // Trophy obj.createentity(192, 128, 25, 0, 11); // Trophy obj.createentity(224, 128, 25, 0, 10); // Trophy obj.createentity(256, 128, 25, 0, 9); // Trophy hiddenname = "Secret Lab"; result = contents; break; } case rn(16,5): { static const short contents[] = { 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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(152, 168, 25, 0, 20); // Trophy placeholder obj.createentity(152, 168, 25, 0, 19); // Trophy hiddenname = "Secret Lab"; result = contents; break; } case rn(19,6): { static const short contents[] = { 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,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, 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, 289,289,289,289,289,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, 289,289,289,289,289,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, 289,289,289,289,289,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, 289,289,289,289,289,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, 289,289,289,289,289,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(216, 176, 21, 1); //Terminal obj.createentity(192, 176, 21, 1); //Terminal obj.createentity(168, 176, 21, 1); //Terminal obj.createentity(144, 176, 21, 1); //Terminal obj.createentity(88, 96, 21, 1); //Terminal obj.createentity(112, 96, 21, 1); //Terminal obj.createentity(136, 96, 21, 1); //Terminal obj.createentity(160, 96, 21, 1); //Terminal //vertigris: obj.createentity(100, 169, 18, 13, 0, 18); obj.createblock(5, 100 - 16, 0, 32 + 32, 240, 4); //victoria: obj.createentity(193, 89, 18, 16, 0, 18); obj.createblock(5, 193-16, 0, 32+32, 240, 5); hiddenname = "Secret Lab"; result = contents; break; } case rn(19,7): { static const short contents[] = { 283,283,283,283,283,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,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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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(72, 192, 13); // (shiny trinket) obj.createentity(112, 144, 20, 1); // (terminal) obj.createblock(5, 112 - 4, 144, 20, 16, 21); //vermilion obj.createentity(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); hiddenname = "Secret Lab"; result = contents; break; } case rn(19, 8): { //The SUPER GRAVITRON static const short contents[] = { 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283, 283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,283,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(-8, 84-32, 11, 328+8); // (horizontal gravity line) obj.createentity(-8, 148 + 32, 11, 328+8); // (horizontal gravity line) obj.createblock(1, -10, 84 - 16, 340, 32, 9); //start the game hiddenname = "The Super Gravitron"; result = contents; break; } #endif default: { static const short contents[1200] = {0}; //obj.fatal_bottom(); result = contents; break; } } return result; } ================================================ FILE: desktop_version/src/Otherlevel.h ================================================ #ifndef OTHERLEVEL_H #define OTHERLEVEL_H class otherlevelclass { public: const short* loadlevel(int rx, int ry); const char* roomname; bool roomname_special; const char* hiddenname; int roomtileset; }; #endif /* OTHERLEVEL_H */ ================================================ FILE: desktop_version/src/ReleaseVersion.h ================================================ #ifndef RELEASEVERSION_H #define RELEASEVERSION_H #define MAJOR_VERSION 2 #define MINOR_VERSION 5 #define PATCH_VERSION 0 #define VVV_STRINGIFY(x) #x #define VVV_TOSTRING(x) VVV_STRINGIFY(x) #if PATCH_VERSION == 0 #define RELEASE_VERSION "v" VVV_TOSTRING(MAJOR_VERSION) "." VVV_TOSTRING(MINOR_VERSION) #else #define RELEASE_VERSION "v" VVV_TOSTRING(MAJOR_VERSION) "." VVV_TOSTRING(MINOR_VERSION) "." VVV_TOSTRING(PATCH_VERSION) #endif #endif /* RELEASEVERSION_H */ ================================================ FILE: desktop_version/src/Render.cpp ================================================ #include #include "ActionSets.h" #include "ButtonGlyphs.h" #include "Constants.h" #include "Credits.h" #include "CustomLevels.h" #include "Editor.h" #include "Entity.h" #include "FileSystemUtils.h" #include "Font.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "GraphicsUtil.h" #include "InterimVersion.h" #include "KeyPoll.h" #include "LevelDebugger.h" #include "Localization.h" #include "LocalizationStorage.h" #include "MakeAndPlay.h" #include "Map.h" #include "Maths.h" #include "Music.h" #include "ReleaseVersion.h" #include "RoomnameTranslator.h" #include "Screen.h" #include "Script.h" #include "UtilityClass.h" #include "VFormat.h" static int tr; static int tg; static int tb; static inline void drawslowdowntext(const int y) { switch (game.slowdown) { case 30: font::print_wrap(PR_CEN, -1, y, loc::gettext("Game speed is normal."), tr/2, tg/2, tb/2); break; case 24: font::print_wrap(PR_CEN, -1, y, loc::gettext("Game speed is at 80%"), tr, tg, tb); break; case 18: font::print_wrap(PR_CEN, -1, y, loc::gettext("Game speed is at 60%"), tr, tg, tb); break; case 12: font::print_wrap(PR_CEN, -1, y, loc::gettext("Game speed is at 40%"), tr, tg, tb); break; } } static void slider_get(char* buffer, size_t buffer_len, int position, int n_positions, int target_width) { /* Print a slider to the buffer for target_width in pixels. * * <--target w--> * []............ * ......[]...... * ............[] * ^^^^^^ dots_per_position=6 * ^^^^^^^^^^^^^^ max_chars=14 */ if (n_positions < 2 || position < 0 || position >= n_positions) { buffer[0] = '\0'; return; } int max_chars = ((target_width - font::len(0, "[]")) / font::len(0, ".")) + 2; max_chars = SDL_min(max_chars, buffer_len-1); int dots_per_position = (max_chars-2) / (n_positions-1); max_chars = dots_per_position * (n_positions-1) + 2; VVV_fillstring(buffer, max_chars+1, '.'); if (dots_per_position<1) { return; } int handle_idx = position*dots_per_position; buffer[handle_idx] = '['; buffer[handle_idx+1] = ']'; } static void volumesliderrender(void) { int volume_max_position = USER_VOLUME_MAX / USER_VOLUME_STEP; int volume; switch (game.currentmenuoption) { case 0: volume = music.user_music_volume; break; case 1: volume = music.user_sound_volume; break; default: SDL_assert(0 && "Unhandled volume slider menu option!"); return; } char slider[40 + 1]; slider_get(slider, sizeof(slider), volume_max_position * volume / USER_VOLUME_MAX, volume_max_position + 1, 240); char buffer[SCREEN_WIDTH_CHARS + 1]; if (game.slidermode == SLIDER_NONE) { SDL_strlcpy(buffer, slider, sizeof(buffer)); } else { /* Draw selection brackets. */ vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select.c_str(), "label:str", slider); } font::print(PR_CEN, -1, 95, buffer, tr, tg, tb); } static void inline drawglitchrunnertext(const int y) { int tempr = tr; int tempg = tg; int tempb = tb; char buffer[SCREEN_WIDTH_CHARS + 1]; const enum GlitchrunnerMode mode = GlitchrunnerMode_get(); if (mode == GlitchrunnerNone) { tempr /= 2; tempg /= 2; tempb /= 2; SDL_strlcpy(buffer, loc::gettext("Glitchrunner mode is OFF"), sizeof(buffer)); } else { const char* mode_string = loc::gettext(GlitchrunnerMode_enum_to_string(mode)); vformat_buf(buffer, sizeof(buffer), loc::gettext("Glitchrunner mode is {version}"), "version:str", mode_string); } font::print_wrap(PR_CEN, -1, y, buffer, tempr, tempg, tempb); } static inline void draw_skip_message() { /* Unlock 18 is Flip Mode. * If this is the first playthrough, 5 (game completed) will be unlocked * but not Flip Mode until the player hits "play" on the title screen */ bool draw = #ifndef MAKEANDPLAY game.unlock[Unlock_FLIPMODE] && #endif graphics.fademode == FADE_NONE; if (!draw) { return; } const int alpha = graphics.lerp( game.old_skip_message_timer, game.skip_message_timer ); draw = alpha > 100; if (!draw) { return; } char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("- Press {button} to skip -"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_Map) ); font::print( PR_BRIGHTNESS(alpha) | PR_BOR | PR_CEN, -1, graphics.flipmode ? 20 : 210, buffer, 220 - help.glow, 220 - help.glow, 255 - help.glow / 2 ); } static void menurender(void) { switch (game.currentmenuname) { case Menu::mainmenu: { const int temp = 50; graphics.draw_sprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); #if defined(MAKEANDPLAY) font::print(PR_RIGHT, 264, temp+35, loc::gettext("MAKE AND PLAY EDITION"), tr, tg, tb); #endif #ifdef INTERIM_VERSION_EXISTS font::print(PR_RIGHT | PR_FONT_8X8, 310, 200, COMMIT_DATE, tr/2, tg/2, tb/2); font::print(PR_RIGHT | PR_FONT_8X8, 310, 210, INTERIM_COMMIT, tr/2, tg/2, tb/2); font::print(PR_RIGHT | PR_FONT_8X8, 310, 220, BRANCH_NAME, tr/2, tg/2, tb/2); #endif font::print(PR_RIGHT, 310, 230, RELEASE_VERSION, tr/2, tg/2, tb/2); const char* left_msg = NULL; const bool fonts_error = !FILESYSTEM_doesFontsDirExist(); const bool lang_error = !FILESYSTEM_doesLangDirExist(); if (fonts_error && lang_error) { left_msg = "[No fonts&lang folders]"; } else if (fonts_error) { left_msg = "[No fonts folder]"; } else if (lang_error) { left_msg = "[No lang folder]"; } else if (music.mmmmmm) { left_msg = loc::gettext("[MMMMMM Mod Installed]"); } if (left_msg != NULL) { font::print(0, 10, 230, left_msg, tr/2, tg/2, tb/2); } break; } case Menu::levellist: { if (cl.ListOfMetaData.size()==0) { font::print_wrap(PR_CEN, -1, 90, loc::gettext("ERROR: No levels found."), tr, tg, tb); } int tmp=game.currentmenuoption+(game.levelpage*8); if (INBOUNDS_VEC(tmp, cl.ListOfMetaData)) { const bool nextlastoptions = cl.ListOfMetaData.size() > 8; //Don't show next/previous page or return to menu options here! if (nextlastoptions && game.menuoptions.size() - game.currentmenuoption<=3) { } else { uint32_t level_flags = PR_FONT_IDX( cl.ListOfMetaData[tmp].level_main_font_idx, cl.ListOfMetaData[tmp].rtl ); uint32_t title_flags = cl.ListOfMetaData[tmp].title_is_gettext ? PR_FONT_INTERFACE : level_flags; uint32_t creator_flags = cl.ListOfMetaData[tmp].creator_is_gettext ? PR_FONT_INTERFACE : level_flags; const char* title = cl.ListOfMetaData[tmp].title.c_str(); if (cl.ListOfMetaData[tmp].title_is_gettext) { title = loc::gettext(title); } const char* creator = cl.ListOfMetaData[tmp].creator.c_str(); if (cl.ListOfMetaData[tmp].creator_is_gettext) { creator = loc::gettext(creator); } font::print(title_flags | PR_2X | PR_CEN, -1, 15, title, tr, tg, tb); int sp = SDL_max(10, font::height(level_flags)); graphics.print_level_creator(creator_flags, 40, creator, tr, tg, tb); font::print(level_flags | PR_CEN, -1, 40+sp, cl.ListOfMetaData[tmp].website, tr, tg, tb); font::print(level_flags | PR_CEN, -1, 40+sp*3, cl.ListOfMetaData[tmp].Desc1, tr, tg, tb); font::print(level_flags | PR_CEN, -1, 40+sp*4, cl.ListOfMetaData[tmp].Desc2, tr, tg, tb); if (sp <= 10) { font::print(level_flags | PR_CEN, -1, 40+sp*5, cl.ListOfMetaData[tmp].Desc3, tr, tg, tb); } } } break; } case Menu::errornostart: font::print_wrap(PR_CEN, -1, 65, loc::gettext("ERROR: This level has no start point!"), tr, tg, tb); break; case Menu::gameplayoptions: { int gameplayoptionsoffset = 0; #if !defined(MAKEANDPLAY) if (game.ingame_titlemode && game.unlock[Unlock_FLIPMODE]) #endif { gameplayoptionsoffset = 1; if (game.currentmenuoption == 0) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Flip Mode"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Flip the entire game vertically."), tr, tg, tb); if (graphics.setflipmode) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Currently ENABLED!"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Currently Disabled."), tr/2, tg/2, tb/2); } } } if (game.currentmenuoption == gameplayoptionsoffset + 0) { //Toggle FPS font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Toggle 30+ FPS"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change whether the game runs at 30 or over 30 FPS."), tr, tg, tb); if (!game.over30mode) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: 30 FPS"), tr/2, tg/2, tb/2); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: Over 30 FPS"), tr, tg, tb); } break; } else if (game.currentmenuoption == gameplayoptionsoffset + 1) { //Speedrunner options font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Speedrunner Options"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Access some advanced settings that might be of interest to speedrunners."), tr, tg, tb); } else if (game.currentmenuoption == gameplayoptionsoffset + 2) { //Advanced options font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Advanced Options"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("All other gameplay settings."), tr, tg, tb); } else if (game.currentmenuoption == gameplayoptionsoffset + 3) { //Clear Data font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Clear Data"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Delete your main game save data and unlocked play modes."), tr, tg, tb); } else if (game.currentmenuoption == gameplayoptionsoffset + 4) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Clear Data"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Delete your custom level save data and completion stars."), tr, tg, tb); } break; } case Menu::options: switch (game.currentmenuoption) { case 0: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Gameplay Options"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Adjust various gameplay settings."), tr, tg, tb); break; case 1: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Graphics Options"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Adjust screen settings."), tr, tg, tb); break; case 2: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Audio Options"), tr, tg, tb); if (music.mmmmmm) { font::print_wrap(PR_CEN, -1, 65, loc::gettext("Adjust volume settings and soundtrack."), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, 65, loc::gettext("Adjust volume settings."), tr, tg, tb); } break; case 3: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Game Pad Options"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Rebind your controller's buttons and adjust sensitivity."), tr, tg, tb); break; case 4: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Accessibility"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disable screen effects, enable slowdown modes or invincibility."), tr, tg, tb); break; case 5: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Language"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change the language."), tr, tg, tb); } break; case Menu::graphicoptions: { int offset = 0; if (game.currentmenuoption == offset + 0 && !gameScreen.isForcedFullscreen()) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Toggle Fullscreen"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change to fullscreen/windowed mode."), tr, tg, tb); if (gameScreen.isWindowed) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: WINDOWED"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: FULLSCREEN"), tr, tg, tb); } } if (gameScreen.isForcedFullscreen()) { --offset; } if (game.currentmenuoption == offset + 1) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Scaling Mode"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Choose letterbox/stretch/integer mode."), tr, tg, tb); switch (gameScreen.scalingMode) { case SCALING_INTEGER: font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: INTEGER"), tr, tg, tb); break; case SCALING_STRETCH: font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: STRETCH"), tr, tg, tb); break; case SCALING_LETTERBOX: default: font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: LETTERBOX"), tr, tg, tb); break; } } if (game.currentmenuoption == offset + 2 && !gameScreen.isForcedFullscreen()) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Resize to Nearest"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Resize to the nearest window size that is of an integer multiple."), tr, tg, tb); if (!gameScreen.isWindowed) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("You must be in windowed mode to use this option."), tr, tg, tb); } } if (gameScreen.isForcedFullscreen()) { --offset; } if (game.currentmenuoption == offset + 3) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Toggle Filter"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change to nearest/linear filter."), tr, tg, tb); if (gameScreen.isFiltered) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: LINEAR"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: NEAREST"), tr, tg, tb); } } if (game.currentmenuoption == offset + 4) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Analogue Mode"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("There is nothing wrong with your television set. Do not attempt to adjust the picture."), tr, tg, tb); } if (game.currentmenuoption == offset + 5) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Toggle VSync"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Turn VSync on or off."), tr, tg, tb); if (!gameScreen.vsync) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: VSYNC OFF"), tr/2, tg/2, tb/2); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Current mode: VSYNC ON"), tr, tg, tb); } } break; } case Menu::audiooptions: switch (game.currentmenuoption) { case 0: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Music Volume"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change the volume of the music."), tr, tg, tb); volumesliderrender(); break; case 1: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Sound Volume"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Change the volume of sound effects."), tr, tg, tb); volumesliderrender(); break; case 2: { if (!music.mmmmmm) { break; } font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Soundtrack"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Toggle between MMMMMM and PPPPPP."), tr, tg, tb); const char* soundtrack; if (music.usingmmmmmm) { soundtrack = loc::gettext("Current soundtrack: MMMMMM"); } else { soundtrack = loc::gettext("Current soundtrack: PPPPPP"); } font::print_wrap(PR_CEN, -1, next_y, soundtrack, tr, tg, tb); break; } } break; case Menu::credits: font::print(PR_CEN, -1, 50, loc::gettext("VVVVVV is a game by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 65, "Terry Cavanagh", tr, tg, tb); graphics.drawimagecol(IMAGE_SITE, -1, 86, graphics.getRGB(tr, tg, tb), true); font::print(PR_CEN, -1, 120, loc::gettext("and features music by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 135, "Magnus Pålsson", tr, tg, tb); graphics.drawimagecol(IMAGE_SITE2, -1, 156, graphics.getRGB(tr, tg, tb), true); break; case Menu::credits2: font::print(PR_CEN, -1, 40, loc::gettext("Roomnames are by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 55, "Bennett Foddy", tr, tg, tb); graphics.drawimagecol(IMAGE_SITE3, -1, 76, graphics.getRGB(tr, tg, tb), true); font::print(PR_CEN, -1, 100, loc::gettext("C++ version by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 115, "Simon Roth", tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 135, "Ethan Lee", tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 155, "Misa Kai", tr, tg, tb); break; case Menu::credits25: font::print(PR_CEN, -1, 40, loc::gettext("Beta Testing by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 55, "Sam Kaplan", tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 75, "Pauli Kohberger", tr, tg, tb); font::print(PR_CEN, -1, 130, loc::gettext("Ending Picture by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 145, "Pauli Kohberger", tr, tg, tb); break; case Menu::credits_localisations_implementation: font::print(PR_CEN, -1, 30, loc::gettext("Localisation Project Led by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 45, "Dav999", tr, tg, tb); font::print(PR_CEN, -1, 75, loc::gettext("Pan-European Font Design by"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 90, "Reese Rivers", tr, tg, tb); font::print_wrap(PR_CEN, -1, 125, loc::gettext("With contributions on GitHub from"), tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 140, "Alexandra Fox", tr, tg, tb); font::print(PR_2X | PR_CEN | PR_FONT_8X8, -1, 160, "mothbeanie", tr, tg, tb); break; case Menu::credits_localisations_translations: { font::print_wrap(PR_2X | PR_CEN, -1, 15, loc::gettext("Translators"), tr, tg, tb); int startidx = game.current_credits_list_index; int endidx = game.current_credits_list_index; endidx += Credits::translator_pagesize[game.translator_credits_pagenum]; endidx = SDL_min(endidx, (int)SDL_arraysize(Credits::translators)); int maxheight = 110; int totalheight = (endidx - startidx) * 10; int emptyspace = maxheight - totalheight; int yofs = 50 + (emptyspace / 2); for (int i = startidx; i < endidx; ++i) { if (Credits::translators[i][0] == '>') { yofs += 2; font::print(PR_CJK_HIGH, 88, yofs, loc::gettext(&Credits::translators[i][1]), tr, tg, tb); } else if (Credits::translators[i][0] != ' ') { yofs += 5; font::print(PR_CJK_HIGH, 80, yofs, loc::gettext(Credits::translators[i]), tr, tg, tb); } else { font::print(PR_FONT_8X8, 80, yofs, Credits::translators[i], tr, tg, tb); } yofs += 10; } break; } case Menu::credits3: { font::print_wrap(PR_CEN, -1, 20, loc::gettext("VVVVVV is supported by the following patrons"), tr, tg, tb); int startidx = game.current_credits_list_index; int endidx = SDL_min(startidx + 9, (int)SDL_arraysize(Credits::superpatrons)); int xofs = 80 - 16; int yofs = 40 + 20; for (int i = startidx; i < endidx; ++i) { font::print(PR_FONT_8X8, xofs, yofs, Credits::superpatrons[i], tr, tg, tb); xofs += 4; yofs += 14; } break; } case Menu::credits4: { font::print_wrap(PR_CEN, -1, 20, loc::gettext("and also by"), tr, tg, tb); int startidx = game.current_credits_list_index; int endidx = SDL_min(startidx + 14, (int)SDL_arraysize(Credits::patrons)); int maxheight = 10 * 14; int totalheight = (endidx - startidx) * 10; int emptyspace = maxheight - totalheight; int yofs = 40 + (emptyspace / 2); for (int i = startidx; i < endidx; ++i) { font::print(PR_FONT_8X8, 80, yofs, Credits::patrons[i], tr, tg, tb); yofs += 10; } break; } case Menu::credits5: { font::print_wrap(PR_CEN, -1, 20, loc::gettext("With contributions on GitHub from"), tr, tg, tb); int startidx = game.current_credits_list_index; int endidx = SDL_min(startidx + 9, (int)SDL_arraysize(Credits::githubfriends)); int maxheight = 14 * 9; int totalheight = (endidx - startidx) * 14; int emptyspace = maxheight - totalheight; int xofs, yofs; xofs = 80 - 16; yofs = 40 + 20 + (emptyspace / 2); for (int i = startidx; i < endidx; ++i) { font::print(PR_FONT_8X8, xofs, yofs, Credits::githubfriends[i], tr, tg, tb); xofs += 4; yofs += 14; } break; } case Menu::credits6: font::print_wrap(PR_CEN, -1, 20, loc::gettext("and thanks also to:"), tr, tg, tb); font::print(PR_2X | PR_CEN, -1, 60, loc::gettext("You!"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 100, loc::gettext("Your support makes it possible for me to continue making the games I want to make, now and into the future."), tr, tg, tb); font::print_wrap(PR_CEN, -1, 150,loc::gettext("Thank you!"), tr, tg, tb); break; case Menu::setinvincibility: font::print_wrap(PR_CEN, -1, 100, loc::gettext("Are you sure you want to enable invincibility?"), tr, tg, tb); break; case Menu::setslowdown: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Game Speed"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Select a new game speed below."), tr, tg, tb); drawslowdowntext(next_y); break; } case Menu::newgamewarning: font::print_wrap(PR_CEN, -1, 100, loc::gettext("Are you sure? This will delete your current saves..."), tr, tg, tb); break; case Menu::cleardatamenu: case Menu::clearcustomdatamenu: font::print_wrap(PR_CEN, -1, 100, loc::gettext("Are you sure you want to delete all your saved data?"), tr, tg, tb); break; case Menu::deletequicklevel: font::print_wrap(PR_CEN, -1, 100, loc::gettext("Are you sure you want to delete your quicksave?"), tr, tg, tb); break; case Menu::startnodeathmode: { int next_y; next_y = font::print_wrap(PR_CEN, -1, 45, loc::gettext("Good luck!"), tr, tg, tb); next_y = font::print_wrap(PR_CEN, -1, next_y+15, loc::gettext("You cannot save in this mode."), tr, tg, tb); font::print_wrap(PR_CEN, -1, next_y+5, loc::gettext("Would you like to disable the cutscenes during the game?"), tr, tg, tb); break; } case Menu::controller: { int spacing = font::height(0); spacing = SDL_max(spacing, 10); switch (game.currentmenuoption) { case 0: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Stick Sensitivity"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 55, loc::gettext("Change the sensitivity of the analog stick."), tr, tg, tb); font::print(PR_RTL_XFLIP, 32, 95, loc::gettext("Low"), tr, tg, tb); font::print(PR_CEN, -1, 95, loc::gettext("Medium"), tr, tg, tb); font::print(PR_RIGHT | PR_RTL_XFLIP, 288, 95, loc::gettext("High"), tr, tg, tb); char slider[SCREEN_WIDTH_CHARS + 1]; slider_get(slider, sizeof(slider), key.sensitivity, 5, 240); font::print(PR_CEN, -1, 95+spacing, slider, tr, tg, tb); break; } case 1: case 2: case 3: case 4: case 5: { const char* title = ""; switch (game.currentmenuoption) { case 1: title = loc::gettext("Bind Flip"); break; case 2: title = loc::gettext("Bind Enter"); break; case 3: title = loc::gettext("Bind Menu"); break; case 4: title = loc::gettext("Bind Restart"); break; case 5: title = loc::gettext("Bind Interact"); break; } font::print(PR_2X | PR_CEN, -1, 30, title, tr, tg, tb); if (game.currentmenuoption == 5 && !game.separate_interact) { font::print_wrap( PR_CEN, -1, 55, loc::gettext("Interact is currently Enter!|See speedrunner options."), tr, tg, tb ); } else if (!game.gpmenu_confirming) { font::print_wrap( PR_CEN | PR_BRIGHTNESS(255 - help.glow*2), -1, 55, loc::gettext("Press a button...|(or press ↑↓)"), tr, tg, tb ); } else { char expl[SCREEN_WIDTH_CHARS*3 + 1]; const char* expl_template; if (game.gpmenu_showremove) { expl_template = loc::gettext("Remove {button}?|Press again to confirm"); } else { expl_template = loc::gettext("Add {button}?|Press again to confirm"); } vformat_buf( expl, sizeof(expl), expl_template, "button:str", BUTTONGLYPHS_sdlbutton_to_glyph(game.gpmenu_lastbutton) ); font::print_wrap(PR_CEN, -1, 55, expl, tr, tg, tb); } for (int bind = 1; bind <= 5; bind++) { char buffer_a[SCREEN_WIDTH_CHARS + 1]; char buffer_b[SCREEN_WIDTH_CHARS + 1]; const char* lbl; ActionSet actionset; int action; switch (bind) { case 1: lbl = loc::gettext("Flip is bound to: "); actionset = ActionSet_InGame; action = Action_InGame_ACTION; break; case 2: lbl = loc::gettext("Enter is bound to: "); actionset = ActionSet_InGame; action = Action_InGame_Map; break; case 3: lbl = loc::gettext("Menu is bound to: "); actionset = ActionSet_InGame; action = Action_InGame_Esc; break; case 4: lbl = loc::gettext("Restart is bound to: "); actionset = ActionSet_InGame; action = Action_InGame_Restart; break; default: lbl = loc::gettext("Interact is bound to: "); actionset = ActionSet_InGame; action = Action_InGame_Interact; } SDL_snprintf( buffer_a, sizeof(buffer_a), "%s%s", lbl, BUTTONGLYPHS_get_all_gamepad_buttons(buffer_b, sizeof(buffer_b), actionset, action) ); int brightness = 255; if (bind == 5 && !game.separate_interact) { brightness = 128; } else if (game.gpmenu_confirming && game.currentmenuoption == bind) { brightness = 255 - help.glow*2; } font::print( PR_CEN | PR_BRIGHTNESS(brightness), -1, 85 + (spacing * (bind-1)), buffer_a, tr, tg, tb ); } break; } } break; } case Menu::language: if (loc::languagelist.empty()) { font::print_wrap(PR_CEN, -1, 90, loc::gettext("ERROR: No language files found."), tr, tg, tb); } else if ((unsigned)game.currentmenuoption < loc::languagelist.size()) { font::print_wrap(PR_CEN, -1, 8, loc::languagelist[game.currentmenuoption].credit.c_str(), tr/2, tg/2, tb/2); const char* select_hint; char buffer[SCREEN_WIDTH_CHARS + 1]; if (BUTTONGLYPHS_keyboard_is_active()) { select_hint = loc::languagelist[game.currentmenuoption].action_hint.c_str(); } else { vformat_buf(buffer, sizeof(buffer), loc::languagelist[game.currentmenuoption].gamepad_hint.c_str(), "button:but", vformat_button(ActionSet_Menu, Action_Menu_Accept) ); select_hint = buffer; } font::print(PR_CEN, -1, 230, select_hint, tr/2, tg/2, tb/2); } break; case Menu::translator_main: switch (game.currentmenuoption) { case 0: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Translator options"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Some options that are useful for translators and developers."), tr, tg, tb); break; case 1: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Maintenance"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Sync all language files after adding new strings."), tr, tg, tb); break; } { if (FILESYSTEM_isMainLangDirFromRepo()) { // Just giving people who manually compiled the game some hint as to why this menu is here! font::print(0, 8, 208, loc::gettext("Repository language folder:"), tr/2, tg/2, tb/2); } else { font::print(0, 8, 208, loc::gettext("Language folder:"), tr/2, tg/2, tb/2); } font::print(PR_RIGHT, 316, 224, FILESYSTEM_getUserMainLangDirectory(), tr/2, tg/2, tb/2); } break; case Menu::translator_options: switch (game.currentmenuoption) { case 0: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Statistics"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Count the amount of untranslated strings for this language."), tr, tg, tb); break; case 1: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Translate rooms"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Enable room name translation mode, so you can translate room names in context. Press I for invincibility."), tr, tg, tb); if (roomname_translator::enabled) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Currently ENABLED!"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Currently Disabled."), tr/2, tg/2, tb/2); } break; } case 2: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Explore game"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Explore the rooms of any level in the game, to find all room names to translate."), tr, tg, tb); break; case 3: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Menu test"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Cycle through most menus in the game. The menus will not actually work, all options take you to the next menu instead. Press Escape to stop."), tr, tg, tb); break; case 4: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Cutscene test"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Display all text boxes from cutscenes.xml. Only tests the basic appearance of each individual text box."), tr, tg, tb); break; case 5: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Limits check"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Find translations that don't fit within their defined bounds."), tr, tg, tb); break; } break; case Menu::translator_options_limitscheck: { size_t of = loc::limitscheck_current_overflow; if (of >= loc::text_overflows.size()) { int next_y; if (loc::text_overflows.empty()) { next_y = font::print_wrap(PR_CEN, -1, 20, loc::gettext("No text overflows found!"), tr, tg, tb); } else { next_y = font::print_wrap(PR_CEN, -1, 20, loc::gettext("No text overflows left!"), tr, tg, tb); } font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Note that this detection isn't perfect."), tr, tg, tb); } else { loc::TextOverflow& overflow = loc::text_overflows[of]; char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), "{page}/{total} {max_w}*{max_h} ({max_w_px}x{max_h_px}) [{lang}]", "page:int, total:int, max_w:int, max_h:int, max_w_px:int, max_h_px:int, lang:str", (int) of+1, (int) loc::text_overflows.size(), overflow.max_w, overflow.max_h, overflow.max_w_px, overflow.max_h_px, overflow.lang.c_str() ); font::print(PR_FONT_8X8, 10, 10, buffer, tr/2, tg/2, tb/2); int box_x = SDL_min(10, (320-overflow.max_w_px)/2); graphics.fill_rect(box_x-1, 30-1, overflow.max_w_px+2, overflow.max_h_px+2, tr/3, tg/3, tb/3); int wraplimit; if (overflow.multiline) { wraplimit = overflow.max_w_px; } else { wraplimit = 320-box_x; } if (overflow.text != NULL) { font::print_wrap(overflow.flags, box_x, 30, overflow.text, tr, tg, tb, -1, wraplimit); } } break; } case Menu::translator_options_stats: { font::print(0, 16, 16, loc::get_langmeta()->nativename, tr, tg, tb); const char* line_template = "%4d"; char buffer[5]; int coldiv; #define stat_line(y, filename, untranslated_counter) \ SDL_snprintf(buffer, sizeof(buffer), line_template, \ untranslated_counter \ ); \ coldiv = untranslated_counter > 0 ? 1 : 2; \ font::print(PR_FONT_8X8, 16, y, filename, tr/coldiv, tg/coldiv, tb/coldiv); \ font::print(PR_FONT_8X8, 272, y, buffer, tr/coldiv, tg/coldiv, tb/coldiv) stat_line(48, "strings.xml", loc::n_untranslated[loc::UNTRANSLATED_STRINGS]); stat_line(64, "numbers.xml", loc::n_untranslated[loc::UNTRANSLATED_NUMBERS]); stat_line(80, "strings_plural.xml", loc::n_untranslated[loc::UNTRANSLATED_STRINGS_PLURAL]); stat_line(96, "cutscenes.xml", loc::n_untranslated[loc::UNTRANSLATED_CUTSCENES]); stat_line(112, "roomnames.xml", loc::n_untranslated_roomnames); stat_line(128, "roomnames_special.xml", loc::n_untranslated[loc::UNTRANSLATED_ROOMNAMES_SPECIAL]); #undef stat_line break; } case Menu::translator_options_exploregame: switch (game.currentmenuoption) { case 0: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Space Station 1"), tr, tg, tb); break; case 1: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Laboratory"), tr, tg, tb); break; case 2: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Tower"), tr, tg, tb); break; case 3: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Space Station 2"), tr, tg, tb); break; case 4: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Warp Zone"), tr, tg, tb); break; case 5: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Intermission 1"), tr, tg, tb); break; case 6: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Intermission 2"), tr, tg, tb); break; case 7: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Final Level"), tr, tg, tb); break; } if (roomname_translator::enabled) { if (game.currentmenuoption >= 0 && game.currentmenuoption < 8) { int names_left = loc::n_untranslated_roomnames_area[game.currentmenuoption + 1]; int coldiv = names_left > 0 ? 1 : 2; char buffer[4*SCREEN_WIDTH_CHARS + 1]; loc::gettext_plural_fill( buffer, sizeof(buffer), "{n} normal room names untranslated", "{n} normal room name untranslated", "n:int", names_left ); font::print_wrap(PR_CEN, -1, 65, buffer, tr/coldiv, tg/coldiv, tb/coldiv); } } else { font::print_wrap(PR_CEN, -1, 65, loc::gettext("You have not enabled room name translation mode!"), tr, tg, tb); } break; case Menu::translator_maintenance: switch (game.currentmenuoption) { case 0: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Sync language files"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Merge all new strings from the template files into the translation files, keeping existing translations."), tr, tg, tb); break; case 1: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Statistics"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Count the amount of untranslated strings for each language."), tr, tg, tb); break; case 2: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Limits check"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Find translations that don't fit within their defined bounds."), tr, tg, tb); } break; case Menu::translator_maintenance_sync: { int next_y = font::print_wrap(PR_CEN, -1, 20, loc::gettext("If new strings were added to the English template language files, this feature will insert them in the translation files for all languages. Make a backup, just in case."), tr, tg, tb); font::print(PR_CEN, -1, next_y, loc::gettext("Full syncing EN→All:"), tr, tg, tb); next_y = font::print_wrap(PR_CEN | PR_FONT_8X8, -1, next_y+10, "meta.xml\nstrings.xml\nstrings_plural.xml\ncutscenes.xml\nroomnames.xml\nroomnames_special.xml", tr/2, tg/2, tb/2); font::print(PR_CEN, -1, next_y, loc::gettext("Syncing not supported:"), tr, tg, tb); font::print_wrap(PR_CEN | PR_FONT_8X8, -1, next_y+10, "numbers.xml", tr/2, tg/2, tb/2); break; } case Menu::translator_error_setlangwritedir: font::print_wrap(PR_CEN, -1, 95, loc::gettext("ERROR: Could not write to language folder! Make sure there is no \"lang\" folder next to the regular saves."), tr, tg, tb); break; case Menu::speedrunneroptions: switch (game.currentmenuoption) { case 0: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Glitchrunner Mode"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Re-enable glitches that existed in previous versions of the game."), tr, tg, tb); drawglitchrunnertext(next_y); break; } case 1: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Input Delay"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Re-enable the 1-frame input delay from previous versions of the game."), tr, tg, tb); if (game.inputdelay) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Input delay is ON"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Input delay is OFF"), tr / 2, tg / 2, tb / 2); } break; } case 2: { char buffer[SCREEN_WIDTH_CHARS + 1]; const char* button; font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Interact Button"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Toggle whether you interact with prompts using ENTER or E."), tr, tg, tb); if (game.separate_interact) { button = loc::gettext("E"); } else { button = loc::gettext("ENTER"); } vformat_buf(buffer, sizeof(buffer), loc::gettext("Interact button: {button}"), "button:str", button); font::print_wrap(PR_CEN, -1, next_y, buffer, tr, tg, tb); break; } case 3: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Fake Load Screen"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disable the fake loading screen which appears on game launch."), tr, tg, tb); if (game.skipfakeload) font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Fake loading screen is OFF"), tr / 2, tg / 2, tb / 2); else font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Fake loading screen is ON"), tr, tg, tb); break; } case 4: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("In-Game Timer"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Toggle the in-game timer outside of time trials."), tr, tg, tb); if (game.showingametimer) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("In-Game Timer is ON"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("In-Game Timer is OFF"), tr / 2, tg / 2, tb / 2); } break; } case 5: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("English Sprites"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Show the original English word enemies regardless of your language setting."), tr, tg, tb); if (loc::english_sprites) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Sprites are currently ALWAYS ENGLISH"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Sprites are currently translated"), tr / 2, tg / 2, tb / 2); } break; } } break; case Menu::setglitchrunner: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Glitchrunner Mode"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Select a new glitchrunner version below."), tr, tg, tb); drawglitchrunnertext(next_y); break; } case Menu::advancedoptions: switch (game.currentmenuoption) { case 0: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Unfocus Pause"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Toggle if the game will pause when the window is unfocused."), tr, tg, tb); if (game.disablepause) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Unfocus pause is OFF"), tr/2, tg/2, tb/2); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Unfocus pause is ON"), tr, tg, tb); } break; } case 1: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Unfocus Audio"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Toggle if the audio will pause when the window is unfocused."), tr, tg, tb); if (game.disableaudiopause) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Unfocus audio pause is OFF"), tr/2, tg/2, tb/2); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Unfocus audio pause is ON"), tr, tg, tb); } break; } case 2: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Room Name BG"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Lets you see through what is behind the name at the bottom of the screen."), tr, tg, tb); if (graphics.translucentroomname) font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Room name background is TRANSLUCENT"), tr/2, tg/2, tb/2); else font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Room name background is OPAQUE"), tr, tg, tb); break; } case 3: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Checkpoint Saving"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Toggle if checkpoints should save the game."), tr, tg, tb); if (!game.checkpoint_saving) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Checkpoint saving is OFF"), tr / 2, tg / 2, tb / 2); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Checkpoint saving is ON"), tr, tg, tb); } break; } } break; case Menu::accessibility: { #ifdef MAKEANDPLAY #define OFFSET 0 #else #define OFFSET 1 #endif switch (game.currentmenuoption) { #if !defined(MAKEANDPLAY) case 0: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Unlock Play Modes"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("Unlock parts of the game normally unlocked as you progress."), tr, tg, tb); break; #endif case OFFSET+0: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Invincibility"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Explore the game freely without dying. (Can cause glitches.)"), tr, tg, tb); if (map.invincibility) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Invincibility is ON."), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Invincibility is OFF."), tr / 2, tg / 2, tb / 2); } break; } case OFFSET+1: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Slowdown"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Reduce the game speed."), tr, tg, tb); drawslowdowntext(next_y); break; } case OFFSET+2: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Backgrounds"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disable animated backgrounds in menus and during gameplay."), tr, tg, tb); if (!game.colourblindmode) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Backgrounds are ON."), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Backgrounds are OFF."), tr / 2, tg / 2, tb / 2); } break; } case OFFSET+3: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Screen Effects"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disables screen shakes and flashes."), tr, tg, tb); if (!game.noflashingmode) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Screen Effects are ON."), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Screen Effects are OFF."), tr / 2, tg / 2, tb / 2); } break; } case OFFSET+4: { const char* text; font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Text Outline"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Disables outline on game text."), tr, tg, tb); graphics.fill_rect(0, next_y-4, 320, 16, tr, tg, tb); if (!graphics.notextoutline) { text = loc::gettext("Text outlines are ON."); } else { text = loc::gettext("Text outlines are OFF."); } font::print(PR_BOR | PR_CEN, -1, next_y, text, 255, 255, 255); break; } } break; #undef OFFSET } case Menu::playint1: case Menu::playint2: font::print_wrap(PR_CEN, -1, 65, loc::gettext("Who do you want to play the level with?"), tr, tg, tb); break; case Menu::playmodes: switch (game.currentmenuoption) { case 0: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Time Trials"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Replay any level in the game in a competitive time trial mode."), tr, tg, tb); if (game.nocompetitive()) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Time Trials are not available with slowdown or invincibility."), tr, tg, tb); } break; } case 1: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Intermissions"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Replay the intermission levels."), tr, tg, tb); if (!game.unlock[Unlock_INTERMISSION_REPLAYS]) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("TO UNLOCK: Complete the intermission levels in-game."), tr, tg, tb); } break; } case 2: { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("No Death Mode"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Play the entire game without dying once."), tr, tg, tb); if (game.nocompetitive()) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("No Death Mode is not available with slowdown or invincibility."), tr, tg, tb); } else if (!game.unlock[Unlock_NODEATHMODE]) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("TO UNLOCK: Achieve an S-rank or above in at least 4 time trials."), tr, tg, tb); } break; } case 3: // WARNING: Partially duplicated in Menu::options font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Flip Mode"), tr, tg, tb); int next_y = font::print_wrap(PR_CEN, -1, 65, loc::gettext("Flip the entire game vertically. Compatible with other game modes."), tr, tg, tb); if (game.unlock[Unlock_FLIPMODE]) { if (graphics.setflipmode) { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Currently ENABLED!"), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("Currently Disabled."), tr/2, tg/2, tb/2); } } else { font::print_wrap(PR_CEN, -1, next_y, loc::gettext("TO UNLOCK: Complete the game."), tr, tg, tb); } break; } break; case Menu::youwannaquit: font::print_wrap(PR_CEN, -1, 75, loc::gettext("Are you sure you want to quit?"), tr, tg, tb); break; case Menu::continuemenu: { const char* title = NULL; struct Game::Summary* summary = NULL; switch (game.currentmenuoption) { case 0: title = loc::gettext("Tele Save"); summary = &game.last_telesave; break; case 1: title = loc::gettext("Quick Save"); summary = &game.last_quicksave; break; } if (summary != NULL) { graphics.drawpixeltextbox(17, 65-20, 286, 90, 65, 185, 207); font::print(PR_2X | PR_CEN, -1, 20, title, tr, tg, tb); font::print( PR_CEN, -1, 80-20, loc::gettext_roomname_special(map.currentarea(summary->saverx, summary->savery)), 25, 255 - (help.glow / 2), 255 - (help.glow / 2) ); for (int i = 0; i < 6; i++) { graphics.drawcrewman(169-(3*42)+(i*42), 95-20, i, summary->crewstats[i], true); } font::print( 0, 59, 132-20, game.giventimestring( summary->hours, summary->minutes, summary->seconds ), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2) ); char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::gettext("{savebox_n_trinkets|wordy}"), "savebox_n_trinkets:int", summary->trinkets ); font::print(PR_RIGHT, 262, 132-20, buffer, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2)); graphics.draw_sprite(34, 126-20, 50, graphics.col_clock); graphics.draw_sprite(270, 126-20, 22, graphics.col_trinket); } break; } case Menu::gameover: case Menu::gameover2: { font::print(PR_3X | PR_CEN, -1, 25, loc::gettext("GAME OVER"), tr, tg, tb); for (size_t i = 0; i < SDL_arraysize(game.ndmresultcrewstats); i++) { graphics.drawcrewman(169-(3*42)+(i*42), 68, i, game.ndmresultcrewstats[i], true); } char buffer[2*SCREEN_WIDTH_CHARS + 1]; loc::gettext_plural_fill( buffer, sizeof(buffer), "You rescued {n_crew|wordy} crewmates", "You rescued {n_crew|wordy} crewmate", "n_crew:int", game.ndmresultcrewrescued ); font::print(PR_CEN, -1, 100, buffer, tr, tg, tb); loc::gettext_plural_fill( buffer, sizeof(buffer), "and found {n_trinkets|wordy} trinkets.", "and found {n_trinkets|wordy} trinket.", "n_trinkets:int", game.ndmresulttrinkets ); font::print_wrap(PR_CEN | PR_CJK_LOW, -1, 110, buffer, tr, tg, tb); font::print(PR_CEN, -1, 145, loc::gettext("You managed to reach:"), tr, tg, tb); font::print( PR_CEN | PR_CJK_LOW, -1, 155, loc::gettext_roomname( false, game.ndmresulthardestroom_x, game.ndmresulthardestroom_y, game.ndmresulthardestroom.c_str(), game.ndmresulthardestroom_specialname ), tr, tg, tb ); const char* encouragement; switch (game.ndmresultcrewrescued) { case 1: encouragement = loc::gettext("Keep trying! You'll get there!"); break; case 2: encouragement = loc::gettext("Nice one!"); break; case 3: encouragement = loc::gettext("Wow! Congratulations!"); break; case 4: encouragement = loc::gettext("Incredible!"); break; case 5: encouragement = loc::gettext("Unbelievable! Well done!"); break; default: encouragement = loc::gettext("Er, how did you do that?"); break; } font::print_wrap(PR_CEN, -1, 190, encouragement, tr, tg, tb); break; } case Menu::nodeathmodecomplete: case Menu::nodeathmodecomplete2: { font::print(PR_4X | PR_CEN | PR_CJK_LOW, -1, 8, loc::gettext("WOW"), tr, tg, tb); for (size_t i = 0; i < SDL_arraysize(game.ndmresultcrewstats); i++) { graphics.drawcrewman(169-(3*42)+(i*42), 68, i, game.ndmresultcrewstats[i], true); } font::print(PR_CEN, -1, 100, loc::gettext("You rescued all the crewmates!"), tr, tg, tb); char buffer[3*SCREEN_WIDTH_CHARS + 1]; loc::gettext_plural_fill( buffer, sizeof(buffer), "And you found {n_trinkets|wordy} trinkets.", "And you found {n_trinkets|wordy} trinket.", "n_trinkets:int", game.ndmresulttrinkets ); font::print_wrap(PR_CEN | PR_CJK_LOW, -1, 110, buffer, tr, tg, tb); font::print_wrap(PR_CEN, -1, 160, loc::gettext("A new trophy has been awarded and placed in the secret lab to acknowledge your achievement!"), tr, tg, tb); break; } case Menu::timetrialcomplete: case Menu::timetrialcomplete2: case Menu::timetrialcomplete3: { font::print(PR_3X | PR_CEN, -1, 20, loc::gettext("Results"), tr, tg, tb); std::string tempstring = game.resulttimestring() + loc::gettext(" / ") + game.timetstring(game.timetrialresultpar) + loc::gettext(".99"); uint32_t plus1_flags = PR_RIGHT | PR_CJK_LOW | PR_RTL_XFLIP; int plus1_offset = 0; if (font::len(0, tempstring.c_str()) + font::len(0, loc::gettext("+1 Rank!")) > (292-49)) { // Time and "+1 Rank!" don't fit together, so put it next to titles instead plus1_flags = PR_RIGHT | PR_CJK_HIGH; plus1_offset = -10; } /* sprite_x_1 is used for the clock and trinket, * sprite_x_2 is used for the player. */ int sprite_x_1, sprite_x_2; if (!font::is_rtl(PR_FONT_INTERFACE)) { sprite_x_1 = 22; sprite_x_2 = 22 - 4; } else { sprite_x_1 = SCREEN_WIDTH_PIXELS - 22 - 16; sprite_x_2 = SCREEN_WIDTH_PIXELS - 22 - 16 - 4; } graphics.drawspritesetcol(sprite_x_1, 80-15, 50, 22); font::print(PR_CJK_HIGH | PR_RTL_XFLIP, 49, 80-15, loc::gettext("TIME TAKEN:"), 255, 255, 255); font::print(PR_CJK_LOW | PR_RTL_XFLIP, 49, 90-15, tempstring, tr, tg, tb); if (game.timetrialresulttime <= game.timetrialresultpar) { font::print(plus1_flags, 292, 90-15+plus1_offset, loc::gettext("+1 Rank!"), 255, 255, 255); } tempstring = help.String(game.timetrialresultdeaths); graphics.drawspritesetcol(sprite_x_2, 80+20-4, 12, 22); font::print(PR_CJK_HIGH | PR_RTL_XFLIP, 49, 80+20, loc::gettext("NUMBER OF DEATHS:"), 255, 255, 255); font::print(PR_CJK_LOW | PR_RTL_XFLIP, 49, 90+20, tempstring, tr, tg, tb); if (game.timetrialresultdeaths == 0) { font::print(plus1_flags, 292, 90+20+plus1_offset, loc::gettext("+1 Rank!"), 255, 255, 255); } char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("{n_trinkets} of {max_trinkets}"), "n_trinkets:int, max_trinkets:int", game.timetrialresulttrinkets, game.timetrialresultshinytarget ); graphics.drawspritesetcol(sprite_x_1, 80+55, 22, 22); font::print(PR_CJK_HIGH | PR_RTL_XFLIP, 49, 80+55, loc::gettext("SHINY TRINKETS:"), 255, 255, 255); font::print(PR_CJK_LOW | PR_RTL_XFLIP, 49, 90+55, buffer, tr, tg, tb); if (game.timetrialresulttrinkets >= game.timetrialresultshinytarget) { font::print(plus1_flags, 292, 90+55+plus1_offset, loc::gettext("+1 Rank!"), 255, 255, 255); } const char* rank = ""; switch(game.timetrialrank) { case 0: rank = loc::gettext("B"); break; case 1: rank = loc::gettext("A"); break; case 2: rank = loc::gettext("S"); break; case 3: rank = loc::gettext("V"); break; } int rankw = font::len(PR_4X, rank); int ranktextw = font::len(PR_2X, loc::gettext("Rank:")) + 16 + rankw; int ranktextx = (320-ranktextw)/2; int rankx = ranktextx + ranktextw - rankw; if (game.currentmenuname == Menu::timetrialcomplete2 || game.currentmenuname == Menu::timetrialcomplete3) { font::print(PR_2X | PR_RTL_XFLIP, ranktextx, 175, loc::gettext("Rank:"), tr, tg, tb); } if (game.currentmenuname == Menu::timetrialcomplete3) { font::print(PR_4X | PR_RTL_XFLIP, rankx, 165, rank, 255, 255, 255); } break; } case Menu::unlockmenutrials: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Unlock Time Trials"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("You can unlock each time trial separately."), tr, tg, tb); break; case Menu::timetrials: { bool unlocked = false; int id_trial = game.currentmenuoption; int par; int max_trinkets; switch (game.currentmenuoption) { case 0: if (game.unlock[Unlock_TIMETRIAL_SPACESTATION1]) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Space Station 1"), tr, tg, tb); unlocked = true; par = 75; max_trinkets = 2; } else { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("???"), tr, tg, tb); font::print(PR_CEN, -1, 60, loc::gettext("TO UNLOCK:"), tr, tg, tb); font::print(PR_CEN, -1, 75, loc::gettext("Rescue Violet"), tr, tg, tb); font::print(PR_CEN, -1, 87, loc::gettext("Find three trinkets"), tr, tg, tb); } break; case 1: if (game.unlock[Unlock_TIMETRIAL_LABORATORY]) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Laboratory"), tr, tg, tb); unlocked = true; par = 165; max_trinkets = 4; } else { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("???"), tr, tg, tb); font::print(PR_CEN, -1, 60, loc::gettext("TO UNLOCK:"), tr, tg, tb); font::print(PR_CEN, -1, 75, loc::gettext("Rescue Victoria"), tr, tg, tb); font::print(PR_CEN, -1, 87, loc::gettext("Find six trinkets"), tr, tg, tb); } break; case 2: if (game.unlock[Unlock_TIMETRIAL_TOWER]) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Tower"), tr, tg, tb); unlocked = true; par = 105; max_trinkets = 2; } else { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("???"), tr, tg, tb); font::print(PR_CEN, -1, 60, loc::gettext("TO UNLOCK:"), tr, tg, tb); font::print(PR_CEN, -1, 75, loc::gettext("Rescue Vermilion"), tr, tg, tb); font::print(PR_CEN, -1, 87, loc::gettext("Find nine trinkets"), tr, tg, tb); } break; case 3: if (game.unlock[Unlock_TIMETRIAL_SPACESTATION2]) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Space Station 2"), tr, tg, tb); unlocked = true; par = 200; max_trinkets = 5; } else { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("???"), tr, tg, tb); font::print(PR_CEN, -1, 60, loc::gettext("TO UNLOCK:"), tr, tg, tb); font::print(PR_CEN, -1, 75, loc::gettext("Rescue Vitellary"), tr, tg, tb); font::print(PR_CEN, -1, 87, loc::gettext("Find twelve trinkets"), tr, tg, tb); } break; case 4: if (game.unlock[Unlock_TIMETRIAL_WARPZONE]) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Warp Zone"), tr, tg, tb); unlocked = true; par = 120; max_trinkets = 1; } else { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("???"), tr, tg, tb); font::print(PR_CEN, -1, 60, loc::gettext("TO UNLOCK:"), tr, tg, tb); font::print(PR_CEN, -1, 75, loc::gettext("Rescue Verdigris"), tr, tg, tb); font::print(PR_CEN, -1, 87, loc::gettext("Find fifteen trinkets"), tr, tg, tb); } break; case 5: if (game.unlock[Unlock_TIMETRIAL_FINALLEVEL]) { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("The Final Level"), tr, tg, tb); unlocked = true; par = 135; max_trinkets = 1; } else { font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("???"), tr, tg, tb); font::print(PR_CEN, -1, 60, loc::gettext("TO UNLOCK:"), tr, tg, tb); font::print(PR_CEN, -1, 75, loc::gettext("Complete the game"), tr, tg, tb); font::print(PR_CEN, -1, 87, loc::gettext("Find eighteen trinkets"), tr, tg, tb); } break; } if (unlocked) { if (game.besttimes[id_trial] == -1) { font::print_wrap(PR_CEN, -1, 75, loc::gettext("Not yet attempted"), tr, tg, tb); } else { int sp = SDL_max(10, font::height(0)); font::print(PR_RTL_XFLIP, 32, 65, loc::gettext("RECORDS"), tr, tg, tb); const char* label = loc::gettext("TIME"); int label_len = font::len(0, label); font::print(PR_RTL_XFLIP, 32, 65+sp, label, tr, tg, tb); label = loc::gettext("SHINY"); label_len = SDL_max(label_len, font::len(0, label)); font::print(PR_RTL_XFLIP, 32, 65+sp*2, label, tr, tg, tb); label = loc::gettext("LIVES"); label_len = SDL_max(label_len, font::len(0, label)); font::print(PR_RTL_XFLIP, 32, 65+sp*3, label, tr, tg, tb); char buffer[SCREEN_WIDTH_CHARS + 1]; help.format_time(buffer, sizeof(buffer), game.besttimes[id_trial], game.bestframes[id_trial], true); font::print(PR_RTL_XFLIP, label_len+48, 65+sp, buffer, tr, tg, tb); vformat_buf( buffer, sizeof(buffer), loc::gettext("{n_trinkets}/{max_trinkets}"), "n_trinkets:int, max_trinkets:int", game.besttrinkets[id_trial], max_trinkets ); font::print(PR_RTL_XFLIP, label_len+48, 65+sp*2, buffer, tr, tg, tb); font::print(PR_RTL_XFLIP, label_len+48, 65+sp*3, help.String(game.bestlives[id_trial]), tr, tg, tb); const char* str_par_time = loc::gettext("PAR TIME"); const std::string par_time = game.timetstring(par); const char* str_best_rank = loc::gettext("BEST RANK"); const char* rank; switch(game.bestrank[id_trial]) { case 0: rank = loc::gettext("B"); break; case 1: rank = loc::gettext("A"); break; case 2: rank = loc::gettext("S"); break; case 3: rank = loc::gettext("V"); break; default: rank = "?"; } int w[4] = { font::len(0, str_par_time), font::len(0, par_time.c_str()), font::len(0, str_best_rank), font::len(PR_2X, rank) }; int longest_w = 0; for (size_t i = 0; i < 4; i++) { if (w[i] > longest_w) { longest_w = w[i]; } } int center_x = 288 - longest_w/2; font::print(PR_CEN | PR_RTL_XFLIP, center_x, 65, str_par_time, tr, tg, tb); font::print(PR_CEN | PR_RTL_XFLIP, center_x, 65+sp, par_time, tr, tg, tb); font::print(PR_CEN | PR_RTL_XFLIP, center_x, 65+sp*3, str_best_rank, tr, tg, tb); font::print( PR_2X | PR_CEN | PR_RTL_XFLIP, center_x, 66+sp*4, rank, 225, 225, 225 ); } } break; } case Menu::gamecompletecontinue: font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, 25, loc::gettext("Congratulations!"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 45, loc::gettext("Your save files have been updated."), tr, tg, tb); font::print_wrap(PR_CEN, -1, 110, loc::gettext("If you want to keep exploring the game, select CONTINUE from the play menu."), tr, tg, tb); break; case Menu::unlockmenu: font::print(PR_2X | PR_CEN, -1, 30, loc::gettext("Unlock Play Modes"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, loc::gettext("From here, you may unlock parts of the game that are normally unlocked as you play."), tr, tg, tb); break; case Menu::unlocktimetrial: font::print(PR_2X | PR_CEN, -1, 45, loc::gettext("Congratulations!"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 125, loc::gettext("You have unlocked a new Time Trial."), tr, tg, tb); break; case Menu::unlocktimetrials: font::print(PR_2X | PR_CEN, -1, 45, loc::gettext("Congratulations!"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 125, loc::gettext("You have unlocked some new Time Trials."), tr, tg, tb); break; case Menu::unlocknodeathmode: font::print(PR_2X | PR_CEN, -1, 45, loc::gettext("Congratulations!"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 125, loc::gettext("You have unlocked No Death Mode."), tr, tg, tb); break; case Menu::unlockflipmode: font::print(PR_2X | PR_CEN, -1, 45, loc::gettext("Congratulations!"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 125, loc::gettext("You have unlocked Flip Mode."), tr, tg, tb); break; case Menu::unlockintermission: font::print(PR_2X | PR_CEN, -1, 45, loc::gettext("Congratulations!"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 125, loc::gettext("You have unlocked the intermission levels."), tr, tg, tb); break; case Menu::playerworlds: if (game.editor_disabled) { if (game.currentmenuoption == 1) { if (SDL_GetHintBoolean("SteamDeck", SDL_FALSE)) { font::print_wrap(PR_CEN, -1, 180, loc::gettext("The level editor is not currently supported on Steam Deck, as it requires a keyboard and mouse to use."), tr, tg, tb); } else { font::print_wrap(PR_CEN, -1, 180, loc::gettext("The level editor is not currently supported on this device, as it requires a keyboard and mouse to use."), tr, tg, tb); } } } else { font::print_wrap(PR_CEN, -1, 180, loc::gettext("To install new player levels, copy the .vvvvvv files to the levels folder."), tr, tg, tb); } break; case Menu::confirmshowlevelspath: font::print_wrap(PR_CEN, -1, 80, loc::gettext("Are you sure you want to show the levels path? This may reveal sensitive information if you are streaming."), tr, tg, tb); break; case Menu::showlevelspath: { int next_y = font::print_wrap(PR_CEN, -1, 40, loc::gettext("The levels path is:"), tr, tg, tb); font::print_wrap(0, 0, next_y, FILESYSTEM_getUserLevelDirectory(), tr, tg, tb, 10, 320); break; } case Menu::errorsavingsettings: font::print_wrap(PR_CEN, -1, 95, loc::gettext("ERROR: Could not save settings file!"), tr, tg, tb); break; case Menu::errorloadinglevel: { const char* message; if (FILESYSTEM_levelDirHasError()) { message = FILESYSTEM_getLevelDirError(); } else { message = loc::gettext("Something went wrong, but we forgot the error message."); } font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, 45, loc::gettext("ERROR"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, message, tr, tg, tb); break; } case Menu::warninglevellist: { const char* message; if (FILESYSTEM_levelDirHasError()) { message = FILESYSTEM_getLevelDirError(); } else { message = loc::gettext("Something went wrong, but we forgot the error message."); } font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, 45, loc::gettext("WARNING"), tr, tg, tb); font::print_wrap(PR_CEN, -1, 65, message, tr, tg, tb); break; } default: break; } } void titlerender(void) { graphics.clear(); if (!game.menustart) { tr = graphics.col_tr; tg = graphics.col_tg; tb = graphics.col_tb; int temp = 50; graphics.draw_sprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); #if defined(MAKEANDPLAY) font::print(PR_RIGHT, 264, temp+35, loc::gettext("MAKE AND PLAY EDITION"), tr, tg, tb); #endif char buffer[SCREEN_WIDTH_CHARS*2 + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("[ Press {button} to Start ]"), "button:but", vformat_button(ActionSet_Menu, Action_Menu_Accept) ); font::print_wrap(PR_CEN, -1, 175, buffer, tr, tg, tb); if (BUTTONGLYPHS_keyboard_is_active()) { font::print_wrap(PR_CEN, -1, 195, loc::gettext("ACTION = Space, Z, or V"), int(tr*0.5f), int(tg*0.5f), int(tb*0.5f)); } } else { if(!game.colourblindmode) graphics.drawtowerbackground(graphics.titlebg); tr = graphics.col_tr; tg = graphics.col_tg; tb = graphics.col_tb; menurender(); 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; graphics.drawmenu(tr, tg, tb, game.currentmenuname); } graphics.drawfade(); graphics.renderwithscreeneffects(); } void gamecompleterender(void) { graphics.clear(); if(!game.colourblindmode) graphics.drawtowerbackground(graphics.titlebg); tr = graphics.col_tr; tg = graphics.col_tg; tb = graphics.col_tb; //rendering starts... here! int position = graphics.lerp(game.oldcreditposition, game.creditposition); if (graphics.onscreen(220 + position)) { int temp = 220 + position; graphics.draw_sprite((160 - 96) + 0 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 1 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 2 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 3 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 4 * 32, temp, 23, tr, tg, tb); graphics.draw_sprite((160 - 96) + 5 * 32, temp, 23, tr, tg, tb); } if (graphics.onscreen(290 + position)) font::print(PR_2X | PR_CEN, -1, 290 + position, loc::gettext("Starring"), tr, tg, tb); if (graphics.onscreen(320 + position)) { graphics.drawcrewman(70, 320 + position, 0, true); font::print(0, 100, 330 + position, loc::gettext("Captain Viridian"), tr, tg, tb); } if (graphics.onscreen(350 + position)) { graphics.drawcrewman(70, 350 + position, 1, true); font::print(0, 100, 360 + position, loc::gettext("Doctor Violet"), tr, tg, tb); } if (graphics.onscreen(380 + position)) { graphics.drawcrewman(70, 380 + position, 2, true); font::print(0, 100, 390 + position, loc::gettext("Professor Vitellary"), tr, tg, tb); } if (graphics.onscreen(410 + position)) { graphics.drawcrewman(70, 410 + position, 3, true); font::print(0, 100, 420 + position, loc::gettext("Officer Vermilion"), tr, tg, tb); } if (graphics.onscreen(440 + position)) { graphics.drawcrewman(70, 440 + position, 4, true); font::print(0, 100, 450 + position, loc::gettext("Chief Verdigris"), tr, tg, tb); } if (graphics.onscreen(470 + position)) { graphics.drawcrewman(70, 470 + position, 5, true); font::print(0, 100, 480 + position, loc::gettext("Doctor Victoria"), tr, tg, tb); } if (graphics.onscreen(520 + position)) { uint32_t flag = PR_3X; const char* text = loc::gettext("Credits"); if (font::len(flag, text) > SCREEN_WIDTH_PIXELS) { flag = PR_2X; } font::print(flag | PR_CEN, -1, 520 + position, text, tr, tg, tb); } if (graphics.onscreen(560 + position)) { font::print(PR_CJK_HIGH, 40, 560 + position, loc::gettext("Created by"), tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 570 + position, "Terry Cavanagh", tr, tg, tb); } if (graphics.onscreen(600 + position)) { font::print(PR_CJK_HIGH, 40, 600 + position, loc::gettext("With Music by"), tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 610 + position, "Magnus Pålsson", tr, tg, tb); } if (graphics.onscreen(640 + position)) { font::print(PR_CJK_HIGH, 40, 640 + position, loc::gettext("Rooms Named by"), tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 650 + position, "Bennett Foddy", tr, tg, tb); } if (graphics.onscreen(710 + position)) { font::print(PR_CJK_HIGH, 40, 680 + position, loc::gettext("C++ Port by"), tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 690 + position, "Simon Roth", tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 710 + position, "Ethan Lee", tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 730 + position, "Misa Kai", tr, tg, tb); } if (graphics.onscreen(770 + position)) { font::print(PR_CJK_HIGH, 40, 760 + position, loc::gettext("Beta Testing by"), tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 770 + position, "Sam Kaplan", tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 790 + position, "Pauli Kohberger", tr, tg, tb); } if (graphics.onscreen(820 + position)) { font::print(PR_CJK_HIGH, 40, 820 + position, loc::gettext("Ending Picture by"), tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, 830 + position, "Pauli Kohberger", tr, tg, tb); } int creditOffset = 890; if (graphics.onscreen(creditOffset + position)) { font::print(PR_2X | PR_CJK_HIGH | PR_CEN, -1, creditOffset + position, loc::gettext("Localisation"), tr, tg, tb); } creditOffset += 30; if (graphics.onscreen(creditOffset + position)) { const char* text = loc::gettext("Localisation Project Led by"); int x = SCREEN_WIDTH_PIXELS - font::len(0, text); x = SDL_min(x, 40); font::print(PR_CJK_HIGH, x, creditOffset + position, text, tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Dav999", tr, tg, tb); } creditOffset += 40; if (graphics.onscreen(creditOffset + position)) { const char* text = loc::gettext("Pan-European Font Design by"); int x = SCREEN_WIDTH_PIXELS - font::len(0, text); x = SDL_min(x, 40); font::print(PR_CJK_HIGH, x, creditOffset + position, text, tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Reese Rivers", tr, tg, tb); } creditOffset += 40; if (graphics.onscreen(creditOffset + position)) { const char* text = loc::gettext("With contributions on GitHub from"); int x = SCREEN_WIDTH_PIXELS - font::len(0, text); x = SDL_min(x, 40); font::print(PR_CJK_HIGH, x, creditOffset + position, text, tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 10, "Alexandra Fox", tr, tg, tb); font::print(PR_2X | PR_FONT_8X8, 60, creditOffset + position + 30, "mothbeanie", tr, tg, tb); } creditOffset += 100; if (graphics.onscreen(creditOffset + position)) { font::print(PR_2X | PR_CJK_HIGH | PR_CEN, -1, creditOffset + position, loc::gettext("Translators"), tr, tg, tb); } creditOffset += 40; for (size_t i = 0; i < SDL_arraysize(Credits::translators); i += 1) { if (graphics.onscreen(creditOffset + position)) { if (Credits::translators[i][0] == '>') { // Category heading, remove the > character and translate the rest font::print(0, 76, creditOffset + position, loc::gettext(&Credits::translators[i][1]), tr, tg, tb); } else if (Credits::translators[i][0] != ' ') { // Not prefixed with a space, so this line is the name of a language, display its localised string font::print(0, 60, creditOffset + position, loc::gettext(Credits::translators[i]), tr, tg, tb); } else { // Otherwise, this line is the name of a translator, indent it and display with the original 8x8 font always font::print(PR_FONT_8X8, 72, creditOffset + position, Credits::translators[i], tr, tg, tb); } } creditOffset += 12; } creditOffset += 40; if (graphics.onscreen(creditOffset + position)) { font::print(PR_3X | PR_CEN, -1, creditOffset + position, loc::gettext("Patrons"), tr, tg, tb); } creditOffset += 50; for (size_t i = 0; i < SDL_arraysize(Credits::superpatrons); i += 1) { if (graphics.onscreen(creditOffset + position)) { font::print(PR_CEN | PR_FONT_8X8, -1, creditOffset + position, Credits::superpatrons[i], tr, tg, tb); } creditOffset += 10; } creditOffset += 10; if (graphics.onscreen(creditOffset + position)) { font::print(PR_CEN, -1, creditOffset + position, loc::gettext("and"), tr, tg, tb); } creditOffset += 20; for (size_t i = 0; i < SDL_arraysize(Credits::patrons); i += 1) { if (graphics.onscreen(creditOffset + position)) { font::print(PR_CEN | PR_FONT_8X8, -1, creditOffset + position, Credits::patrons[i], tr, tg, tb); } creditOffset += 10; } creditOffset += 20; if (graphics.onscreen(creditOffset + position)) { font::print(PR_2X | PR_CEN, -1, creditOffset + position, loc::gettext("GitHub Contributors"), tr, tg, tb); } creditOffset += 30; for (size_t i = 0; i < SDL_arraysize(Credits::githubfriends); i += 1) { if (graphics.onscreen(creditOffset + position)) { font::print(PR_CEN | PR_FONT_8X8, -1, creditOffset + position, Credits::githubfriends[i], tr, tg, tb); } creditOffset += 10; } creditOffset += 140; if (graphics.onscreen(creditOffset + position)) { const char* line1; const char* line2; if (graphics.flipmode) { line1 = loc::gettext("playing!"); line2 = loc::gettext("Thanks for"); } else { line1 = loc::gettext("Thanks for"); line2 = loc::gettext("playing!"); } font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, creditOffset + position, line1, tr, tg, tb); creditOffset += 20; font::print(PR_2X | PR_CEN | PR_CJK_LOW, -1, creditOffset + position, line2, tr, tg, tb); } draw_skip_message(); graphics.drawfade(); graphics.render(); } void gamecompleterender2(void) { graphics.clear(); graphics.drawimage(IMAGE_ENDING, 0, 0); for (int j = 0; j < 30; j++) { for (int i = 0; i < 40; i++) { if (j == game.creditposy) { if (i > game.creditposx) { graphics.fill_rect(i * 8, j * 8, 8, 8, 0, 0, 0); } } if (j > game.creditposy) { graphics.fill_rect(i * 8, j * 8, 8, 8, 0, 0, 0); } } } graphics.fill_rect(graphics.lerp(game.oldcreditposx * 8, game.creditposx * 8) + 8, game.creditposy * 8, 8, 8, 0, 0, 0); draw_skip_message(); graphics.drawfade(); graphics.render(); } static const char* interact_prompt( char* buffer, const size_t buffer_size, const char* raw ) { vformat_buf( buffer, buffer_size, raw, "button:but", vformat_button(ActionSet_InGame, Action_InGame_Interact) ); return buffer; } static void mode_indicator_text(const int alpha) { const uint32_t flags = PR_BRIGHTNESS(alpha) | PR_BOR | PR_RTL_XFLIP; const int r = 220 - help.glow; const int g = 220 - help.glow; const int b = 255 - help.glow/2; const int x = 5; const int spacing = font::height(flags) + 2; int y = 5; if (game.advancetext) { /* Prevent clashing */ y = 20; } if ((game.act_fade > 5 || game.prev_act_fade > 5) && game.activity_y < 60) { /* Prevent clashing */ y = game.activity_y + 37; } /* FIXME: Some strings have not yet been translated. In order to not have * English text in other languages, they are substituted with existing * ones. Remove all substitute text when they're fully translated. */ if (map.invincibility) { const char* english = "Invincibility mode enabled"; const char* text = loc::gettext(english); if (loc::lang != "en" && SDL_strcmp(english, text) == 0) { /* Substitute text */ text = loc::gettext("Invincibility"); } font::print(flags, x, y, text, r, g, b); y += spacing; } enum GlitchrunnerMode mode = GlitchrunnerMode_get(); if (mode != GlitchrunnerNone) { char buffer[SCREEN_WIDTH_CHARS + 1]; const char* english = "Glitchrunner mode enabled ({version})"; const char* text = loc::gettext(english); if (loc::lang != "en" && SDL_strcmp(english, text) == 0) { /* Substitute text */ SDL_strlcpy(buffer, loc::gettext("Glitchrunner Mode"), sizeof(buffer)); } else { const char* mode_string = loc::gettext(GlitchrunnerMode_enum_to_string(mode)); vformat_buf(buffer, sizeof(buffer), text, "version:str", mode_string); } font::print(flags, x, y, buffer, r, g, b); y += spacing; } if (graphics.flipmode) { const char* english = "Flip Mode enabled"; const char* text = loc::gettext(english); if (loc::lang != "en" && SDL_strcmp(english, text) == 0) { /* Substitute text */ text = loc::gettext("Flip Mode"); } font::print(flags, x, y, text, r, g, b); y += spacing; } switch (game.slowdown) { case 24: font::print(flags, x, y, loc::gettext("Game speed is at 80%"), r, g, b); y += spacing; break; case 18: font::print(flags, x, y, loc::gettext("Game speed is at 60%"), r, g, b); y += spacing; break; case 12: font::print(flags, x, y, loc::gettext("Game speed is at 40%"), r, g, b); y += spacing; } } void gamerender(void) { graphics.set_render_target(graphics.gameplayTexture); graphics.set_color(0, 0, 0, 255); if(!game.blackout) { if (map.towermode) { if (!game.colourblindmode) { graphics.drawtowerbackground(graphics.towerbg); } else { graphics.clear(); } graphics.drawtowermap(); } else { if(!game.colourblindmode) { graphics.drawbackground(map.background); } else { graphics.clear(); } if ((map.finalmode || map.custommode) && map.final_colormode) { graphics.drawfinalmap(); } else { graphics.drawmap(); } } graphics.drawentities(); if (map.towermode) { graphics.drawtowerspikes(); } } int return_editor_alpha = 0; bool draw_return_editor_text = false; if (map.custommode && !map.custommodeforreal && !game.advancetext) { return_editor_alpha = graphics.lerp( ed.old_return_message_timer, ed.return_message_timer ); draw_return_editor_text = return_editor_alpha > 100; } int mode_indicator_alpha = graphics.lerp( game.old_mode_indicator_timer, game.mode_indicator_timer ); bool any_mode_active = map.invincibility || GlitchrunnerMode_get() != GlitchrunnerNone || graphics.flipmode || game.slowdown < 30; bool draw_mode_indicator_text = mode_indicator_alpha > 100 && any_mode_active; if (graphics.fademode == FADE_NONE && !game.intimetrial && !game.isingamecompletescreen() && (!game.swnmode || game.swngame != SWN_SUPERGRAVITRON) && game.showingametimer && !roomname_translator::enabled && (!game.swnmode || game.swngame != SWN_START_GRAVITRON_STEP_3) && obj.trophytext <= 0 && obj.oldtrophytext <= 0 && !draw_return_editor_text && !draw_mode_indicator_text) { const char* tempstring = loc::gettext("TIME:"); int label_len = font::len(0, tempstring); font::print(PR_BOR | PR_RTL_XFLIP, 6, 6, tempstring, 255,255,255); char buffer[SCREEN_WIDTH_CHARS + 1]; game.timestringcenti(buffer, sizeof(buffer)); font::print(PR_BOR | PR_RTL_XFLIP, 6+label_len, 6, buffer, 196,196,196); } bool force_roomname_hidden = false; bool roomname_untranslated = false; int roomname_r = 196, roomname_g = 196, roomname_b = 255 - help.glow; if (roomname_translator::enabled) { roomname_translator::overlay_render( &force_roomname_hidden, &roomname_untranslated, &roomname_r, &roomname_g, &roomname_b ); } if ((map.extrarow==0 || (map.custommode && map.roomname[0] != '\0')) && !force_roomname_hidden) { const char* roomname = loc::gettext_roomname(map.custommode, game.roomx, game.roomy, map.roomname, map.roomname_special); graphics.render_roomname( roomname_untranslated ? PR_FONT_8X8 : PR_FONT_LEVEL, roomname, roomname_r, roomname_g, roomname_b ); } if (map.roomtexton) { //Draw room text! for (size_t i = 0; i < map.roomtext.size(); i++) { graphics.print_roomtext(map.roomtext[i].x*8, map.roomtext[i].y*8, map.roomtext[i].text, map.roomtext[i].rtl); } } if (draw_return_editor_text) { char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("[Press {button} to return to editor]"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_Map) ); font::print( PR_BRIGHTNESS(return_editor_alpha) | PR_BOR, 5, 5, buffer, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2) ); } graphics.cutscenebars(); graphics.drawfade(); graphics.drawgui(); if (draw_mode_indicator_text && !draw_return_editor_text) { mode_indicator_text(mode_indicator_alpha); } graphics.set_render_target(graphics.gameTexture); graphics.copy_texture(graphics.gameplayTexture, NULL, NULL); if (game.advancetext) { char buffer_adv[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer_adv, sizeof(buffer_adv), loc::gettext("- Press {button} to advance text -"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_ACTION) ); font::print(PR_CEN | PR_BOR, -1, graphics.flipmode ? 228 : 5, buffer_adv, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } if (game.readytotele > 100 || game.oldreadytotele > 100) { char buffer[SCREEN_WIDTH_CHARS + 1]; const char* final_string = interact_prompt( buffer, sizeof(buffer), loc::gettext("- Press {button} to Teleport -") ); int alpha = graphics.lerp(game.oldreadytotele, game.readytotele); font::print( PR_BRIGHTNESS(alpha) | PR_CEN | PR_BOR, -1, graphics.flipmode ? 20 : 210, final_string, 235 - (help.glow / 2), 235 - (help.glow / 2), 255 ); } if (game.swnmode) { if (game.swngame == SWN_GRAVITRON) { std::string tempstring = help.timestring(game.swntimer); font::print(PR_2X | PR_CEN | PR_BOR, -1, 20, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } else if (game.swngame == SWN_SUPERGRAVITRON) { if (game.swnmessage == 0) { std::string tempstring = help.timestring(game.swntimer); font::print(PR_BOR, 10, 10, loc::gettext("Current Time"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_FONT_8X8, 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); tempstring = help.timestring(game.swnrecord); font::print(PR_BOR | PR_RIGHT, 320-8, 10, loc::gettext("Best Time"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_FONT_8X8 | PR_RIGHT, 300, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); switch(game.swnbestrank) { case 0: font::print_wrap(PR_CEN, -1, 204, loc::gettext("Next Trophy at 5 seconds"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); break; case 1: font::print_wrap(PR_CEN, -1, 204, loc::gettext("Next Trophy at 10 seconds"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); break; case 2: font::print_wrap(PR_CEN, -1, 204, loc::gettext("Next Trophy at 15 seconds"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); break; case 3: font::print_wrap(PR_CEN, -1, 204, loc::gettext("Next Trophy at 20 seconds"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); break; case 4: font::print_wrap(PR_CEN, -1, 204, loc::gettext("Next Trophy at 30 seconds"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); break; case 5: font::print_wrap(PR_CEN, -1, 204, loc::gettext("Next Trophy at 1 minute"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); break; case 6: font::print_wrap(PR_CEN, -1, 204, loc::gettext("All Trophies collected!"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); break; } } else if (game.swnmessage == 1) { std::string tempstring = help.timestring(game.swntimer); font::print(PR_BOR, 10, 10, loc::gettext("Current Time"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_FONT_8X8, 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); tempstring = help.timestring(game.swnrecord); if (int(game.deathseq / 5) % 2 == 1) { font::print(PR_BOR | PR_RIGHT, 320-8, 10, loc::gettext("Best Time"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_FONT_8X8 | PR_RIGHT, 300, 24, tempstring, 128 - (help.glow), 220 - (help.glow), 128 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_CEN, -1, 200, loc::gettext("New Record!"), 128 - (help.glow), 220 - (help.glow), 128 - (help.glow / 2)); } } else if (game.swnmessage >= 2) { game.swnmessage--; if (game.swnmessage == 2) game.swnmessage = 0; std::string tempstring = help.timestring(game.swntimer); font::print(PR_BOR, 10, 10, loc::gettext("Current Time"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_FONT_8X8, 25, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); tempstring = help.timestring(game.swnrecord); font::print(PR_BOR | PR_RIGHT, 320-8, 10, loc::gettext("Best Time"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_FONT_8X8 | PR_RIGHT, 300, 24, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); if (int(game.swnmessage / 5) % 2 == 1) { font::print(PR_2X | PR_BOR | PR_CEN, -1, 200, loc::gettext("New Trophy!"), 220 - (help.glow), 128 - (help.glow), 128 - (help.glow / 2)); } } char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("[Press {button} to stop]"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_Map) ); font::print(PR_BOR | PR_CEN, -1, 228, buffer, 160 - (help.glow/2), 160 - (help.glow/2), 160 - (help.glow/2)); } else if (game.swngame == SWN_START_GRAVITRON_STEP_3) { if (int(game.swndelay / 15) % 2 == 1 || game.swndelay >= 120) { int y1; int y2; if (graphics.flipmode) { y1 = 30; y2 = 10; } else { y1 = 10; y2 = 30; } font::print(PR_2X | PR_CEN | PR_BOR | PR_CJK_HIGH, -1, y1, loc::gettext("Survive for"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_CEN | PR_BOR, -1, y2, loc::gettext("60 seconds!"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } } else if (game.swngame == SWN_START_SUPERGRAVITRON_STEP_2) { if (game.swndelay >= 60) { font::print(PR_2X | PR_BOR | PR_CEN, -1, 20, loc::gettext("SUPER GRAVITRON"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); std::string tempstring = help.timestring(game.swnrecord); font::print(PR_BOR | PR_CEN, -1, 190, loc::gettext("Best Time"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_2X | PR_BOR | PR_CEN | PR_CJK_LOW, -1, 205, tempstring, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } else if (int(game.swndelay / 10) % 2 == 1) { font::print(PR_2X | PR_BOR | PR_CEN, -1, 20, loc::gettext("SUPER GRAVITRON"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_3X | PR_BOR | PR_CEN, -1, 200, loc::gettext("GO!"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } } } if (game.intimetrial && graphics.fademode == FADE_NONE) { //Draw countdown! if (game.timetrialcountdown > 0) { if (game.timetrialcountdown < 30) { if (int(game.timetrialcountdown / 4) % 2 == 0) { font::print(PR_4X | PR_CEN | PR_BOR, -1, 100, loc::gettext("Go!"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } } else if (game.timetrialcountdown < 60) { font::print(PR_4X | PR_CEN | PR_BOR, -1, 100, "1", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } else if (game.timetrialcountdown < 90) { font::print(PR_4X | PR_CEN | PR_BOR, -1, 100, "2", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } else if (game.timetrialcountdown < 120) { font::print(PR_4X | PR_CEN | PR_BOR, -1, 100, "3", 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } } else if (!roomname_translator::is_pausing() && !game.translator_exploring) { char buffer[SCREEN_WIDTH_CHARS + 1]; game.timestringcenti(buffer, sizeof(buffer)); //Draw OSD stuff const char* tempstring = loc::gettext("TIME:"); int label_len = font::len(0, tempstring); font::print(PR_BOR | PR_RTL_XFLIP, 6, 18, tempstring, 255,255,255); tempstring = loc::gettext("DEATH:"); label_len = SDL_max(label_len, font::len(0, tempstring)); font::print(PR_BOR | PR_RTL_XFLIP, 6, 30, tempstring, 255,255,255); tempstring = loc::gettext("SHINY:"); label_len = SDL_max(label_len, font::len(0, tempstring)); font::print(PR_BOR | PR_RTL_XFLIP, 6, 42, tempstring, 255,255,255); if(game.timetrialparlost) { font::print(PR_BOR | PR_RTL_XFLIP, 8+label_len, 18, buffer, 196, 80, 80); } else { font::print(PR_BOR | PR_RTL_XFLIP, 8+label_len, 18, buffer, 196, 196, 196); } if(game.deathcounts>0) { font::print(PR_BOR | PR_RTL_XFLIP, 8+label_len, 30,help.String(game.deathcounts), 196, 80, 80); } else { font::print(PR_BOR | PR_RTL_XFLIP, 8+label_len, 30,help.String(game.deathcounts), 196, 196, 196); } vformat_buf( buffer, sizeof(buffer), loc::gettext("{n_trinkets} of {max_trinkets}"), "n_trinkets:int, max_trinkets:int", game.trinkets(), game.timetrialshinytarget ); if(game.trinkets()5 || game.prev_act_fade>5) { const char* prompt = game.activity_lastprompt.c_str(); if (game.activity_gettext) { prompt = loc::gettext(prompt); } char buffer[SCREEN_WIDTH_CHARS + 1]; const char* final_string = interact_prompt( buffer, sizeof(buffer), prompt ); uint8_t text_r, text_g, text_b; uint32_t text_flags = (game.activity_gettext ? PR_FONT_INTERFACE : PR_FONT_LEVEL) | PR_BRIGHTNESS(act_alpha*255) | PR_CJK_LOW | PR_CEN; if (game.activity_r == 0 && game.activity_g == 0 && game.activity_b == 0) { text_r = 196; text_g = 196; text_b = 255 - help.glow; } else { short lines; font::string_wordwrap(text_flags, final_string, 37*8, &lines); graphics.drawpixeltextbox( 4, game.activity_y + 4, 39*8, 16 + font::height(text_flags)*lines, game.activity_r*act_alpha, game.activity_g*act_alpha, game.activity_b*act_alpha ); text_r = game.activity_r; text_g = game.activity_g; text_b = game.activity_b; } font::print_wrap( text_flags, -1, game.activity_y + 12, final_string, text_r, text_g, text_b, 8, 37*8 ); } if (obj.trophytext > 0 || obj.oldtrophytext > 0) { graphics.drawtrophytext(); } level_debugger::render(); graphics.renderwithscreeneffects(); } static void draw_roomname_menu(void) { const char* name; if (map.hiddenname[0] != '\0') { name = loc::gettext_roomname_special(map.hiddenname); } else { name = loc::gettext_roomname(map.custommode, game.roomx, game.roomy, map.roomname, map.roomname_special); } font::print(PR_FONT_LEVEL | PR_CEN, -1, 2, name, 196, 196, 255 - help.glow); } /* Used to keep some graphics positions on the map screen * the same in Flip Mode. */ #define FLIP(y, h) (graphics.flipmode ? 220 - (y) - (h) : (y)) #define FLIP_PR_CJK_LOW (graphics.flipmode ? PR_CJK_HIGH : PR_CJK_LOW) #define FLIP_PR_CJK_HIGH (graphics.flipmode ? PR_CJK_LOW : PR_CJK_HIGH) static void rendermap(void) { if (map.custommode && map.customshowmm) { const MapRenderData data = map.get_render_data(); graphics.drawpixeltextbox(35 + data.xoff, 16 + data.yoff, data.pixelsx + 10, data.pixelsy + 10, 65, 185, 207); if (graphics.customminimaps[map.currentregion] != NULL) { graphics.draw_region_image(map.currentregion, 40 + data.xoff, 21 + data.yoff, data.pixelsx, data.pixelsy); } else if (map.currentregion == 0 && graphics.minimap_mounted) { graphics.drawpartimage(IMAGE_MINIMAP, 40 + data.xoff, 21 + data.yoff, data.pixelsx, data.pixelsy); } else { graphics.drawpartimage(IMAGE_CUSTOMMINIMAP, 40 + data.xoff, 21 + data.yoff, data.pixelsx, data.pixelsy); } return; } graphics.drawpixeltextbox(35, 16, 250, 190, 65, 185, 207); graphics.drawimage(IMAGE_MINIMAP, 40, 21, false); } static void rendermapfog(void) { const MapRenderData data = map.get_render_data(); for (int j = data.starty; j < data.starty + data.height; j++) { for (int i = data.startx; i < data.startx + data.width; i++) { if (!map.isexplored(i, j)) { // Draw the fog, depending on the custom zoom size for (int x = 0; x < data.zoom; x++) { for (int y = 0; y < data.zoom; y++) { graphics.drawimage(IMAGE_COVERED, data.xoff + 40 + (x * 12) + ((i - data.startx) * (12 * data.zoom)), data.yoff + 21 + (y * 9) + ((j - data.starty) * (9 * data.zoom)), false); } } } } } } static void rendermaplegend(void) { // Draw the map legend, aka teleports/targets/trinkets const MapRenderData data = map.get_render_data(); for (size_t i = 0; i < map.teleporters.size(); i++) { int x = map.teleporters[i].x - data.startx; int y = map.teleporters[i].y - data.starty; if (x >= 0 && y >= 0 && x < data.width && y < data.height) { if (map.showteleporters && map.isexplored(x + data.startx, y + data.starty)) { font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + (x * 12 * data.zoom), data.legendyoff + (y * 9 * data.zoom), "💿", 171, 255, 252); } else if (map.showtargets && !map.isexplored(x + data.startx, y + data.starty)) { font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + (x * 12 * data.zoom), data.legendyoff + (y * 9 * data.zoom), "❓", 64, 64, 64); } } } if (map.showtrinkets) { for (size_t i = 0; i < map.shinytrinkets.size(); i++) { if (!obj.collect[i]) { int x = map.shinytrinkets[i].x - data.startx; int y = map.shinytrinkets[i].y - data.starty; if (x >= 0 && y >= 0 && x < data.width && y < data.height) { font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + (x * 12 * data.zoom), data.legendyoff + (y * 9 * data.zoom), "🪙", 254, 252, 58); } } } } } static void rendermapcursor(const bool flashing) { const MapRenderData data = map.get_render_data(); int room_x = game.roomx - data.startx - 100; int room_y = game.roomy - data.starty - 100; int pixels_x = room_x * 12; int pixels_y = room_y * 9; if (!map.custommode && game.roomx == 109) { // Draw the tower specially if (!flashing || game.noflashingmode) { graphics.draw_rect(40 + pixels_x + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow * 2), 245 - (help.glow * 2)); } else if (map.cursorstate == 1) { if (int(map.cursordelay / 4) % 2 == 0) { graphics.draw_rect(40 + pixels_x, 21, 12, 180, 255, 255, 255); graphics.draw_rect(40 + pixels_x + 2, 21 + 2, 12 - 4, 180 - 4, 255, 255, 255); } } else if (map.cursorstate == 2 && (int(map.cursordelay / 15) % 2 == 0)) { graphics.draw_rect(40 + pixels_x + 2, 21 + 2, 12 - 4, 180 - 4, 16, 245 - (help.glow), 245 - (help.glow)); } return; } if (room_x >= 0 && room_y >= 0 && room_x < data.width && room_y < data.height) { if (!flashing || ((map.cursorstate == 2 && int(map.cursordelay / 15) % 2 == 0) || game.noflashingmode)) { graphics.draw_rect(40 + (pixels_x * data.zoom) + 2 + data.xoff, 21 + (pixels_y * data.zoom) + 2 + data.yoff, (12 * data.zoom) - 4, (9 * data.zoom) - 4, 16, 245 - (help.glow), 245 - (help.glow)); } else if (map.cursorstate == 1 && int(map.cursordelay / 4) % 2 == 0) { graphics.draw_rect(40 + (pixels_x * data.zoom) + data.xoff, 21 + (pixels_y * data.zoom) + data.yoff, 12 * data.zoom, 9 * data.zoom, 255, 255, 255); graphics.draw_rect(40 + (pixels_x * data.zoom) + 2 + data.xoff, 21 + (pixels_y * data.zoom) + 2 + data.yoff, (12 * data.zoom) - 4, (9 * data.zoom) - 4, 255, 255, 255); } } } void maprender(void) { graphics.set_render_target(graphics.menuTexture); graphics.clear(); draw_roomname_menu(); //Background color graphics.fill_rect(0, 12, 320, 240, 10, 24, 26 ); //Menubar: graphics.drawpixeltextbox( -10, 212, 43*8, 16 + font::height(PR_FONT_INTERFACE), 65, 185, 207); // Draw the selected page name at the bottom // menupage 0 - 3 is the pause screen if (script.running && game.menupage == 3) { // While in a cutscene, you can only save char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select_tight.c_str(), "label:str", loc::gettext("SAVE")); font::print(PR_CEN | PR_CJK_LOW, -1, 220, buffer, 196, 196, 255 - help.glow); } else if (game.menupage <= 3) { const char* tab1; if (game.insecretlab) { tab1 = loc::gettext("GRAV"); } else if (obj.flags[67] && !map.custommode) { tab1 = loc::gettext("SHIP"); } else { tab1 = loc::gettext("CREW"); } #define TAB(opt, text) graphics.map_tab(opt, text, game.menupage == opt) TAB(0, loc::gettext("MAP")); TAB(1, tab1); TAB(2, loc::gettext("STATS")); TAB(3, loc::gettext("SAVE")); #undef TAB } // Draw menu header switch (game.menupage) { case 30: case 31: case 32: case 33: font::print(PR_CEN | PR_CJK_LOW, -1, 220, loc::gettext("[ PAUSE ]"), 196, 196, 255 - help.glow); } // Draw menu options if (game.menupage >= 30 && game.menupage <= 33) { #define OPTION(opt, text) graphics.map_option(opt, 4, text, game.menupage - 30 == opt) OPTION(0, loc::gettext("return to game")); OPTION(1, loc::gettext("options")); OPTION(2, loc::gettext("quit to menu")); #undef OPTION } /* FIXME: about the code below where this is used (case 10/11/20/21)... I've seen better code. * We should rewrite it to use graphics::map_option, but until then... */ int selection_offset; { char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select.c_str(), "label:str", ""); selection_offset = font::len(0, buffer) / 2; } // Draw the actual menu switch(game.menupage) { case 0: rendermap(); if (map.finalmode || (map.custommode&&!map.customshowmm)) { // Cover the whole map for (int j = 0; j < 20; j++) { for (int i = 0; i < 20; i++) { graphics.drawimage(IMAGE_COVERED, 40 + (i * 12), 21 + (j * 9), false); } } font::print(PR_CEN | PR_BOR, -1, 105, loc::gettext("NO SIGNAL"), 245, 245, 245); } else { rendermapfog(); rendermapcursor(true); rendermaplegend(); } break; case 1: if (game.insecretlab) { if (graphics.flipmode) { font::print_wrap(PR_CEN, -1, 174, loc::gettext("SUPER GRAVITRON HIGHSCORE"), 196, 196, 255 - help.glow); std::string tempstring = help.timestring(game.swnrecord); font::print(PR_CEN, -1, 124, loc::gettext("Best Time"), 196, 196, 255 - help.glow); font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, 102, tempstring, 196, 196, 255 - help.glow); switch(game.swnbestrank) { case 0: font::print_wrap(PR_CEN, -1, 40, loc::gettext("Next Trophy at 5 seconds"), 196, 196, 255 - help.glow); break; case 1: font::print_wrap(PR_CEN, -1, 40, loc::gettext("Next Trophy at 10 seconds"), 196, 196, 255 - help.glow); break; case 2: font::print_wrap(PR_CEN, -1, 40, loc::gettext("Next Trophy at 15 seconds"), 196, 196, 255 - help.glow); break; case 3: font::print_wrap(PR_CEN, -1, 40, loc::gettext("Next Trophy at 20 seconds"), 196, 196, 255 - help.glow); break; case 4: font::print_wrap(PR_CEN, -1, 40, loc::gettext("Next Trophy at 30 seconds"), 196, 196, 255 - help.glow); break; case 5: font::print_wrap(PR_CEN, -1, 40, loc::gettext("Next Trophy at 1 minute"), 196, 196, 255 - help.glow); break; case 6: font::print_wrap(PR_CEN, -1, 40, loc::gettext("All Trophies collected!"), 196, 196, 255 - help.glow); break; } } else { font::print_wrap(PR_CEN, -1, 40, loc::gettext("SUPER GRAVITRON HIGHSCORE"), 196, 196, 255 - help.glow); std::string tempstring = help.timestring(game.swnrecord); font::print(PR_CEN, -1, 90, loc::gettext("Best Time"), 196, 196, 255 - help.glow); font::print(PR_2X | PR_CEN | PR_CJK_LOW, -1, 104, tempstring, 196, 196, 255 - help.glow); switch(game.swnbestrank) { case 0: font::print_wrap(PR_CEN, -1, 174, loc::gettext("Next Trophy at 5 seconds"), 196, 196, 255 - help.glow); break; case 1: font::print_wrap(PR_CEN, -1, 174, loc::gettext("Next Trophy at 10 seconds"), 196, 196, 255 - help.glow); break; case 2: font::print_wrap(PR_CEN, -1, 174, loc::gettext("Next Trophy at 15 seconds"), 196, 196, 255 - help.glow); break; case 3: font::print_wrap(PR_CEN, -1, 174, loc::gettext("Next Trophy at 20 seconds"), 196, 196, 255 - help.glow); break; case 4: font::print_wrap(PR_CEN, -1, 174, loc::gettext("Next Trophy at 30 seconds"), 196, 196, 255 - help.glow); break; case 5: font::print_wrap(PR_CEN, -1, 174, loc::gettext("Next Trophy at 1 minute"), 196, 196, 255 - help.glow); break; case 6: font::print_wrap(PR_CEN, -1, 174, loc::gettext("All Trophies collected!"), 196, 196, 255 - help.glow); break; } } } else if (obj.flags[67] && !map.custommode) { char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("Press {button} to warp to the ship."), "button:but", vformat_button(ActionSet_InGame, Action_InGame_ACTION) ); font::print_wrap(PR_CEN, -1, 105, buffer, 196, 196, 255 - help.glow); } else if(map.custommode){ LevelMetaData& meta = cl.ListOfMetaData[game.playcustomlevel]; uint32_t title_flags = meta.title_is_gettext ? PR_FONT_INTERFACE : PR_FONT_LEVEL; uint32_t creator_flags = meta.creator_is_gettext ? PR_FONT_INTERFACE : PR_FONT_LEVEL; font::print(title_flags | PR_2X | PR_CEN, -1, FLIP(45, 8), meta.title, 196, 196, 255 - help.glow); int sp = SDL_max(10, font::height(PR_FONT_LEVEL)); int desc_pos = (cl.numcrewmates() > 0) ? 70 : 70 + (sp*2); graphics.print_level_creator(creator_flags, FLIP(70, 8), meta.creator, 196, 196, 255 - help.glow); font::print(PR_FONT_LEVEL | PR_CEN, -1, FLIP(70 + sp, 8), meta.website, 196, 196, 255 - help.glow); font::print(PR_FONT_LEVEL | PR_CEN, -1, FLIP(desc_pos + sp*3, 8), meta.Desc1, 196, 196, 255 - help.glow); font::print(PR_FONT_LEVEL | PR_CEN, -1, FLIP(desc_pos + sp*4, 8), meta.Desc2, 196, 196, 255 - help.glow); if (sp <= 10) { font::print(PR_FONT_LEVEL | PR_CEN, -1, FLIP(desc_pos + sp*5, 8), meta.Desc3, 196, 196, 255 - help.glow); } if (cl.numcrewmates() > 0) { int remaining = cl.numcrewmates() - game.crewmates(); char buffer[SCREEN_WIDTH_CHARS + 1]; loc::gettext_plural_fill( buffer, sizeof(buffer), "{n_crew|wordy} crewmates remain", "{n_crew|wordy} crewmate remains", "n_crew:int", remaining ); font::print_wrap(PR_CEN, -1, FLIP(165, 8), buffer, 196, 196, 255 - help.glow); } } else { if (graphics.flipmode) { for (int i = 0; i < 3; i++) { graphics.drawcrewman(16, 32 + (i * 64), 2-i, game.crewstats[2-i]); if (game.crewstats[(2-i)]) { graphics.printcrewname(44, 32 + (i * 64)+4+10, 2-i); } else { graphics.printcrewnamedark(44, 32 + (i * 64)+4+10, 2-i); } graphics.printcrewnamestatus(44, 32 + (i * 64)+4, 2-i, game.crewstats[(2-i)]); graphics.drawcrewman(16+160, 32 + (i * 64), (2-i)+3, game.crewstats[(2-i)+3]); if (game.crewstats[(2-i)+3]) { graphics.printcrewname(44+160, 32 + (i * 64)+4+10, (2-i)+3); } else { graphics.printcrewnamedark(44+160, 32 + (i * 64)+4+10, (2-i)+3); } graphics.printcrewnamestatus(44+160, 32 + (i * 64)+4, (2-i)+3, game.crewstats[(2-i)+3]); } } else { for (int i = 0; i < 3; i++) { graphics.drawcrewman(16, 32 + (i * 64), i, game.crewstats[i]); if (game.crewstats[i]) { graphics.printcrewname(44, 32 + (i * 64)+4, i); } else { graphics.printcrewnamedark(44, 32 + (i * 64)+4, i); } graphics.printcrewnamestatus(44, 32 + (i * 64)+4+10, i, game.crewstats[i]); graphics.drawcrewman(16+160, 32 + (i * 64), i+3, game.crewstats[i+3]); if (game.crewstats[i+3]) { graphics.printcrewname(44+160, 32 + (i * 64)+4, i+3); } else { graphics.printcrewnamedark(44+160, 32 + (i * 64)+4, i+3); } graphics.printcrewnamestatus(44+160, 32 + (i * 64)+4+10, i+3, game.crewstats[i+3]); } } } break; case 2: { int max_trinkets; if (map.custommode) { max_trinkets = cl.numtrinkets(); } else { max_trinkets = 20; } /* Stats. */ // Always show trinkets if you're in the main game, otherwise only show them if any exist in the level bool show_trinkets = map.custommode ? (cl.numtrinkets() > 0) : true; int deaths_pos = show_trinkets ? 102 : 72; int time_pos = show_trinkets ? 152 : 132; if (show_trinkets) { font::print(PR_CEN | FLIP_PR_CJK_HIGH, -1, FLIP(52, 8), loc::gettext("[Trinkets found]"), 196, 196, 255 - help.glow); char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("{n_trinkets|wordy} out of {max_trinkets|wordy}"), "n_trinkets:int, max_trinkets:int", game.trinkets(), max_trinkets ); font::print(PR_CEN | FLIP_PR_CJK_LOW, -1, FLIP(64, 8), buffer, 96, 96, 96); } font::print(PR_CEN | FLIP_PR_CJK_HIGH, -1, FLIP(deaths_pos, 8), loc::gettext("[Number of Deaths]"), 196, 196, 255 - help.glow); font::print(PR_CEN | FLIP_PR_CJK_LOW, -1, FLIP(deaths_pos + 12, 8), help.String(game.deathcounts), 96, 96, 96); font::print(PR_CEN | FLIP_PR_CJK_HIGH, -1, FLIP(time_pos, 8), loc::gettext("[Time Taken]"), 196, 196, 255 - help.glow); font::print(PR_CEN | FLIP_PR_CJK_LOW, -1, FLIP(time_pos + 12, 8), game.timestring(), 96, 96, 96); break; } case 3: { if (game.inintermission || game.translator_exploring) { font::print_wrap(PR_CEN, -1, 115, loc::gettext("Cannot Save in Level Replay"), 146, 146, 180); break; } if (game.nodeathmode) { font::print_wrap(PR_CEN, -1, 115, loc::gettext("Cannot Save in No Death Mode"), 146, 146, 180); break; } if (game.intimetrial) { font::print_wrap(PR_CEN, -1, 115, loc::gettext("How'd you get here?"), 146, 146, 180); break; } if (game.insecretlab) { font::print_wrap(PR_CEN, -1, 115, loc::gettext("Cannot Save in Secret Lab"), 146, 146, 180); break; } if (game.gamesavefailed) { font::print_wrap(PR_CEN, -1, 115, loc::gettext("ERROR: Could not save game!"), 146, 146, 180); break; } /* We are not in a special case, so draw the save screen now... */ if (!map.custommode) { /* FIXME: The text here should be automatically "balance-wrapped" instead of hardcoding the width. * In fact, maybe print_wrap should balance-wrap by default. */ font::print_wrap(PR_CEN, -1, 174, loc::gettext("(Note: The game is autosaved at every teleporter.)"), 146, 146, 180, 12); } if (!game.gamesaved) { char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer, sizeof(buffer), loc::gettext("[Press {button} to save your game]"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_ACTION) ); font::print(PR_CEN, -1, 80, buffer, 255 - help.glow*2, 255 - help.glow*2, 255 - help.glow); if (map.custommode || !game.last_quicksave.exists) { break; } font::print(PR_CEN, -1, FLIP(100, 8), loc::gettext("Last Save:"), 164 - help.glow/4, 164 - help.glow/4, 164); struct Game::Summary* last = &game.last_quicksave; vformat_buf( buffer, sizeof(buffer), loc::gettext("{area}, {time}"), "area:str, time:str", loc::gettext_roomname_special(map.currentarea(last->saverx, last->savery)), game.giventimestring(last->hours, last->minutes, last->seconds).c_str() ); font::print(PR_CEN, -1, FLIP(112, 8), buffer, 164 - help.glow/4, 164 - help.glow/4, 164); break; } /* We are only still here if the game has been quicksaved... */ font::print_wrap(PR_CEN, -1, 36, loc::gettext("Game saved ok!"), 255 - help.glow/2, 255 - help.glow/2, 255 - help.glow/2); graphics.drawpixeltextbox(17, 65, 286, 90, 65, 185, 207); if (map.custommode) { font::print(PR_CEN | PR_FONT_LEVEL, -1, FLIP(90, 8), game.customleveltitle, 25, 255 - help.glow/2, 255 - help.glow/2); } else { size_t i; font::print( PR_CEN, -1, FLIP(80, 8), loc::gettext_roomname_special(map.currentarea(game.last_quicksave.saverx, game.last_quicksave.savery)), 25, 255 - help.glow/2, 255 - help.glow/2 ); for (i = 0; i < SDL_arraysize(game.crewstats); ++i) { /* Crewmates are annoying. Their height is 21 pixels, but to flip them, * we also have to account for their 2-pixel y-offset (and multiply it by 2). */ graphics.drawcrewman(169 - 3*42 + i*42, FLIP(95, 21 + 2*2), i, game.crewstats[i], true); } } font::print(0, 59, FLIP(132, 8), game.savetime, 255 - help.glow/2, 255 - help.glow/2, 255 - help.glow/2); char buffer[SCREEN_WIDTH_CHARS + 1]; vformat_buf(buffer, sizeof(buffer), loc::gettext("{savebox_n_trinkets|wordy}"), "savebox_n_trinkets:int", game.savetrinkets ); font::print(PR_RIGHT, 262, FLIP(132, 8), buffer, 255 - help.glow/2, 255 - help.glow/2, 255 - help.glow/2); if (graphics.flipmode) { graphics.draw_flipsprite(34, FLIP(126, 17), 50, graphics.col_clock); graphics.draw_flipsprite(270, FLIP(126, 17), 22, graphics.col_trinket); } else { graphics.draw_sprite(34, FLIP(126, 17), 50, graphics.col_clock); graphics.draw_sprite(270, FLIP(126, 17), 22, graphics.col_trinket); } break; } case 10: font::print(PR_CEN | PR_CJK_LOW, -1, 220, loc::gettext("[ QUIT ]"), 196, 196, 255 - help.glow); if (graphics.flipmode) { if (game.inspecial()) { font::print_wrap(PR_CEN, -1, 135, loc::gettext("Return to main menu?"), 196, 196, 255 - help.glow, 12); } else { font::print_wrap(PR_CEN, -1, 142, loc::gettext("Do you want to quit? You will lose any unsaved progress."), 196, 196, 255 - help.glow, 12); } font::print(PR_RTL_XFLIP, 80-selection_offset, 88, loc::gettext("[ NO, KEEP PLAYING ]"), 196, 196, 255 - help.glow); font::print(PR_RTL_XFLIP, 80 + 32, 76, loc::gettext("yes, quit to menu"), 96, 96, 96); } else { if (game.inspecial()) { font::print_wrap(PR_CEN, -1, 80, loc::gettext("Return to main menu?"), 196, 196, 255 - help.glow, 12); } else { font::print_wrap(PR_CEN, -1, 76, loc::gettext("Do you want to quit? You will lose any unsaved progress."), 196, 196, 255 - help.glow, 12); } font::print(PR_RTL_XFLIP, 80-selection_offset, 130, loc::gettext("[ NO, KEEP PLAYING ]"), 196, 196, 255 - help.glow); font::print(PR_RTL_XFLIP, 80 + 32, 142, loc::gettext("yes, quit to menu"), 96, 96, 96); } break; case 11: font::print(PR_CEN | PR_CJK_LOW, -1, 220, loc::gettext("[ QUIT ]"), 196, 196, 255 - help.glow); if (graphics.flipmode) { if (game.inspecial()) { font::print_wrap(PR_CEN, -1, 135, loc::gettext("Return to main menu?"), 196, 196, 255 - help.glow, 12); } else { font::print_wrap(PR_CEN, -1, 142, loc::gettext("Do you want to quit? You will lose any unsaved progress."), 196, 196, 255 - help.glow, 12); } font::print(PR_RTL_XFLIP, 80, 88, loc::gettext("no, keep playing"), 96,96,96); font::print(PR_RTL_XFLIP, 80+32-selection_offset, 76, loc::gettext("[ YES, QUIT TO MENU ]"), 196, 196, 255 - help.glow); } else { if (game.inspecial()) { font::print_wrap(PR_CEN, -1, 80, loc::gettext("Return to main menu?"), 196, 196, 255 - help.glow, 12); } else { font::print_wrap(PR_CEN, -1, 76, loc::gettext("Do you want to quit? You will lose any unsaved progress."), 196, 196, 255 - help.glow, 12); } font::print(PR_RTL_XFLIP, 80, 130, loc::gettext("no, keep playing"), 96,96,96); font::print(PR_RTL_XFLIP, 80+32-selection_offset, 142, loc::gettext("[ YES, QUIT TO MENU ]"), 196, 196, 255 - help.glow); } break; case 20: font::print(PR_CEN | PR_CJK_LOW, -1, 220, loc::gettext("[ GRAVITRON ]"), 196, 196, 255 - help.glow); if (graphics.flipmode) { font::print_wrap(PR_CEN, -1, 88, loc::gettext("Do you want to return to the secret laboratory?"), 196, 196, 255 - help.glow, 12); font::print(PR_RTL_XFLIP, 80-selection_offset, 142, loc::gettext("[ NO, KEEP PLAYING ]"), 196, 196, 255 - help.glow); font::print(PR_RTL_XFLIP, 80 + 32, 130, loc::gettext("yes, return"), 96, 96, 96); } else { font::print_wrap(PR_CEN, -1, 76, loc::gettext("Do you want to return to the secret laboratory?"), 196, 196, 255 - help.glow, 12); font::print(PR_RTL_XFLIP, 80-selection_offset, 130, loc::gettext("[ NO, KEEP PLAYING ]"), 196, 196, 255 - help.glow); font::print(PR_RTL_XFLIP, 80 + 32, 142, loc::gettext("yes, return"), 96, 96, 96); } break; case 21: font::print(PR_CEN | PR_CJK_LOW, -1, 220, loc::gettext("[ GRAVITRON ]"), 196, 196, 255 - help.glow); if (graphics.flipmode) { font::print_wrap(PR_CEN, -1, 88, loc::gettext("Do you want to return to the secret laboratory?"), 196, 196, 255 - help.glow, 12); font::print(PR_RTL_XFLIP, 80, 142, loc::gettext("no, keep playing"), 96, 96, 96); font::print(PR_RTL_XFLIP, 80 + 32-selection_offset, 130, loc::gettext("[ YES, RETURN ]"), 196, 196, 255 - help.glow); } else { font::print_wrap(PR_CEN, -1, 76, loc::gettext("Do you want to return to the secret laboratory?"), 196, 196, 255 - help.glow, 12); font::print(PR_RTL_XFLIP, 80, 130, loc::gettext("no, keep playing"), 96, 96, 96); font::print(PR_RTL_XFLIP, 80 + 32-selection_offset, 142, loc::gettext("[ YES, RETURN ]"), 196, 196, 255 - help.glow); } } graphics.set_render_target(graphics.gameTexture); if (graphics.resumegamemode || graphics.menuoffset > 0 || graphics.oldmenuoffset > 0) { graphics.menuoffrender(); } else { graphics.copy_texture(graphics.menuTexture, NULL, NULL); } // We need to draw the black screen above the menu in order to disguise it // being jankily brought down in glitchrunner mode when exiting to the title // Otherwise, there's no reason to obscure the menu if (GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2) || FADEMODE_IS_FADING(graphics.fademode) || game.fadetomenu || game.fadetolab) { graphics.drawfade(); } graphics.renderwithscreeneffects(); } #undef FLIP_PR_CJK_HIGH #undef FLIP_PR_CJK_LOW #undef FLIP void teleporterrender(void) { graphics.set_render_target(graphics.menuTexture); graphics.clear(); const int telex = map.teleporters[game.teleport_to_teleporter].x; const int teley = map.teleporters[game.teleport_to_teleporter].y; draw_roomname_menu(); //Background color graphics.fill_rect(0, 12, 320, 240, 10, 24, 26); rendermap(); rendermapfog(); rendermapcursor(false); // Draw a box around the currently selected teleporter const MapRenderData data = map.get_render_data(); if (game.useteleporter) { //Draw the chosen destination coordinate! //TODO //draw the coordinates //destination graphics.draw_rect(40 + data.xoff + (telex * 12 * data.zoom) + 1, 21 + data.yoff + (teley * 9 * data.zoom) + 1, 12 * data.zoom - 2, 9 * data.zoom - 2, 245 - (help.glow * 2), 16, 16); graphics.draw_rect(40 + data.xoff + (telex * 12 * data.zoom) + 3, 21 + data.yoff + (teley * 9 * data.zoom) + 3, 12 * data.zoom - 6, 9 * data.zoom - 6, 245 - (help.glow * 2), 16, 16); } // Draw the legend itself rendermaplegend(); // Highlight the currently selected teleporter if (game.useteleporter && (help.slowsine % 16 > 8 || game.noflashingmode)) { font::print(PR_FONT_8X8 | PR_FULLBOR, data.legendxoff + data.xoff + (telex * 12 * data.zoom), data.legendyoff + data.yoff + (teley * 9 * data.zoom), "💿", 255, 0, 0); } graphics.cutscenebars(); if (game.useteleporter) { char buffer[SCREEN_WIDTH_CHARS + 1]; const char* final_string = interact_prompt( buffer, sizeof(buffer), loc::gettext("Press {button} to Teleport") ); //Instructions! font::print(PR_CEN, -1, 210, loc::gettext("Press Left/Right to choose a Teleporter"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); font::print(PR_CEN, -1, 225, final_string, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } graphics.drawgui(); if (game.advancetext) { char buffer_adv[SCREEN_WIDTH_CHARS + 1]; vformat_buf( buffer_adv, sizeof(buffer_adv), loc::gettext("- Press {button} to advance text -"), "button:but", vformat_button(ActionSet_InGame, Action_InGame_ACTION) ); font::print(PR_CEN | PR_BOR, -1, graphics.flipmode ? 228 : 5, buffer_adv, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2)); } graphics.set_render_target(graphics.gameTexture); if (graphics.resumegamemode || graphics.menuoffset > 0 || graphics.oldmenuoffset > 0) { graphics.menuoffrender(); } else { graphics.copy_texture(graphics.menuTexture, NULL, NULL); } graphics.render(); } ================================================ FILE: desktop_version/src/Render.h ================================================ #ifndef RENDER_H #define RENDER_H void titlerender(void); void gamerender(void); void maprender(void); void teleporterrender(void); void gamecompleterender(void); void gamecompleterender2(void); #endif /* RENDER_H */ ================================================ FILE: desktop_version/src/RenderFixed.cpp ================================================ #include "CustomLevels.h" #include "Game.h" #include "Graphics.h" #include "Editor.h" #include "Entity.h" #include "Enums.h" #include "Map.h" #include "Script.h" #include "UtilityClass.h" static inline void titleupdatetextcol(void) { graphics.col_tr = graphics.titlebg.r - (help.glow / 4) - int(fRandom() * 4); graphics.col_tg = graphics.titlebg.g - (help.glow / 4) - int(fRandom() * 4); graphics.col_tb = graphics.titlebg.b - (help.glow / 4) - int(fRandom() * 4); if (graphics.col_tr < 0) graphics.col_tr = 0; if(graphics.col_tr>255) graphics.col_tr=255; if (graphics.col_tg < 0) graphics.col_tg = 0; if(graphics.col_tg>255) graphics.col_tg=255; if (graphics.col_tb < 0) graphics.col_tb = 0; if(graphics.col_tb>255) graphics.col_tb=255; } static inline void tick_skip_message_timer(void) { const bool tick = graphics.fademode == FADE_NONE; if (!tick) { return; } game.old_skip_message_timer = game.skip_message_timer; if (game.skip_message_timer > 0) { game.skip_message_timer -= 15; } } void gamerenderfixed(void) { if (!game.blackout && !game.completestop) { for (size_t i = 0; i < obj.entities.size(); i++) { if (obj.entitycollidefloor(i)) { obj.entities[i].visualonground = 2; } else { --obj.entities[i].visualonground; } if (obj.entitycollideroof(i)) { obj.entities[i].visualonroof = 2; } else { --obj.entities[i].visualonroof; } //Animate the entities obj.animateentities(i); } } game.prev_act_fade = game.act_fade; if (INBOUNDS_VEC(game.activeactivity, obj.blocks) && game.hascontrol && !script.running) { if (game.act_fade < 5) { game.act_fade = 5; } if (game.act_fade < 10) { game.act_fade++; } } else if (game.act_fade > 5) { game.act_fade--; } if (obj.trophytext > 0) { obj.trophytext--; } graphics.cutscenebarstimer(); graphics.updatetextboxes(); if (!game.colourblindmode) { if (map.towermode) { graphics.updatetowerbackground(graphics.towerbg); } else { graphics.updatebackground(map.background); } } if (!game.blackout) { //Update line colours! if (graphics.linedelay <= 0) { graphics.linestate++; if (graphics.linestate >= 10) graphics.linestate = 0; graphics.linedelay = 2; } else { graphics.linedelay--; } } graphics.trinketcolset = false; for (int i = obj.entities.size() - 1; i >= 0; i--) { if (obj.entities[i].invis) { continue; } obj.entities[i].updatecolour(); } map.updateroomnames(); ed.old_return_message_timer = ed.return_message_timer; if (map.custommode && !map.custommodeforreal && ed.return_message_timer > 0) { ed.return_message_timer -= 15; } game.old_mode_indicator_timer = game.mode_indicator_timer; if (game.mode_indicator_timer > 0) { game.mode_indicator_timer -= 15; } // Editor ghosts! if (game.ghostsenabled) { if (map.custommode && !map.custommodeforreal) { if (game.frames % 3 == 0) { int i = obj.getplayer(); GhostInfo ghost; ghost.rx = game.roomx-100; ghost.ry = game.roomy-100; if (INBOUNDS_VEC(i, obj.entities)) { ghost.x = obj.entities[i].xp; ghost.y = obj.entities[i].yp; ghost.col = obj.entities[i].colour; ghost.realcol = obj.entities[i].realcol; ghost.frame = obj.entities[i].drawframe; } ed.ghosts.push_back(ghost); } if (ed.ghosts.size() > 100) { ed.ghosts.erase(ed.ghosts.begin()); } } } } void titlerenderfixed(void) { if (!game.colourblindmode) { graphics.updatetowerbackground(graphics.titlebg); } if (!game.menustart) { graphics.col_tr = (int)(164 - (help.glow / 2) - int(fRandom() * 4)); graphics.col_tg = 164 - (help.glow / 2) - int(fRandom() * 4); graphics.col_tb = 164 - (help.glow / 2) - int(fRandom() * 4); } else { titleupdatetextcol(); graphics.updatetitlecolours(); } graphics.crewframedelay--; if (graphics.crewframedelay <= 0) { graphics.crewframedelay = 8; graphics.crewframe = (graphics.crewframe + 1) % 2; } } void maprenderfixed(void) { graphics.updatetextboxes(); graphics.updatetitlecolours(); graphics.crewframedelay--; if (graphics.crewframedelay <= 0) { graphics.crewframedelay = 8; graphics.crewframe = (graphics.crewframe + 1) % 2; } graphics.oldmenuoffset = graphics.menuoffset; if (graphics.resumegamemode) { if (game.prevgamestate == GAMEMODE //Failsafe: if the script command gamemode(teleporter) got ran and the //cutscene stopped without doing gamemode(game), then we need to go //back to GAMEMODE, not game.prevgamestate (TELEPORTERMODE) || !script.running) { graphics.menuoffset += 25; int threshold = 240; if (graphics.menuoffset >= threshold) { graphics.menuoffset = threshold; //go back to gamemode! game.mapheld = true; game.gamestate = GAMEMODE; graphics.resumegamemode = false; } } else { game.mapheld = true; game.gamestate = game.prevgamestate; graphics.resumegamemode = false; } } else if (graphics.menuoffset > 0) { graphics.menuoffset -= 25; if (graphics.menuoffset < 0) { graphics.menuoffset = 0; } } 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++; } map.updateroomnames(); } void teleporterrenderfixed(void) { maprenderfixed(); graphics.cutscenebarstimer(); } void gamecompleterenderfixed(void) { graphics.updatetitlecolours(); titleupdatetextcol(); tick_skip_message_timer(); } void gamecompleterenderfixed2(void) { tick_skip_message_timer(); } ================================================ FILE: desktop_version/src/RenderFixed.h ================================================ #ifndef RENDERFIXED_H #define RENDERFIXED_H void gamerenderfixed(void); void titlerenderfixed(void); void maprenderfixed(void); void teleporterrenderfixed(void); void gamecompleterenderfixed(void); void gamecompleterenderfixed2(void); #endif /* RENDERFIXED_H */ ================================================ FILE: desktop_version/src/RoomnameTranslator.cpp ================================================ #include "RoomnameTranslator.h" #include "Constants.h" #include "Font.h" #include "Game.h" #include "Graphics.h" #include "GraphicsUtil.h" #include "KeyPoll.h" #include "LevelDebugger.h" #include "Localization.h" #include "LocalizationMaint.h" #include "Map.h" #include "Script.h" #include "UtilityClass.h" #include "VFormat.h" namespace roomname_translator { bool enabled = false; bool edit_mode = false; bool expl_mode = false; bool help_screen = false; SDL_Surface* dimbuffer; SDL_Rect fullscreen_rect; void set_enabled(bool value) { enabled = value; edit_mode = false; } bool is_pausing(void) { return enabled && edit_mode; } static void print_explanation(const char* explanation) { const char* use_explanation = explanation; if (explanation == NULL || explanation[0] == '\0') { use_explanation = "[explanation not yet set]"; } else if (SDL_strcmp(explanation, ".") == 0) { use_explanation = "[no explanation]"; } font::print_wrap(PR_BOR | PR_FONT_8X8, 0, 10, use_explanation, 0,192,255, 8, 320); } void overlay_render(bool* force_roomname_hidden, bool* roomname_untranslated, int* roomname_r, int* roomname_g, int* roomname_b) { if (level_debugger::is_active()) { return; } if (edit_mode || help_screen) { fullscreen_rect.x = 0; fullscreen_rect.y = 0; fullscreen_rect.w = 320; fullscreen_rect.h = 240; graphics.set_blendmode(SDL_BLENDMODE_BLEND); graphics.fill_rect(graphics.getRGBA(0, 0, 0, 96)); graphics.set_blendmode(SDL_BLENDMODE_NONE); if (help_screen) { font::print(PR_BOR | PR_FONT_8X8, 0, 0, "=== Room name translation mode help ===", 255,255,255); if (expl_mode) { font::print_wrap( PR_BOR | PR_FONT_8X8, 0, 20, "You can currently access EXPL mode to\n" "set explanations for room names.\n" "(Use Ctrl+E to switch to NAME mode.)", 255,255,255 ); const char* first_part = "Unexplained room names are "; font::print(PR_BOR | PR_FONT_8X8, 0, 60, first_part, 255,255,255); font::print(PR_BOR | PR_FONT_8X8, font::len(PR_FONT_8X8, first_part), 60, "cyan.", 64, 255, 255-help.glow); } else { font::print_wrap( PR_BOR | PR_FONT_8X8, 0, 20, "You can currently access NAME mode to\n" "translate room names.\n" "(Use Ctrl+E to switch to EXPL mode.)", 255,255,255 ); const char* first_part = "English room names are "; font::print(PR_BOR | PR_FONT_8X8, 0, 60, first_part, 255,255,255); font::print(PR_BOR | PR_FONT_8X8, font::len(PR_FONT_8X8, first_part), 60, "cyan.", 0, 192, 255-help.glow); } font::print(PR_BOR | PR_FONT_8X8, 0, 80, "KEYS:", 255,255,255); if (expl_mode) { font::print(PR_BOR | PR_FONT_8X8, 0, 90, "Tab - switch between play/expl modes", 255,255,255); font::print(PR_BOR | PR_FONT_8X8, 0, 100, "E/Enter - set room name explanation", 255,255,255); } else { font::print(PR_BOR | PR_FONT_8X8, 0, 90, "Tab - switch between play/name modes", 255,255,255); font::print(PR_BOR | PR_FONT_8X8, 0, 100, "E/Enter - set room name translation", 255,255,255); } font::print(PR_BOR | PR_FONT_8X8, 0, 110, "I - toggle invincibility", 255,255,255); if (expl_mode) { font::print(PR_BOR | PR_FONT_8X8, 0, 120, ". - set blank explanation", 255,255,255); } *force_roomname_hidden = true; return; } else if (expl_mode) { font::print(PR_BOR | PR_FONT_8X8, 0, 0, "Expl mode [TAB]", 255,255,255); } else { font::print(PR_BOR | PR_FONT_8X8, 0, 0, "Name mode [TAB]", 255,255,255); } } else { font::print(PR_BOR | PR_FONT_8X8, 0, 0, "Play mode [TAB]", 255,255,255); font::print(PR_BOR | PR_FONT_8X8, 320-64, 10, "F1: Help", 192,192,192); } char buffer[SCREEN_WIDTH_CHARS + 1]; int n_left; if (expl_mode) { n_left = map.custommode ? loc::n_unexplained_roomnames_custom : loc::n_unexplained_roomnames; } else { n_left = map.custommode ? loc::n_untranslated_roomnames_custom : loc::n_untranslated_roomnames; } vformat_buf(buffer, sizeof(buffer), "{n|digits=3|spaces} left", "n:int", n_left); font::print(PR_BOR | PR_FONT_8X8, 144, 0, buffer, 255,255,255); if (map.invincibility) { font::print(PR_BOR | PR_FONT_8X8, 224, 0, "INV", 255,255,128); } vformat_buf(buffer, sizeof(buffer), "({x|digits=2|spaces},{y|digits=2|spaces})", "x:int, y:int", game.roomx % 100, game.roomy % 100 ); font::print(PR_BOR | PR_FONT_8X8, 320-56, 0, buffer, 255,255,255); if (map.roomname_special) { if (edit_mode) { print_explanation("This is a special room name, which cannot be translated in-game. Please see roomnames_special"); } } else if (map.roomname[0] == '\0') { // No room name at all, so no translation/explanation interface if (edit_mode) { font::print(PR_CEN | PR_BOR | PR_FONT_8X8, -1, 229-font::height(PR_FONT_LEVEL), "[no roomname]", 0,192,255); } } else if (!expl_mode) { // Name mode affects play mode a bit as well... bool roomname_is_translated = loc::get_roomname_translation(map.custommode, game.roomx, game.roomy)[0] != '\0'; *roomname_untranslated = !roomname_is_translated; if (edit_mode) { const char* english_roomname = map.roomname; font::print(PR_CEN | PR_BOR | PR_FONT_8X8, -1, 229-font::height(PR_FONT_LEVEL), english_roomname, 0,192,255); print_explanation(loc::get_roomname_explanation(map.custommode, game.roomx, game.roomy)); if (key.textentry()) { *force_roomname_hidden = true; graphics.render_roomname(PR_FONT_LEVEL, key.keybuffer.c_str(), 255,255,255); int name_w = font::len(PR_FONT_LEVEL, key.keybuffer.c_str()); font::print(PR_BOR | PR_FONT_LEVEL | PR_RTL_XFLIP, (320-name_w)/2+name_w, 231, "_", 255,255,255); } else if (!roomname_is_translated) { *force_roomname_hidden = true; graphics.render_roomname(PR_FONT_8X8, "[no translation]", 255,255,128); } } else if (!roomname_is_translated) { *roomname_r = 0; *roomname_g = 192; *roomname_b = 255 - help.glow; } } else { // Explanation mode! const char* explanation = loc::get_roomname_explanation(map.custommode, game.roomx, game.roomy); if (explanation[0] == '\0') { *roomname_r = 64; *roomname_g = 255; *roomname_b = 255 - help.glow; } if (edit_mode) { if (key.textentry()) { print_explanation((key.keybuffer + "_").c_str()); font::print_wrap(PR_BOR | PR_FONT_8X8, 0, 90, "Use \".\" to set no explanation", 255,255,255, 8, 320); } else { print_explanation(explanation); } } } } static bool key_pressed_once(SDL_Keycode keyc, bool* held) { if (key.isDown(keyc)) { if (!*held) { *held = true; return true; } } else { *held = false; } return false; } static void save_explanation(const char* explanation, const char* success_message) { if (loc::save_roomname_explanation_to_files(map.custommode, game.roomx, game.roomy, explanation)) { graphics.createtextboxflipme(success_message, -1, 176, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); graphics.textboxtimer(25); } else { graphics.createtextboxflipme("ERROR: Could not save to all langs!", -1, 176, TEXT_COLOUR("red")); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); graphics.textboxtimer(50); } graphics.textboxoriginalcontextauto(); graphics.textboxapplyposition(); } static void save_translation(const char* translation) { if (loc::save_roomname_to_file(loc::lang, map.custommode, game.roomx, game.roomy, translation, NULL)) { graphics.createtextboxflipme("Translation saved!", -1, 176, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); graphics.textboxtimer(25); } else { graphics.createtextboxflipme("ERROR: Could not save!", -1, 144, TEXT_COLOUR("red")); graphics.addline(""); graphics.addline("1) Do the language files exist?"); graphics.addline("2) Make sure there is no \"lang\""); graphics.addline(" folder next to the regular saves."); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); graphics.textboxtimer(180); } graphics.textboxoriginalcontextauto(); graphics.textboxapplyposition(); } bool held_tab = false; bool held_i = false; bool held_escape = false; bool held_return = false; bool held_e = false; bool held_period = false; bool held_f1 = false; bool overlay_input(void) { // Returns true if input "caught" and should not go to gameinput if (key.isDown(SDLK_ESCAPE) && held_escape) { // Avoid opening the pause menu return true; } else { held_escape = false; } if (help_screen) { if ((key.isDown(SDLK_LCTRL) || key.isDown(SDLK_RCTRL)) && key_pressed_once(SDLK_e, &held_e)) { expl_mode = !expl_mode; } if (key_pressed_once(SDLK_ESCAPE, &held_escape) || key_pressed_once(SDLK_F1, &held_f1)) { help_screen = false; } return true; } if (key.textentry()) { if (key_pressed_once(SDLK_ESCAPE, &held_escape)) { // Without saving key.disabletextentry(); } if (key_pressed_once(SDLK_RETURN, &held_return)) { key.disabletextentry(); if (!expl_mode) { if (loc::lang == "en") { graphics.createtextboxflipme("ERROR: Can't add EN-EN translation", -1, 176, TEXT_COLOUR("red")); graphics.textboxoriginalcontextauto(); graphics.textboxprintflags(PR_FONT_8X8); graphics.textboxcenterx(); graphics.textboxtimer(50); graphics.textboxapplyposition(); } else { save_translation(key.keybuffer.c_str()); } } else { save_explanation(key.keybuffer.c_str(), "Explanation saved!"); } edit_mode = false; game.mapheld = true; } return true; } if (key_pressed_once(SDLK_F1, &held_f1)) { help_screen = true; } if (key_pressed_once(SDLK_TAB, &held_tab) && !level_debugger::is_active()) { edit_mode = !edit_mode; } if (key_pressed_once(SDLK_i, &held_i)) { if (game.intimetrial) { // We'll let you enable it in a time trial, but with a twist. if (!game.timetrialcheater) { game.sabotage_time_trial(); } } else if (game.incompetitive()) { return edit_mode; } map.invincibility = !map.invincibility; } if (edit_mode) { if (key_pressed_once(SDLK_ESCAPE, &held_escape)) { edit_mode = false; return true; } if ((key.isDown(SDLK_LCTRL) || key.isDown(SDLK_RCTRL)) && key_pressed_once(SDLK_e, &held_e)) { expl_mode = !expl_mode; return true; } if (key_pressed_once(SDLK_RETURN, &held_return) || key_pressed_once(SDLK_e, &held_e)) { if (map.roomname_special || map.roomname[0] == '\0') { return true; } key.enabletextentry(); if (!expl_mode) { key.keybuffer = loc::get_roomname_translation(map.custommode, game.roomx, game.roomy); } else { key.keybuffer = loc::get_roomname_explanation(map.custommode, game.roomx, game.roomy); } } if (expl_mode && key_pressed_once(SDLK_PERIOD, &held_period)) { const char* old_explanation = loc::get_roomname_explanation(map.custommode, game.roomx, game.roomy); const char* new_explanation = NULL; const char* success_message; if (old_explanation[0] == '\0') { new_explanation = "."; success_message = "Blank explanation set!"; } else if (SDL_strcmp(old_explanation, ".") == 0) { new_explanation = ""; success_message = "Blank explanation deleted!"; } if (new_explanation != NULL) { save_explanation(new_explanation, success_message); } } } return edit_mode; } } ================================================ FILE: desktop_version/src/RoomnameTranslator.h ================================================ #ifndef ROOMNAMETRANSLATOR_H #define ROOMNAMETRANSLATOR_H #include namespace roomname_translator { extern bool enabled; extern bool edit_mode; extern SDL_Surface* dimbuffer; extern SDL_Rect fullscreen_rect; void set_enabled(bool value); bool is_pausing(void); void overlay_render(bool* force_roomname_hidden, bool* roomname_untranslated, int* roomname_r, int* roomname_g, int* roomname_b); bool overlay_input(void); } #endif /* ROOMNAMETRANSLATOR_H */ ================================================ FILE: desktop_version/src/SDL_uikit_main.c ================================================ /* SDL_uikit_main.c, placed in the public domain by Sam Lantinga 3/18/2019 */ /* Include the SDL main definition header */ #include "SDL_main.h" #if defined(__IPHONEOS__) || defined(__TVOS__) #ifndef SDL_MAIN_HANDLED #ifdef main #undef main #endif int main(int argc, char *argv[]) { return SDL_UIKitRunApp(argc, argv, SDL_main); } #endif /* !SDL_MAIN_HANDLED */ #endif /* __IPHONEOS__ || __TVOS__ */ /* vi: set ts=4 sw=4 expandtab: */ ================================================ FILE: desktop_version/src/Screen.cpp ================================================ #define GAMESCREEN_DEFINITION #include "Screen.h" #include #include "Alloc.h" #include "Constants.h" #include "Exit.h" #include "FileSystemUtils.h" #include "Game.h" #include "Graphics.h" #include "GraphicsUtil.h" #ifndef __APPLE__ #include "GraphicsResources.h" #endif #include "InterimVersion.h" #include "Render.h" #include "Vlogging.h" void ScreenSettings_default(struct ScreenSettings* _this) { _this->windowDisplay = 0; _this->windowWidth = SCREEN_WIDTH_PIXELS * 2; _this->windowHeight = SCREEN_HEIGHT_PIXELS * 2; _this->fullscreen = false; _this->useVsync = true; // Now that uncapped is the default... _this->scalingMode = SCALING_INTEGER; _this->linearFilter = false; _this->badSignal = false; } void Screen::init(const struct ScreenSettings* settings) { m_window = NULL; m_renderer = NULL; windowDisplay = settings->windowDisplay; windowWidth = settings->windowWidth; windowHeight = settings->windowHeight; isWindowed = !settings->fullscreen; scalingMode = settings->scalingMode; isFiltered = settings->linearFilter; badSignalEffect = settings->badSignal; vsync = settings->useVsync; // Uncomment this next line when you need to debug -flibit // SDL_SetHintWithPriority(SDL_HINT_RENDER_DRIVER, "software", SDL_HINT_OVERRIDE); m_window = SDL_CreateWindow( "VVVVVV", SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay), SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay), SCREEN_WIDTH_PIXELS * 2, SCREEN_HEIGHT_PIXELS * 2, SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI ); if (m_window == NULL) { vlog_error("Could not create window: %s", SDL_GetError()); VVV_exit(1); } m_renderer = SDL_CreateRenderer(m_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE); if (m_renderer == NULL) { vlog_error("Could not create renderer: %s", SDL_GetError()); VVV_exit(1); } SDL_RenderSetVSync(m_renderer, (int) vsync); #ifdef INTERIM_VERSION_EXISTS /* Branch name limits are ill-defined but on GitHub it's ~256 chars * ( https://stackoverflow.com/a/24014513/ ). * Really though, just don't use super long branch names. */ char title[256]; SDL_snprintf(title, sizeof(title), "VVVVVV [%s]", BRANCH_NAME); SDL_SetWindowTitle(m_window, title); #else SDL_SetWindowTitle(m_window, "VVVVVV"); #endif SDL_SetWindowMinimumSize(m_window, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS); LoadIcon(); ResizeScreen(windowWidth, windowHeight); } void Screen::destroy(void) { /* Order matters! */ VVV_freefunc(SDL_DestroyRenderer, m_renderer); VVV_freefunc(SDL_DestroyWindow, m_window); } void Screen::GetSettings(struct ScreenSettings* settings) { windowDisplay = SDL_GetWindowDisplayIndex(m_window); if (windowDisplay < 0) { vlog_error("Error: could not get display index: %s", SDL_GetError()); windowDisplay = 0; } settings->windowDisplay = windowDisplay; settings->windowWidth = windowWidth; settings->windowHeight = windowHeight; settings->fullscreen = !isWindowed; settings->useVsync = vsync; settings->scalingMode = scalingMode; settings->linearFilter = isFiltered; settings->badSignal = badSignalEffect; } #ifdef __APPLE__ /* Apple doesn't like icons anymore... */ void Screen::LoadIcon(void) { } #else void Screen::LoadIcon(void) { SDL_Surface* icon = LoadImageSurface("VVVVVV.png"); if (icon == NULL) { return; } SDL_SetWindowIcon(m_window, icon); VVV_freefunc(SDL_FreeSurface, icon); } #endif /* __APPLE__ */ void Screen::ResizeScreen(int x, int y) { windowDisplay = SDL_GetWindowDisplayIndex(m_window); if (windowDisplay < 0) { vlog_error("Error: could not get display index: %s", SDL_GetError()); windowDisplay = 0; } if (x != -1 && y != -1) { // This is a user resize! windowWidth = x; windowHeight = y; } if (!isWindowed || isForcedFullscreen()) { int result = SDL_SetWindowFullscreen(m_window, SDL_WINDOW_FULLSCREEN_DESKTOP); recacheTextures(); if (result != 0) { vlog_error("Error: could not set the game to fullscreen mode: %s", SDL_GetError()); return; } } else { int result = SDL_SetWindowFullscreen(m_window, 0); if (result != 0) { vlog_error("Error: could not set the game to windowed mode: %s", SDL_GetError()); } else if (x != -1 && y != -1) { SDL_SetWindowSize(m_window, windowWidth, windowHeight); SDL_SetWindowPosition( m_window, SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay), SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay) ); } recacheTextures(); } } static void constrain_to_desktop(int display_index, int* width, int* height) { SDL_DisplayMode display_mode = {}; int success = SDL_GetDesktopDisplayMode(display_index, &display_mode); if (success != 0) { vlog_error("Could not get desktop display mode: %s", SDL_GetError()); return; } while ((*width > display_mode.w || *height > display_mode.h) && *width > SCREEN_WIDTH_PIXELS && *height > SCREEN_HEIGHT_PIXELS) { // We are too big, take away one multiple *width -= SCREEN_WIDTH_PIXELS; *height -= SCREEN_HEIGHT_PIXELS; } } void Screen::ResizeToNearestMultiple(void) { int w, h; GetScreenSize(&w, &h); // Check aspect ratio first bool using_width; int usethisdimension, usethisratio; if ((float) w / (float) h > 4.0 / 3.0) { // Width is bigger, so it's limited by height usethisdimension = h; usethisratio = SCREEN_HEIGHT_PIXELS; using_width = false; } else { // Height is bigger, so it's limited by width. Or we're exactly 4:3 already usethisdimension = w; usethisratio = SCREEN_WIDTH_PIXELS; using_width = true; } int floor = (usethisdimension / usethisratio) * usethisratio; int ceiling = floor + usethisratio; int final_dimension; if (usethisdimension - floor < ceiling - usethisdimension) { // Floor is nearest final_dimension = floor; } else { // Ceiling is nearest. Or we're exactly on a multiple already final_dimension = ceiling; } if (final_dimension == 0) { // We're way too small! ResizeScreen(SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS); return; } if (using_width) { w = final_dimension; h = final_dimension / 4 * 3; } else { w = final_dimension * 4 / 3; h = final_dimension; } windowDisplay = SDL_GetWindowDisplayIndex(m_window); if (windowDisplay < 0) { vlog_error("Could not get display index: %s", SDL_GetError()); windowDisplay = 0; } constrain_to_desktop(windowDisplay, &w, &h); ResizeScreen(w, h); } void Screen::GetScreenSize(int* x, int* y) { if (SDL_GetRendererOutputSize(m_renderer, x, y) != 0) { vlog_error("Could not get window size: %s", SDL_GetError()); /* Initialize to safe defaults */ *x = SCREEN_WIDTH_PIXELS; *y = SCREEN_HEIGHT_PIXELS; } } void Screen::RenderPresent(void) { SDL_RenderPresent(m_renderer); graphics.clear(); } void Screen::toggleFullScreen(void) { isWindowed = !isWindowed; ResizeScreen(windowWidth, windowHeight); if (game.currentmenuname == Menu::graphicoptions) { /* Recreate menu to update "resize to nearest" */ game.createmenu(game.currentmenuname, true); } } void Screen::toggleScalingMode(void) { scalingMode = (scalingMode + 1) % NUM_SCALING_MODES; } void Screen::toggleLinearFilter(void) { isFiltered = !isFiltered; SDL_DestroyTexture(graphics.gameTexture); SDL_DestroyTexture(graphics.tempShakeTexture); graphics.gameTexture = SDL_CreateTexture( m_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS ); graphics.tempShakeTexture = SDL_CreateTexture( m_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, SCREEN_WIDTH_PIXELS, SCREEN_HEIGHT_PIXELS ); if (graphics.gameTexture == NULL) { vlog_error("Could not create game texture: %s", SDL_GetError()); return; } if (graphics.tempShakeTexture == NULL) { vlog_error("Could not create temp shake texture: %s", SDL_GetError()); return; } SDL_SetTextureScaleMode( graphics.gameTexture, isFiltered ? SDL_ScaleModeLinear : SDL_ScaleModeNearest ); SDL_SetTextureScaleMode( graphics.tempShakeTexture, isFiltered ? SDL_ScaleModeLinear : SDL_ScaleModeNearest ); } void Screen::toggleVSync(void) { vsync = !vsync; SDL_RenderSetVSync(m_renderer, (int) vsync); recacheTextures(); } void Screen::recacheTextures(void) { // Fix for d3d9, which clears target textures sometimes (ex. toggling vsync, switching fullscreen, etc...) // Signal cached textures to be redrawn fully graphics.backgrounddrawn = false; graphics.foregrounddrawn = false; graphics.towerbg.tdrawback = true; graphics.titlebg.tdrawback = true; if (game.ingame_titlemode) { // Redraw the cached gameplay texture if we're in the in-game menu. // Additionally, reset alpha so things don't jitter when re-entering gameplay. float oldAlpha = graphics.alpha; graphics.alpha = 0; gamerender(); graphics.alpha = oldAlpha; } } bool Screen::isForcedFullscreen(void) { /* This is just a check to see if we're on a desktop or tenfoot setup. * If you're working on a tenfoot-only build, add a def that always * returns true! */ #if defined(__ANDROID__) || TARGET_OS_IPHONE return true; #else return SDL_GetHintBoolean("SteamTenfoot", SDL_FALSE); #endif } ================================================ FILE: desktop_version/src/Screen.h ================================================ #ifndef SCREEN_H #define SCREEN_H #include #include "ScreenSettings.h" class Screen { public: void init(const struct ScreenSettings* settings); void destroy(void); void GetSettings(struct ScreenSettings* settings); void LoadIcon(void); void ResizeScreen(int x, int y); void ResizeToNearestMultiple(void); void GetScreenSize(int* x, int* y); void RenderPresent(void); void toggleFullScreen(void); void toggleScalingMode(void); void toggleLinearFilter(void); void toggleVSync(void); void recacheTextures(void); bool isForcedFullscreen(void); int windowDisplay; int windowWidth; int windowHeight; bool isWindowed; bool isFiltered; bool badSignalEffect; int scalingMode; bool vsync; SDL_Window *m_window; SDL_Renderer *m_renderer; }; #ifndef GAMESCREEN_DEFINITION extern Screen gameScreen; #endif #endif /* SCREEN_H */ ================================================ FILE: desktop_version/src/ScreenSettings.h ================================================ #ifndef SCREENSETTINGS_H #define SCREENSETTINGS_H enum { SCALING_LETTERBOX = 0, SCALING_STRETCH = 1, SCALING_INTEGER = 2, NUM_SCALING_MODES }; struct ScreenSettings { int windowDisplay; int windowWidth; int windowHeight; bool fullscreen; bool useVsync; int scalingMode; bool linearFilter; bool badSignal; }; void ScreenSettings_default(struct ScreenSettings* _this); #endif /* SCREENSETTINGS_H */ ================================================ FILE: desktop_version/src/Script.cpp ================================================ #define SCRIPT_DEFINITION #include "Script.h" #include #include #include "Alloc.h" #include "Constants.h" #include "CustomLevels.h" #include "Editor.h" #include "Entity.h" #include "Enums.h" #include "Exit.h" #include "Font.h" #include "GlitchrunnerMode.h" #include "Graphics.h" #include "KeyPoll.h" #include "Localization.h" #include "LocalizationMaint.h" #include "LocalizationStorage.h" #include "Map.h" #include "Music.h" #include "ReleaseVersion.h" #include "Unreachable.h" #include "UtilityClass.h" #include "VFormat.h" #include "Vlogging.h" #include "Xoshiro.h" scriptclass::scriptclass(void) { position = 0; scriptdelay = 0; running = false; b = 0; g = 0; i = 0; j = 0; k = 0; loopcount = 0; looppoint = 0; r = 0; textx = 0; texty = 0; textcrewmateposition = TextboxCrewmatePosition(); textoriginalcontext = TextboxOriginalContext(); textbox_colours.clear(); add_default_colours(); textflipme = false; textboxtimer = 0; textcase = 1; textbuttons = false; textlarge = false; textbox_sprites.clear(); textbox_image = TEXTIMAGE_NONE; textbox_absolutepos = false; } void scriptclass::add_default_colours(void) { textbox_colours["player"] = graphics.getRGB(164, 164, 255); textbox_colours["cyan"] = graphics.getRGB(164, 164, 255); textbox_colours["red"] = graphics.getRGB(255, 60, 60); textbox_colours["green"] = graphics.getRGB(144, 255, 144); textbox_colours["yellow"] = graphics.getRGB(255, 255, 134); textbox_colours["blue"] = graphics.getRGB(95, 95, 255); textbox_colours["purple"] = graphics.getRGB(255, 134, 255); textbox_colours["white"] = graphics.getRGB(244, 244, 244); textbox_colours["gray"] = graphics.getRGB(174, 174, 174); textbox_colours["orange"] = graphics.getRGB(255, 130, 20); textbox_colours["transparent"] = graphics.getRGB(0, 0, 0); } void scriptclass::clearcustom(void) { customscripts.clear(); } static bool argexists[NUM_SCRIPT_ARGS]; static std::string raw_words[NUM_SCRIPT_ARGS]; void scriptclass::tokenize( const std::string& t ) { j = 0; std::string tempword; std::string temprawword; char currentletter; SDL_zeroa(argexists); for (size_t i = 0; i < t.length(); i++) { currentletter = t[i]; if (currentletter == '(' || currentletter == ')' || currentletter == ',') { words[j] = tempword; raw_words[j] = temprawword; argexists[j] = words[j] != ""; for (size_t ii = 0; ii < words[j].length(); ii++) { words[j][ii] = SDL_tolower(words[j][ii]); } j++; tempword = ""; temprawword = ""; } else if (currentletter == ' ') { /* Ignore spaces unless it's part of a script name. */ temprawword += currentletter; } else { tempword += currentletter; temprawword += currentletter; } if (j >= (int) SDL_arraysize(words)) { break; } } if (j < (int) SDL_arraysize(words)) { const bool lastargexists = tempword != ""; if (lastargexists) { words[j] = tempword; raw_words[j] = tempword; } argexists[j] = lastargexists; } } static int getcolorfromname(std::string name) { if (name == "player") return EntityColour_CREW_CYAN; else if (name == "cyan") return EntityColour_CREW_CYAN; else if (name == "red") return EntityColour_CREW_RED; else if (name == "green") return EntityColour_CREW_GREEN; else if (name == "yellow") return EntityColour_CREW_YELLOW; else if (name == "blue") return EntityColour_CREW_BLUE; else if (name == "purple") return EntityColour_CREW_PURPLE; else if (name == "customcyan") return EntityColour_CREW_CYAN; else if (name == "gray") return EntityColour_CREW_GRAY; else if (name == "teleporter") return EntityColour_TELEPORTER_FLASHING; int color = help.Int(name.c_str(), -1); if (color < 0) return -1; // Not a number (or it's negative), so we give up return color; // Last effort to give a valid color, maybe they just input the color? } static int getcrewmanfromname(std::string name) { if (name == "player") return obj.getplayer(); // Return the player int color = getcolorfromname(name); // Maybe they passed in a crewmate name, or an id? if (color == -1) return -1; // ...Nope, return -1 return obj.getcrewman(color); } /* Also used in gamestate 1001. */ void foundtrinket_textbox1(textboxclass* THIS); void foundtrinket_textbox2(textboxclass* THIS); static void foundlab_textbox1(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("Congratulations!\n\nYou have found the secret lab!")); THIS->wrap(2); THIS->centertext(); THIS->pad(1, 1); } static void foundlab_textbox2(textboxclass* THIS) { THIS->lines.clear(); THIS->lines.push_back(loc::gettext("The secret lab is separate from the rest of the game. You can now come back here at any time by selecting the new SECRET LAB option in the play menu.")); THIS->wrap(0); } void scriptclass::run(void) { if (!running) { return; } // This counter here will stop the function when it gets too high short execution_counter = 0; while(running && scriptdelay<=0 && !game.pausescript) { if (INBOUNDS_VEC(position, commands)) { //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(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].xp += ss_toi(words[1]); obj.entities[player].yp += ss_toi(words[2]); obj.entities[player].lerpoldxp = obj.entities[player].xp; obj.entities[player].lerpoldyp = obj.entities[player].yp; } scriptdelay = 1; } if (words[0] == "setroomname") { ++position; if (INBOUNDS_VEC(position, commands)) { map.roomname_special = true; map.roomnameset = true; map.setroomname(commands[position].c_str()); } } if (words[0] == "warpdir") { int temprx = ss_toi(words[1]) - 1; int tempry = ss_toi(words[2]) - 1; const RoomProperty* room; cl.setroomwarpdir(temprx, tempry, ss_toi(words[3])); room = cl.getroomprop(temprx, tempry); //Do we update our own room? if (game.roomx - 100 == temprx && game.roomy - 100 == tempry) { //If screen warping, then override all that: graphics.backgrounddrawn = false; map.warpx = false; map.warpy = false; if (room->warpdir == 0) { map.background = 1; //Be careful, we could be in a Lab or Warp Zone room... if (room->tileset == 2) { //Lab map.background = 2; graphics.rcol = room->tilecol; } else if (room->tileset == 3) { //Warp Zone map.background = 6; } } else if (room->warpdir == 1) { map.warpx = true; map.background = 3; graphics.rcol = cl.getwarpbackground(temprx, tempry); } else if (room->warpdir == 2) { map.warpy = true; map.background = 4; graphics.rcol = cl.getwarpbackground(temprx, tempry); } else if (room->warpdir == 3) { map.warpx = true; map.warpy = true; map.background = 5; graphics.rcol = cl.getwarpbackground(temprx, tempry); } } } if (words[0] == "ifwarp") { const RoomProperty* const room = cl.getroomprop(ss_toi(words[1])-1, ss_toi(words[2])-1); if (room->warpdir == ss_toi(words[3])) { loadalts("custom_" + words[4], "custom_" + raw_words[4]); position--; } } if (words[0] == "destroy") { if (words[1] == "gravitylines") { for (size_t edi = 0; edi < obj.entities.size(); edi++) { if (obj.entities[edi].type == EntityType_HORIZONTAL_GRAVITY_LINE || obj.entities[edi].type == EntityType_VERTICAL_GRAVITY_LINE) { obj.disableentity(edi); } } } else if (words[1] == "warptokens") { for (size_t edi = 0; edi < obj.entities.size(); edi++) { if (obj.entities[edi].type == EntityType_WARP_TOKEN) { obj.disableentity(edi); } } } else if (words[1] == "platforms" || words[1] == "moving") { const bool fixed = words[1] == "moving"; for (size_t edi = 0; edi < obj.entities.size(); edi++) { if (obj.entities[edi].rule == 2 && obj.entities[edi].animate == 100) { if (fixed) { obj.disableblockat(obj.entities[edi].xp, obj.entities[edi].yp); } obj.disableentity(edi); } } } else if (words[1] == "disappear") { for (size_t edi = 0; edi < obj.entities.size(); edi++) { obj.disableblockat(obj.entities[edi].xp, obj.entities[edi].yp); if (obj.entities[edi].type == EntityType_DISAPPEARING_PLATFORM && obj.entities[edi].rule == 3) { obj.disableentity(edi); } } } } if (words[0] == "ifversion") { // A short for each is SURELY enough unsigned short version[3] = { 0, 0, 0 }; bool valid_version = true; int current = 0; // Crawl through the string for (int i = 0; i < words[1].size(); i++) { // If the current character is a number, add it to the current version part if (words[1][i] >= '0' && words[1][i] <= '9') { version[current] = version[current] * 10 + (words[1][i] - '0'); } else if (words[1][i] == '.') { current++; if (current >= 3) { break; } } else { // Unexpected character valid_version = false; break; } } if (valid_version) { bool version_is_met = false; if (MAJOR_VERSION > version[0]) { version_is_met = true; } else if (MAJOR_VERSION == version[0]) { if (MINOR_VERSION > version[1]) { version_is_met = true; } else if (MINOR_VERSION == version[1]) { if (PATCH_VERSION >= version[2]) { version_is_met = true; } } } if (version_is_met) { loadalts("custom_" + words[2], "custom_" + raw_words[2]); position--; } } } if (words[0] == "customiftrinkets") { if (game.trinkets() >= ss_toi(words[1])) { loadalts("custom_" + words[2], "custom_" + raw_words[2]); position--; } } if (words[0] == "customiftrinketsless") { if (game.trinkets() < ss_toi(words[1])) { loadalts("custom_" + words[2], "custom_" + raw_words[2]); position--; } } else if (words[0] == "customifflag") { int flag = ss_toi(words[1]); if (INBOUNDS_ARR(flag, obj.flags) && obj.flags[flag]) { loadalts("custom_" + words[2], "custom_" + raw_words[2]); position--; } } if (words[0] == "custommap") { if(words[1]=="on"){ map.customshowmm=true; }else if(words[1]=="off"){ map.customshowmm=false; } } else if (words[0] == "setregion") { map.setregion( ss_toi(words[1]), ss_toi(words[2]), ss_toi(words[3]), ss_toi(words[4]), ss_toi(words[5])); } else if (words[0] == "removeregion") { map.removeregion(ss_toi(words[1])); } else if (words[0] == "changeregion") { map.changeregion(ss_toi(words[1])); } if (words[0] == "delay") { //USAGE: delay(frames) scriptdelay = ss_toi(words[1]); } if (words[0] == "flag") { int flag = ss_toi(words[1]); if (INBOUNDS_ARR(flag, obj.flags)) { if (words[2] == "on") { obj.flags[flag] = true; } else if (words[2] == "off") { obj.flags[flag] = false; } } } 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") { int player = obj.getplayer(); if(INBOUNDS_VEC(player, obj.entities) && obj.entities[player].onroof>0) { game.press_action = true; scriptdelay = 1; } } if (words[0] == "playef") { bool played = false; int sound_id = help.Int(words[1].c_str(), -1); if (music.soundidexists(words[1].c_str())) { played = music.playefid(words[1].c_str()); } else if (!music.soundisextra(sound_id)) { played = music.playef(sound_id); } if (!played) { vlog_error("playef() couldn't play sound: %s", words[1].c_str()); } } if (words[0] == "play") { music.play(ss_toi(words[1])); } if (words[0] == "stopmusic") { music.haltdasmusik(); } if (words[0] == "resumemusic") { music.resumefade(0); } if (words[0] == "musicfadeout") { music.fadeout(false); } if (words[0] == "musicfadein") { music.fadein(); } if (words[0] == "trinketscriptmusic") { music.play(Music_PASSIONFOREXPLORING); } if (words[0] == "gotoposition") { //USAGE: gotoposition(x position, y position, gravity position) int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].xp = ss_toi(words[1]); obj.entities[player].yp = ss_toi(words[2]); obj.entities[player].lerpoldxp = obj.entities[player].xp; obj.entities[player].lerpoldyp = obj.entities[player].yp; } 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); } if (words[0] == "cutscene") { graphics.showcutscenebars = true; } if (words[0] == "endcutscene") { graphics.showcutscenebars = false; } if (words[0] == "audiopause") { if (words[1] == "on") { game.disabletemporaryaudiopause = false; } else if (words[1] == "off") { game.disabletemporaryaudiopause = true; } } if (words[0] == "untilbars") { if (graphics.showcutscenebars) { if (graphics.cutscenebarspos < 360) { scriptdelay = 1; position--; } } else { if (graphics.cutscenebarspos > 0) { scriptdelay = 1; position--; } } } else if (words[0] == "text") { // oh boy // first word is the colour. if (textbox_colours.count(words[1]) == 0) { // No colour named this, use gray words[1] = "gray"; } r = textbox_colours[words[1]].r; g = textbox_colours[words[1]].g; b = textbox_colours[words[1]].b; //next are the x,y coordinates textx = ss_toi(words[2]); texty = ss_toi(words[3]); textlarge = endsWith(words[4].c_str(), "l") || endsWith(words[4].c_str(), "L"); int lines = ss_toi(words[4]); //Number of lines for the textbox! txt.clear(); for (int i = 0; i < lines; i++) { position++; if (INBOUNDS_VEC(position, commands)) { txt.push_back(commands[position]); } } textboxtimer = 0; textcrewmateposition = TextboxCrewmatePosition(); textbox_sprites.clear(); textbox_image = TEXTIMAGE_NONE; textbox_absolutepos = false; textbox_force_outline = false; textbox_outline = false; } else if (words[0] == "position") { //are we facing left or right? for some objects we don't care, default at 0. j = 0; textbox_absolutepos = false; //the first word is the object to position relative to 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; } else if (words[1] == "absolute") { words[2] = "donothing"; j = -1; textbox_absolutepos = true; } else // Well, are they asking for a crewmate...? { i = getcrewmanfromname(words[1]); if (INBOUNDS_VEC(i, obj.entities)) { j = obj.entities[i].dir; } } if (INBOUNDS_VEC(i, obj.entities) && (j == 0 || j == 1)) { if (words[2] == "above") { textcrewmateposition.text_above = true; } textx = 0; texty = 0; textcrewmateposition.x = obj.entities[i].xp; textcrewmateposition.override_x = true; textcrewmateposition.y = obj.entities[i].yp; textcrewmateposition.override_y = true; textcrewmateposition.dir = j; } } 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(EntityColour_CREW_CYAN); j = obj.entities[i].dir; } else if (words[1] == "cyan") { i = obj.getcustomcrewman(EntityColour_CREW_CYAN); j = obj.entities[i].dir; } else if (words[1] == "purple") { i = obj.getcustomcrewman(EntityColour_CREW_PURPLE); j = obj.entities[i].dir; } else if (words[1] == "yellow") { i = obj.getcustomcrewman(EntityColour_CREW_YELLOW); j = obj.entities[i].dir; } else if (words[1] == "red") { i = obj.getcustomcrewman(EntityColour_CREW_RED); j = obj.entities[i].dir; } else if (words[1] == "green") { i = obj.getcustomcrewman(EntityColour_CREW_GREEN); j = obj.entities[i].dir; } else if (words[1] == "blue") { i = obj.getcustomcrewman(EntityColour_CREW_BLUE); 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; } if (INBOUNDS_VEC(i, obj.entities) && (j == 0 || j == 1)) { if (words[2] == "above") { textcrewmateposition.text_above = true; } textx = 0; texty = 0; textcrewmateposition.x = obj.entities[i].xp; textcrewmateposition.override_x = true; textcrewmateposition.y = obj.entities[i].yp; textcrewmateposition.override_y = true; textcrewmateposition.dir = j; } } else if (words[0] == "backgroundtext") { game.backgroundtext = true; } else if (words[0] == "textboxtimer") { textboxtimer = ss_toi(words[1]); } else if (words[0] == "textsprite") { TextboxSprite sprite; sprite.x = ss_toi(words[1]); sprite.y = ss_toi(words[2]); sprite.tile = ss_toi(words[3]); sprite.col = ss_toi(words[4]); textbox_sprites.push_back(sprite); } else if (words[0] == "textimage") { if (words[1] == "levelcomplete") { textbox_image = TEXTIMAGE_LEVELCOMPLETE; } else if (words[1] == "gamecomplete") { textbox_image = TEXTIMAGE_GAMECOMPLETE; } else { textbox_image = TEXTIMAGE_NONE; } } else if (words[0] == "textoutline") { if (words[1] == "default") { textbox_force_outline = false; } else if (words[1] == "on") { textbox_force_outline = true; textbox_outline = true; } else if (words[1] == "off") { textbox_force_outline = true; textbox_outline = false; } } else if (words[0] == "flipme") { textflipme = !textflipme; } else if (words[0] == "speak_active" || words[0] == "speak") { //Ok, actually display the textbox we've initilised now! //If using "speak", don't make the textbox active (so we can use multiple textboxes) if (txt.empty()) { txt.resize(1); } graphics.createtextboxreal(txt[0], textx, texty, r, g, b, textflipme); textflipme = false; graphics.setlarge(textlarge); textlarge = false; if ((int) txt.size() > 1) { for (i = 1; i < (int) txt.size(); i++) { graphics.addline(txt[i]); } } if (textboxtimer > 0) { graphics.textboxtimer(textboxtimer); } for (size_t i = 0; i < textbox_sprites.size(); i++) { graphics.addsprite(textbox_sprites[i].x, textbox_sprites[i].y, textbox_sprites[i].tile, textbox_sprites[i].col); } graphics.setimage(textbox_image); if (textbox_absolutepos) { graphics.textboxabsolutepos(textx, texty); } else { if (textx == -500 || textx == -1) { graphics.textboxcenterx(); textcrewmateposition.override_x = false; } if (texty == -500) { graphics.textboxcentery(); textcrewmateposition.override_y = false; } } if (textbox_force_outline) { graphics.textboxoutline(textbox_outline); } TextboxOriginalContext context = TextboxOriginalContext(); context.text_case = textcase; context.lines = std::vector(txt); context.script_name = scriptname; context.x = textx; context.y = texty; graphics.textboxcrewmateposition(&textcrewmateposition); graphics.textboxoriginalcontext(&context); graphics.textboxcase(textcase); if (map.custommode) { uint32_t flags = PR_FONT_IDX(font::font_idx_level, cl.rtl); if (font::font_idx_level_is_custom) { flags |= PR_FONT_IDX_IS_CUSTOM; } graphics.textboxprintflags(flags); } graphics.textboxtranslate(TEXTTRANSLATE_CUTSCENE, NULL); graphics.textboxapplyposition(); if (words[0] == "speak_active") { graphics.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; if (textbuttons) { graphics.textboxbuttons(); } textbuttons = false; textcase = 1; } else if (words[0] == "endtext") { graphics.textboxremove(); game.hascontrol = true; game.advancetext = false; } else if (words[0] == "endtextfast") { graphics.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(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp = 30; obj.entities[i].yp = 46; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; obj.entities[i].size = 13; obj.entities[i].colour = EntityColour_GRAVITRON_INDICATOR; 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(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].xp = 100; obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].size = 0; obj.entities[i].colour = EntityColour_CREW_CYAN; obj.entities[i].cx = 6; obj.entities[i].cy = 2; obj.entities[i].h = 21; } } else if (words[0] == "createentity") { std::string word6 = words[6]; std::string word7 = words[7]; std::string word8 = words[8]; std::string word9 = words[9]; if (!argexists[6]) words[6] = "0"; if (!argexists[7]) words[7] = "0"; if (!argexists[8]) words[8] = "320"; if (!argexists[9]) words[9] = "240"; obj.createentity( ss_toi(words[1]), ss_toi(words[2]), ss_toi(words[3]), ss_toi(words[4]), ss_toi(words[5]), ss_toi(words[6]), ss_toi(words[7]), ss_toi(words[8]), ss_toi(words[9]) ); words[6] = word6; words[7] = word7; words[8] = word8; words[9] = word9; } else if (words[0] == "createcrewman") { // Note: Do not change the "r" variable, it's used in custom levels // to have glitchy textbox colors, where the game treats the value // we set here as the red channel for the color. r = getcolorfromname(words[3]); if (r == -1) 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(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(ss_toi(words[1]), ss_toi(words[2]), 18, r, ss_toi(words[4]), ss_toi(words[5])); } } else if (words[0] == "changemood") { int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept if (INBOUNDS_VEC(i, obj.entities) && ss_toi(words[2]) == 0) { obj.entities[i].tile = 0; } else if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 144; } } else if (words[0] == "changecustommood") { if (words[1] == "player") { i=obj.getcustomcrewman(EntityColour_CREW_CYAN); obj.customcrewmoods[0]=ss_toi(words[2]); } else if (words[1] == "cyan") { i=obj.getcustomcrewman(EntityColour_CREW_CYAN); obj.customcrewmoods[0]=ss_toi(words[2]); } else if (words[1] == "customcyan") { i=obj.getcustomcrewman(EntityColour_CREW_CYAN); obj.customcrewmoods[0]=ss_toi(words[2]); } else if (words[1] == "red") { i=obj.getcustomcrewman(EntityColour_CREW_RED); obj.customcrewmoods[3]=ss_toi(words[2]); } else if (words[1] == "green") { i=obj.getcustomcrewman(EntityColour_CREW_GREEN); obj.customcrewmoods[4]=ss_toi(words[2]); } else if (words[1] == "yellow") { i=obj.getcustomcrewman(EntityColour_CREW_YELLOW); obj.customcrewmoods[2]=ss_toi(words[2]); } else if (words[1] == "blue") { i=obj.getcustomcrewman(EntityColour_CREW_BLUE); obj.customcrewmoods[5]=ss_toi(words[2]); } else if (words[1] == "purple") { i=obj.getcustomcrewman(EntityColour_CREW_PURPLE); obj.customcrewmoods[1]=ss_toi(words[2]); } else if (words[1] == "pink") { i=obj.getcustomcrewman(EntityColour_CREW_PURPLE); obj.customcrewmoods[1]=ss_toi(words[2]); } if (INBOUNDS_VEC(i, obj.entities) && ss_toi(words[2]) == 0) { obj.entities[i].tile = 0; } else if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 144; } } else if (words[0] == "changetile") { int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept if (INBOUNDS_VEC(i, obj.entities)) { 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") { game.gravitycontrol = !game.gravitycontrol; ++game.totalflips; } else { int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept if (INBOUNDS_VEC(i, obj.entities) && obj.entities[i].rule == 7) { obj.entities[i].rule = 6; obj.entities[i].tile = 0; } else if (INBOUNDS_VEC(i, obj.entities) && obj.getplayer() != i) // Don't destroy player entity { 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! int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile +=12; } } else if (words[0] == "changedir") { int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept if (INBOUNDS_VEC(i, obj.entities) && ss_toi(words[2]) == 0) { obj.entities[i].dir = 0; } else if (INBOUNDS_VEC(i, obj.entities)) { 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") { int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept 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"; } if (INBOUNDS_VEC(i, obj.entities)) { 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] == "activateteleporter") { i = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 6; obj.entities[i].colour = EntityColour_TELEPORTER_FLASHING; } } else if (words[0] == "changecolour") { int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = getcolorfromname(words[2]); } } else if (words[0] == "squeak") { if (words[1] == "player") { music.playef(Sound_VIRIDIAN); } else if (words[1] == "cyan") { music.playef(Sound_VIRIDIAN); } else if (words[1] == "red") { music.playef(Sound_VERMILION); } else if (words[1] == "green") { music.playef(Sound_VERDIGRIS); } else if (words[1] == "yellow") { music.playef(Sound_VITELLARY); } else if (words[1] == "blue") { music.playef(Sound_VICTORIA); } else if (words[1] == "purple") { music.playef(Sound_VIOLET); } else if (words[1] == "cry") { music.playef(Sound_CRY); } else if (words[1] == "terminal") { music.playef(Sound_TERMINALTEXT); } } 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; if (INBOUNDS_VEC(i, obj.entities)) { game.savex = obj.entities[i].xp ; game.savey = obj.entities[i].yp; } game.savegc = game.gravitycontrol; game.saverx = game.roomx; game.savery = game.roomy; if (INBOUNDS_VEC(i, obj.entities)) { game.savedir = obj.entities[i].dir; } game.checkpoint_save(); } else if (words[0] == "gamestate") { // Allow the gamestate command to bypass statelock, at least for now game.state = ss_toi(words[1]); if (argexists[2]) { game.statedelay = ss_toi(words[2]); } else { game.statedelay = 0; } } else if (words[0] == "textboxactive") { graphics.textboxactive(); } else if (words[0] == "gamemode") { if (words[1] == "teleporter") { game.gamestate = GAMEMODE; /* to set prevgamestate */ game.mapmenuchange(TELEPORTERMODE, false); game.useteleporter = false; //good heavens don't actually use it } else if (words[1] == "game") { graphics.resumegamemode = true; game.prevgamestate = GAMEMODE; } } else if (words[0] == "ifexplored") { if (map.isexplored(ss_toi(words[1]), ss_toi(words[2]))) { loadalts(words[3], raw_words[3]); position--; } } else if (words[0] == "iflast") { if (game.lastsaved==ss_toi(words[1])) { loadalts(words[2], raw_words[2]); position--; } } else if (words[0] == "ifskip") { if (game.nocutscenes) { loadalts(words[1], raw_words[1]); position--; } } else if (words[0] == "ifflag") { int flag = ss_toi(words[1]); if (INBOUNDS_ARR(flag, obj.flags) && obj.flags[flag]) { loadalts(words[2], raw_words[2]); position--; } } else if (words[0] == "ifcrewlost") { int crewmate = ss_toi(words[1]); if (INBOUNDS_ARR(crewmate, game.crewstats) && !game.crewstats[crewmate]) { loadalts(words[2], raw_words[2]); position--; } } else if (words[0] == "iftrinkets") { if (game.trinkets() >= ss_toi(words[1])) { loadalts(words[2], raw_words[2]); position--; } } else if (words[0] == "iftrinketsless") { if (game.stat_trinkets < ss_toi(words[1])) { loadalts(words[2], raw_words[2]); position--; } } else if (words[0] == "hidecoordinates") { map.setexplored(ss_toi(words[1]), ss_toi(words[2]), false); } else if (words[0] == "showcoordinates") { map.setexplored(ss_toi(words[1]), ss_toi(words[2]), true); } else if (words[0] == "hideship") { map.hideship(); } else if (words[0] == "showship") { map.showship(); } else if (words[0] == "showsecretlab") { map.setexplored(16, 5, true); map.setexplored(17, 5, true); map.setexplored(18, 5, true); map.setexplored(17, 6, true); map.setexplored(18, 6, true); map.setexplored(19, 6, true); map.setexplored(19, 7, true); map.setexplored(19, 8, true); } else if (words[0] == "hidesecretlab") { map.setexplored(16, 5, false); map.setexplored(17, 5, false); map.setexplored(18, 5, false); map.setexplored(17, 6, false); map.setexplored(18, 6, false); map.setexplored(19, 6, false); map.setexplored(19, 7, false); map.setexplored(19, 8, false); } else if (words[0] == "mapexplored") { if (words[1] == "none") { map.resetmap(); } else if (words[1] == "all") { map.fullmap(); } } else if (words[0] == "mapreveal") { if (words[1] == "on") { map.revealmap = true; } else if (words[1] == "off") { map.revealmap = false; } } 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") { int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].invis = true; } } else if (words[0] == "showplayer") { int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { obj.entities[player].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") { graphics.setfade(0); graphics.fademode = FADE_NONE; } else if (words[0] == "fadein") { graphics.fademode = FADE_START_FADEIN; } else if (words[0] == "fadeout") { graphics.fademode = FADE_START_FADEOUT; } else if (words[0] == "untilfade") { if (FADEMODE_IS_FADING(graphics.fademode)) { scriptdelay = 1; position--; } } else if (words[0] == "entersecretlab") { game.unlocknum(Unlock_SECRETLAB); game.insecretlab = true; map.fullmap(); } else if (words[0] == "leavesecretlab") { game.insecretlab = false; } else if (words[0] == "resetgame") { map.resetmap(); map.resetplayer(); graphics.towerbg.tdrawback = true; obj.resetallflags(); i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].tile = 0; } for (i = 0; i < 100; i++) { obj.collect[i] = false; obj.customcollect[i] = false; } game.deathcounts = 0; game.advancetext = false; game.hascontrol = true; game.resetgameclock(); game.gravitycontrol = 0; game.teleport = false; game.companion = 0; 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") { loadalts(words[1], raw_words[1]); position--; } else if (words[0] == "rollcredits") { if (map.custommode && !map.custommodeforreal) { game.returntoeditor(); ed.show_note(loc::gettext("Rolled credits")); } else { game.gamestate = GAMECOMPLETE; graphics.fademode = FADE_START_FADEIN; game.creditposition = 0; game.skip_message_timer = 1000; game.old_skip_message_timer = 1000; } } else if (words[0] == "finalmode") { map.finalmode = true; map.gotoroom(ss_toi(words[1]), ss_toi(words[2])); } 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") { int crewmate = getcrewmanfromname(words[1]); if (crewmate != -1) i = crewmate; // Ensure AEM is kept crewmate = getcrewmanfromname(words[2]); if (crewmate != -1) j = crewmate; // Ensure AEM is kept if (INBOUNDS_VEC(i, obj.entities) && INBOUNDS_VEC(j, obj.entities) && obj.entities[j].xp > obj.entities[i].xp + 5) { obj.entities[i].dir = 1; } else if (INBOUNDS_VEC(i, obj.entities) && INBOUNDS_VEC(j, obj.entities) && obj.entities[j].xp < obj.entities[i].xp - 5) { obj.entities[i].dir = 0; } } else if (words[0] == "jukebox") { for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].type == EntityType_TERMINAL) { obj.entities[j].colour = EntityColour_INACTIVE_ENTITY; } } if (ss_toi(words[1]) == 1) { obj.createblock(5, 88 - 4, 80, 20, 16, 25); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 88 && obj.entities[j].yp==80) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 2) { obj.createblock(5, 128 - 4, 80, 20, 16, 26); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 128 && obj.entities[j].yp==80) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 3) { obj.createblock(5, 176 - 4, 80, 20, 16, 27); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 176 && obj.entities[j].yp==80) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 4) { obj.createblock(5, 216 - 4, 80, 20, 16, 28); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 216 && obj.entities[j].yp==80) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 5) { obj.createblock(5, 88 - 4, 128, 20, 16, 29); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 88 && obj.entities[j].yp==128) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 6) { obj.createblock(5, 176 - 4, 128, 20, 16, 30); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 176 && obj.entities[j].yp==128) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 7) { obj.createblock(5, 40 - 4, 40, 20, 16, 31); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 40 && obj.entities[j].yp==40) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 8) { obj.createblock(5, 216 - 4, 128, 20, 16, 32); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 216 && obj.entities[j].yp==128) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 9) { obj.createblock(5, 128 - 4, 128, 20, 16, 33); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 128 && obj.entities[j].yp==128) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } else if (ss_toi(words[1]) == 10) { obj.createblock(5, 264 - 4, 40, 20, 16, 34); for (j = 0; j < (int) obj.entities.size(); j++) { if (obj.entities[j].xp == 264 && obj.entities[j].yp==40) { obj.entities[j].colour = EntityColour_ACTIVE_ENTITY; } } } } else if (words[0] == "createactivityzone") { int crew_color = i; // stay consistent with past behavior! if (words[1] == "red") { i = 3; crew_color = EntityColour_CREW_RED; } else if (words[1] == "green") { i = 4; crew_color = EntityColour_CREW_GREEN; } else if (words[1] == "yellow") { i = 2; crew_color = EntityColour_CREW_YELLOW; } else if (words[1] == "blue") { i = 5; crew_color = EntityColour_CREW_BLUE; } else if (words[1] == "purple") { i = 1; crew_color = EntityColour_CREW_PURPLE; } int crewman = obj.getcrewman(crew_color); if (INBOUNDS_VEC(crewman, obj.entities) && crew_color == EntityColour_CREW_GREEN) { obj.createblock(5, obj.entities[crewman].xp - 32, obj.entities[crewman].yp-20, 96, 60, i, "", (i == 35)); } else if (INBOUNDS_VEC(crewman, obj.entities)) { obj.createblock(5, obj.entities[crewman].xp - 32, 0, 96, 240, i, "", (i == 35)); } } else if (words[0] == "setactivitycolour") { obj.customactivitycolour = words[1]; } else if (words[0] == "setactivitytext") { ++position; if (INBOUNDS_VEC(position, commands)) { obj.customactivitytext = commands[position]; } } else if (words[0] == "setactivityposition") { obj.customactivitypositiony = ss_toi(words[1]); } 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(i, 153, 18, 14, 0, 17, 0); i += 25; } if (game.crewstats[3] && game.lastsaved!=3) { obj.createentity(i, 153, 18, 15, 0, 17, 0); i += 25; } if (game.crewstats[4] && game.lastsaved!=4) { obj.createentity(i, 153, 18, 13, 0, 17, 0); i += 25; } if (game.crewstats[5] && game.lastsaved!=5) { obj.createentity(i, 153, 18, 16, 0, 17, 0); i += 25; } } else if (words[0] == "restoreplayercolour") { i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = cl.player_colour; } game.savecolour = cl.player_colour; } else if (words[0] == "changeplayercolour") { i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = getcolorfromname(words[1]); } } else if (words[0] == "changerespawncolour") { game.savecolour = getcolorfromname(words[1]); } else if (words[0] == "altstates") { obj.altstates = ss_toi(words[1]); } else if (words[0] == "activeteleporter") { i = obj.getteleporter(); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].colour = EntityColour_TELEPORTER_ACTIVE; } } else if (words[0] == "foundtrinket") { music.silencedasmusik(); music.playef(Sound_TRINKET); size_t trinket = ss_toi(words[1]); if (trinket < SDL_arraysize(obj.collect)) { obj.collect[trinket] = true; } graphics.textboxremovefast(); graphics.createtextboxflipme("", 50, 85, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundtrinket_textbox1); graphics.textboxapplyposition(); graphics.createtextboxflipme("", 50, 95, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxindex(graphics.textboxes.size() - 2); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundtrinket_textbox2); graphics.textboxapplyposition(); 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(Sound_TRINKET); graphics.textboxremovefast(); graphics.createtextbox("", 50, 85, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxcentery(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundlab_textbox1); graphics.textboxapplyposition(); 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") { graphics.textboxremovefast(); graphics.createtextbox("", 50, 85, TEXT_COLOUR("gray")); graphics.textboxprintflags(PR_FONT_INTERFACE); graphics.textboxcenterx(); graphics.textboxcentery(); graphics.textboxtranslate(TEXTTRANSLATE_FUNCTION, foundlab_textbox2); graphics.textboxapplyposition(); 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 < (int) obj.entities.size(); i++) { if (obj.entities[i].rule == 6 || obj.entities[i].rule == 0) { obj.entities[i].tile = 144; } } } else if (words[0] == "everybodyhappy") { for (i = 0; i < (int) obj.entities.size(); i++) { if (obj.entities[i].rule == 6 || obj.entities[i].rule == 0) { obj.entities[i].tile = 0; } } } else if (words[0] == "startintermission2") { map.finalmode = true; //Enable final level mode 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); } else if (words[0] == "telesave") { if (!game.intimetrial && !game.nodeathmode && !game.inintermission) game.savetele(); } else if (words[0] == "createlastrescued") { r = graphics.crewcolour(game.lastsaved); if (r == EntityColour_CREW_CYAN || r == EntityColour_CREW_PURPLE) { r = EntityColour_CREW_GRAY; // Default to gray if invalid color. } obj.createentity(200, 153, 18, r, 0, 19, 30); i = obj.getcrewman(game.lastsaved); if (INBOUNDS_VEC(i, obj.entities)) { obj.entities[i].dir = 1; } } else if (words[0] == "specialline") { //Localization is handled with regular cutscene dialogue switch(ss_toi(words[1])) { case 1: txt.resize(1); txt[0] = "I'm worried about " + game.unrescued() + ", Doctor!"; break; case 2: txt.resize(3); if (game.crewrescued() < 5) { txt[1] = "to helping you find the"; txt[2] = "rest of the crew!"; } else { txt.resize(2); txt[1] = "to helping you find " + game.unrescued() + "!"; } break; } } else if (words[0] == "trinketbluecontrol") { if (game.trinkets() == 20 && obj.flags[67]) { load("talkblue_trinket6"); position--; } else if (game.trinkets() >= 19 && !obj.flags[67]) { 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]) { //game complete load("talkred_13"); position--; } else if (obj.flags[35] && !obj.flags[52]) { //Intermission level obj.flags[52] = true; load("talkred_9"); position--; } else if (!obj.flags[51]) { //We're back home! obj.flags[51] = true; load("talkred_5"); position--; } else if (!obj.flags[48] && game.crewstats[5]) { //Victoria's back obj.flags[48] = true; load("talkred_6"); position--; } else if (!obj.flags[49] && game.crewstats[4]) { //Verdigris' back obj.flags[49] = true; load("talkred_7"); position--; } else if (!obj.flags[50] && game.crewstats[2]) { //Vitellary's back obj.flags[50] = true; load("talkred_8"); position--; } else if (!obj.flags[45] && !game.crewstats[5]) { obj.flags[45] = true; load("talkred_2"); position--; } else if (!obj.flags[46] && !game.crewstats[4]) { obj.flags[46] = true; load("talkred_3"); position--; } else if (!obj.flags[47] && !game.crewstats[2]) { obj.flags[47] = true; load("talkred_4"); position--; } else { obj.flags[45] = false; obj.flags[46] = false; obj.flags[47] = false; 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]) { //game complete load("talkgreen_10"); position--; } else if (obj.flags[34] && !obj.flags[57]) { //Intermission level obj.flags[57] = true; load("talkgreen_7"); position--; } else if (!obj.flags[53]) { //Home! obj.flags[53] = true; load("talkgreen_6"); position--; } else if (!obj.flags[54] && game.crewstats[2]) { obj.flags[54] = true; load("talkgreen_5"); position--; } else if (!obj.flags[55] && game.crewstats[3]) { obj.flags[55] = true; load("talkgreen_4"); position--; } else if (!obj.flags[56] && game.crewstats[5]) { obj.flags[56] = true; load("talkgreen_3"); position--; } else if (!obj.flags[58]) { obj.flags[58] = true; 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]) { //game complete, everything changes for victoria if (obj.flags[41] && !obj.flags[42]) { //second trinket conversation obj.flags[42] = true; load("talkblue_trinket2"); position--; } else if (!obj.flags[41] && !obj.flags[42]) { //Third trinket conversation obj.flags[42] = true; 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] && !obj.flags[40]) { //Intermission level obj.flags[40] = true; load("talkblue_7"); position--; } else if (!obj.flags[36] && game.crewstats[5]) { //Back on the ship! obj.flags[36] = true; load("talkblue_3"); position--; } else if (!obj.flags[41] && game.crewrescued() <= 4) { //First trinket conversation obj.flags[41] = true; load("talkblue_trinket1"); position--; } else if (obj.flags[41] && !obj.flags[42] && game.crewrescued() == 5) { //second trinket conversation obj.flags[42] = true; load("talkblue_trinket2"); position--; } else if (!obj.flags[41] && !obj.flags[42] && game.crewrescued() == 5) { //Third trinket conversation obj.flags[42] = true; load("talkblue_trinket3"); position--; } else if (!obj.flags[37] && game.crewstats[2]) { obj.flags[37] = true; load("talkblue_4"); position--; } else if (!obj.flags[38] && game.crewstats[3]) { obj.flags[38] = true; load("talkblue_5"); position--; } else if (!obj.flags[39] && game.crewstats[4]) { obj.flags[39] = true; 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]) { //game complete load("talkyellow_11"); position--; } else if (obj.flags[32] && !obj.flags[31]) { //Intermission level obj.flags[31] = true; load("talkyellow_6"); position--; } else if (!obj.flags[27] && game.crewstats[2]) { //Back on the ship! obj.flags[27] = true; load("talkyellow_10"); position--; } else if (!obj.flags[43] && 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] = true; obj.flags[42] = true; obj.flags[41] = true; load("talkyellow_trinket1"); position--; } else if (!obj.flags[24] && game.crewstats[5]) { obj.flags[24] = true; load("talkyellow_8"); position--; } else if (!obj.flags[26] && game.crewstats[4]) { obj.flags[26] = true; load("talkyellow_7"); position--; } else if (!obj.flags[25] && game.crewstats[3]) { obj.flags[25] = true; load("talkyellow_9"); position--; } else if (!obj.flags[28]) { obj.flags[28] = true; load("talkyellow_3"); position--; } else if (!obj.flags[29]) { obj.flags[29] = true; load("talkyellow_4"); position--; } else if (!obj.flags[30]) { obj.flags[30] = true; load("talkyellow_5"); position--; } else if (!obj.flags[23]) { obj.flags[23] = true; load("talkyellow_2"); position--; } else { load("talkyellow_1"); position--; obj.flags[23] = false; } } else if (words[0] == "purplecontrol") { //Controls Purple's conversion //Crew rescued: if (game.insecretlab) { load("talkpurple_9"); position--; } else if (obj.flags[67]) { //game complete load("talkpurple_8"); position--; } else if (!obj.flags[17] && game.crewstats[4]) { obj.flags[17] = true; load("talkpurple_6"); position--; } else if (!obj.flags[15] && game.crewstats[5]) { obj.flags[15] = true; load("talkpurple_4"); position--; } else if (!obj.flags[16] && game.crewstats[3]) { obj.flags[16] = true; load("talkpurple_5"); position--; } else if (!obj.flags[18] && game.crewstats[2]) { obj.flags[18] = true; load("talkpurple_7"); position--; } else if (obj.flags[19] && !obj.flags[20] && !obj.flags[21]) { //intermission one: if played one / not had first conversation / not played two [conversation one] obj.flags[21] = true; load("talkpurple_intermission1"); position--; } else if (obj.flags[20] && obj.flags[21] && !obj.flags[22]) { //intermission two: if played two / had first conversation / not had second conversation [conversation two] obj.flags[22] = true; load("talkpurple_intermission2"); position--; } else if (obj.flags[20] && !obj.flags[21] && !obj.flags[22]) { //intermission two: if played two / not had first conversation / not had second conversation [conversation three] obj.flags[22] = true; load("talkpurple_intermission3"); position--; } else if (!obj.flags[12]) { //Intro conversation obj.flags[12] = true; load("talkpurple_intro"); position--; } else if (!obj.flags[14]) { //Shorter intro conversation obj.flags[14] = true; 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--; } } } else if (words[0] == "textbuttons") { // Parse buttons in the next textbox textbuttons = true; } else if (words[0] == "textcase") { // Used to disambiguate identical textboxes for translations (1 by default) const int number = ss_toi(words[1]); if (number >= 1 && number <= 255) { textcase = number; } } else if (words[0] == "loadtext") { if (map.custommode) { loc::lang_custom = raw_words[1]; loc::loadtext_custom(NULL); } } else if (words[0] == "iflang") { if (loc::lang == raw_words[1]) { loadalts("custom_" + words[2], "custom_" + raw_words[2]); position--; } } else if (words[0] == "setfont" || words[0] == "setrtl") { if (words[0] == "setrtl") { if (words[1] == "on") { cl.rtl = true; } else if (words[1] == "off") { cl.rtl = false; } } else if (words[1] == "") { font::set_level_font(cl.level_font_name.c_str()); } else { font::set_level_font(raw_words[1].c_str()); } if (words[0] == "setfont" && argexists[2] && words[2] == "all") { /* Immediately update all text boxes. */ uint32_t flags = PR_FONT_IDX(font::font_idx_level, cl.rtl); if (font::font_idx_level_is_custom) { flags |= PR_FONT_IDX_IS_CUSTOM; } for (size_t i = 0; i < graphics.textboxes.size(); i++) { graphics.textboxes[i].print_flags = flags; graphics.textboxes[i].resize(); } } } position++; } else { running = false; } // Don't increment if we're at the max, signed int overflow is UB if (execution_counter == SHRT_MAX) { // We must be in an infinite loop vlog_warn("Warning: execution counter got to %i, stopping script", SHRT_MAX); running = false; } else { execution_counter++; } } if(scriptdelay>0) { scriptdelay--; } } static void gotoerrorloadinglevel(void) { game.quittomenu(); game.createmenu(Menu::errorloadinglevel); music.currentsong = -1; /* otherwise music.play won't work */ music.play(Music_PRESENTINGVVVVVV); } #define DECLARE_MODE_FUNC(funcname, modename) \ static bool funcname(const enum StartMode mode) \ { \ return mode >= Start_FIRST_##modename && mode <= Start_LAST_##modename; \ } DECLARE_MODE_FUNC(is_no_death_mode, NODEATHMODE) DECLARE_MODE_FUNC(is_intermission_1, INTERMISSION1) DECLARE_MODE_FUNC(is_intermission_2, INTERMISSION2) #undef DECLARE_MODE_FUNC void scriptclass::startgamemode(const enum StartMode mode) { if (mode == Start_QUIT) { VVV_exit(0); } struct { bool initialized; int size; int cx; int cy; int w; int h; } player_hitbox; SDL_zero(player_hitbox); if (GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2)) { /* Preserve player hitbox */ const int player_idx = obj.getplayer(); if (INBOUNDS_VEC(player_idx, obj.entities)) { const entclass* player = &obj.entities[player_idx]; player_hitbox.initialized = true; player_hitbox.size = player->size; player_hitbox.cx = player->cx; player_hitbox.cy = player->cy; player_hitbox.w = player->w; player_hitbox.h = player->h; } } /* State which needs to be reset before gameplay starts * ex. before custom levels get loaded */ switch (mode) { case Start_EDITORPLAYTESTING: break; default: textbox_colours.clear(); add_default_colours(); cl.onewaycol_override = false; cl.player_colour = 0; break; } hardreset(); if (mode == Start_EDITOR) { game.gamestate = EDITORMODE; } else { game.gamestate = GAMEMODE; } // Font handling switch (mode) { case Start_EDITORPLAYTESTING: case Start_CUSTOM: case Start_CUSTOM_QUICKSAVE: break; case Start_EDITOR: font::set_level_font_new(); break; default: font::set_level_font_interface(); } /* Indicate invincibility, glitchrunner, etc. for all modes except these */ switch (mode) { case Start_EDITOR: case Start_CUTSCENETEST: break; case Start_QUIT: VVV_unreachable(); default: /* If there's editor return text, make this show up after it */ game.mode_indicator_timer = ed.return_message_timer + 2000; game.old_mode_indicator_timer = game.mode_indicator_timer; } game.jumpheld = true; switch (mode) { case Start_MAINGAME: case Start_MAINGAME_TELESAVE: case Start_MAINGAME_QUICKSAVE: case Start_NODEATHMODE_WITHCUTSCENES: case Start_NODEATHMODE_NOCUTSCENES: game.nodeathmode = is_no_death_mode(mode); game.nocutscenes = (mode == Start_NODEATHMODE_NOCUTSCENES); game.start(); switch (mode) { case Start_MAINGAME_TELESAVE: game.loadtele(); graphics.fademode = FADE_START_FADEIN; break; case Start_MAINGAME_QUICKSAVE: game.loadquick(); graphics.fademode = FADE_START_FADEIN; break; default: graphics.showcutscenebars = true; graphics.setbars(320); load("intro"); if (!game.nocompetitive()) { game.nodeatheligible = true; vlog_debug("NDM trophy is eligible."); } else { game.invalidate_ndm_trophy(); } } break; case Start_TIMETRIAL_SPACESTATION1: case Start_TIMETRIAL_LABORATORY: case Start_TIMETRIAL_TOWER: case Start_TIMETRIAL_SPACESTATION2: case Start_TIMETRIAL_WARPZONE: case Start_TIMETRIAL_FINALLEVEL: music.fadeout(); game.nocutscenes = true; game.intimetrial = true; game.timetrialcountdown = 150; game.timetriallevel = mode - Start_FIRST_TIMETRIAL; if (map.invincibility) { game.sabotage_time_trial(); } switch (mode) { case Start_TIMETRIAL_SPACESTATION1: game.timetrialpar = 75; game.timetrialshinytarget = 2; break; case Start_TIMETRIAL_LABORATORY: game.timetrialpar = 165; game.timetrialshinytarget = 4; break; case Start_TIMETRIAL_TOWER: game.timetrialpar = 105; game.timetrialshinytarget = 2; break; case Start_TIMETRIAL_SPACESTATION2: game.timetrialpar = 200; game.timetrialshinytarget = 5; break; case Start_TIMETRIAL_WARPZONE: game.timetrialpar = 120; game.timetrialshinytarget = 1; break; case Start_TIMETRIAL_FINALLEVEL: game.timetrialpar = 135; game.timetrialshinytarget = 1; map.finalmode = true; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; break; default: VVV_unreachable(); } game.starttrial(game.timetriallevel); if (game.translator_exploring) { game.timetrialcountdown = 0; game.timetrialparlost = true; map.fullmap(); } graphics.fademode = FADE_START_FADEIN; break; case Start_SECRETLAB: game.startspecial(0); /* Unlock the entire map */ map.fullmap(); /* Give all 20 trinkets */ SDL_memset(obj.collect, true, sizeof(obj.collect[0]) * 20); i = 400; /* previously a nested for-loop set this */ game.insecretlab = true; map.showteleporters = true; music.play(Music_PIPEDREAM); graphics.fademode = FADE_START_FADEIN; break; case Start_INTERMISSION1_VITELLARY: case Start_INTERMISSION1_VERMILION: case Start_INTERMISSION1_VERDIGRIS: case Start_INTERMISSION1_VICTORIA: case Start_INTERMISSION2_VITELLARY: case Start_INTERMISSION2_VERMILION: case Start_INTERMISSION2_VERDIGRIS: case Start_INTERMISSION2_VICTORIA: music.fadeout(); switch (mode) { case Start_INTERMISSION1_VITELLARY: case Start_INTERMISSION2_VITELLARY: game.lastsaved = 2; break; case Start_INTERMISSION1_VERMILION: case Start_INTERMISSION2_VERMILION: game.lastsaved = 3; break; case Start_INTERMISSION1_VERDIGRIS: case Start_INTERMISSION2_VERDIGRIS: game.lastsaved = 4; break; case Start_INTERMISSION1_VICTORIA: case Start_INTERMISSION2_VICTORIA: game.lastsaved = 5; break; default: VVV_unreachable(); } game.crewstats[game.lastsaved] = true; game.inintermission = true; if (is_intermission_1(mode)) { game.companion = 11; game.supercrewmate = true; game.scmprogress = 0; } map.finalmode = true; map.final_colormode = false; map.final_mapcol = 0; map.final_colorframe = 0; game.startspecial(1); if (is_intermission_1(mode)) { load("intermission_1"); } else if (is_intermission_2(mode)) { load("intermission_2"); } break; case Start_EDITOR: cl.reset(); ed.reset(); music.fadeout(); map.custommode = true; map.custommodeforreal = false; graphics.fademode = FADE_START_FADEIN; break; case Start_EDITORPLAYTESTING: music.fadeout(); //If warpdir() is used during playtesting, we need to set it back after! for (int j = 0; j < cl.maxheight; j++) { for (int i = 0; i < cl.maxwidth; i++) { ed.kludgewarpdir[i+(j*cl.maxwidth)]=cl.roomproperties[i+(j*cl.maxwidth)].warpdir; } } game.customstart(); ed.ghosts.clear(); map.custommode = true; map.custommodeforreal = false; map.customshowmm = true; map.revealmap = true; if (cl.levmusic > 0) { music.play(cl.levmusic); } else { music.currentsong = -1; } break; case Start_CUSTOM: case Start_CUSTOM_QUICKSAVE: { map.custommodeforreal = true; map.custommode = true; std::string filename = std::string(cl.ListOfMetaData[game.playcustomlevel].filename); if (!cl.load(filename)) { gotoerrorloadinglevel(); return; } cl.findstartpoint(); map.customshowmm = true; map.revealmap = true; music.fadeout(); game.customstart(); switch (mode) { case Start_CUSTOM: if (cl.levmusic > 0) { music.play(cl.levmusic); } else { music.currentsong = -1; } break; case Start_CUSTOM_QUICKSAVE: game.customloadquick(cl.ListOfMetaData[game.playcustomlevel].filename); break; default: VVV_unreachable(); } graphics.fademode = FADE_START_FADEIN; break; } case Start_CUTSCENETEST: music.fadeout(); game.translator_exploring = true; game.translator_cutscene_test = true; game.startspecial(2); game.mapheld = true; loadtest(game.cutscenetest_menu_play_id); break; case Start_QUIT: VVV_unreachable(); break; } game.gravitycontrol = game.savegc; graphics.flipmode = graphics.setflipmode; if (!map.custommode && !graphics.setflipmode) { /* Invalidate Flip Mode trophy */ obj.flags[73] = true; } obj.entities.clear(); obj.createentity(game.savex, game.savey, 0, 0); if (player_hitbox.initialized) { /* Restore player hitbox */ const int player_idx = obj.getplayer(); if (INBOUNDS_VEC(player_idx, obj.entities)) { entclass* player = &obj.entities[player_idx]; player->size = player_hitbox.size; player->cx = player_hitbox.cx; player->cy = player_hitbox.cy; player->w = player_hitbox.w; player->h = player_hitbox.h; } } map.resetplayer(); map.gotoroom(game.saverx, game.savery); map.initmapdata(); if (map.custommode) { cl.generatecustomminimap(); } /* If we are spawning in a tower, ensure variables are set correctly */ if (map.towermode) { map.resetplayer(); i = obj.getplayer(); if (INBOUNDS_VEC(i, obj.entities)) { map.ypos = obj.entities[i].yp - 120; map.oldypos = map.ypos; } map.setbgobjlerp(graphics.towerbg); map.cameramode = 0; map.colsuperstate = 0; } } void scriptclass::teleport(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 if (INBOUNDS_VEC(i, obj.entities)) { 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! obj.entities[i].lerpoldxp = obj.entities[i].xp; obj.entities[i].lerpoldyp = obj.entities[i].yp; } 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); j = obj.getteleporter(); if (INBOUNDS_VEC(j, obj.entities)) { obj.entities[j].state = 2; } game.teleport_to_new_area = false; if (INBOUNDS_VEC(j, obj.entities)) { 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; int player = obj.getplayer(); if (INBOUNDS_VEC(player, obj.entities)) { game.savedir = obj.entities[player].dir; } if(game.teleport_to_x==0 && game.teleport_to_y==0) { game.setstate(4020); } else if(game.teleport_to_x==0 && game.teleport_to_y==16) { game.setstate(4030); } else if(game.teleport_to_x==7 && game.teleport_to_y==9) { game.setstate(4040); } else if(game.teleport_to_x==8 && game.teleport_to_y==11) { game.setstate(4050); } else if(game.teleport_to_x==14 && game.teleport_to_y==19) { game.setstate(4030); } else if(game.teleport_to_x==17 && game.teleport_to_y==12) { game.setstate(4020); } else if(game.teleport_to_x==17 && game.teleport_to_y==17) { game.setstate(4020); } else if(game.teleport_to_x==18 && game.teleport_to_y==7) { game.setstate(4060); } else { game.setstate(4010); } if (game.teleportscript != "") { game.setstate(0); load(game.teleportscript); game.teleportscript = ""; } else { //change music based on location if (game.teleport_to_x == 2 && game.teleport_to_y == 11) { /* Special case: Ship music needs to be set here; * ship teleporter on music map is -1 for jukebox. */ music.niceplay(Music_PASSIONFOREXPLORING); } game.savetele_textbox(); } } void scriptclass::hardreset(void) { const bool version2_2 = GlitchrunnerMode_less_than_or_equal(Glitchrunner2_2); if (game.seed_use_sdl_getticks) { /* The RNG is 32-bit. We don't _really_ need 64-bit... */ xoshiro_seed((Uint32) SDL_GetTicks64()); } else { xoshiro_seed(game.framecounter); } //Game: game.hascontrol = true; game.gravitycontrol = 0; game.teleport = false; game.companion = 0; if (!version2_2) { // Ironically, resetting more variables makes the janky fadeout system in glitchrunnermode even more glitchy game.roomx = 0; game.roomy = 0; } game.prevroomx = 0; game.prevroomy = 0; 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; game.nodeatheligible = false; for (i = 0; i < (int) SDL_arraysize(game.crewstats); i++) { game.crewstats[i] = false; } game.crewstats[0] = true; game.lastsaved = 0; game.deathcounts = 0; game.gameoverdelay = 0; game.resetgameclock(); game.gamesaved = false; game.gamesavefailed = false; game.savetime = "00:00"; game.savetrinkets = 0; if (!version2_2) { // Ironically, resetting more variables makes the janky fadeout system in glitchrunnermode even more glitchy game.saverx = 0; game.savery = 0; game.savex = 0; game.savey = 0; game.savegc = 0; } game.savecolour = cl.player_colour; game.intimetrial = false; game.timetrialcountdown = 0; game.timetrialshinytarget = 0; game.timetrialparlost = false; game.timetrialpar = 0; game.timetrialcheater = false; game.translator_exploring = game.start_translator_exploring; game.start_translator_exploring = false; game.translator_exploring_allowtele = false; game.translator_cutscene_test = false; game.totalflips = 0; game.hardestroom = "Welcome Aboard"; game.hardestroomdeaths = 0; game.hardestroom_x = 13; game.hardestroom_y = 5; game.hardestroom_specialname = false; game.hardestroom_finalstretch = false; game.currentroomdeaths=0; game.swnmode = false; game.swntimer = 0; game.swngame = SWN_NONE; // 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.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.unlockstate(); game.state = 0; game.statedelay = 0; game.hascontrol = true; if (!GlitchrunnerMode_less_than_or_equal(Glitchrunner2_0)) { // Keep the "- Press ACTION to advance text -" prompt around, // apparently the speedrunners call it the "text storage" glitch game.advancetext = false; } game.pausescript = false; game.completestop = false; game.flashlight = 0; game.screenshake = 0; game.activeactivity = -1; game.act_fade = 5; game.disabletemporaryaudiopause = true; game.ingame_titlemode = false; //dwgraphicsclass graphics.backgrounddrawn = false; graphics.textboxes.clear(); graphics.flipmode = false; //This will be reset if needs be elsewhere graphics.showcutscenebars = false; graphics.setbars(0); //mapclass map.warpx = false; map.warpy = false; map.showteleporters = false; map.showtargets = false; map.showtrinkets = false; map.finalmode = false; map.finalstretch = false; 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.custommode=false; map.custommodeforreal=false; if (!version2_2) { // Ironically, resetting more variables makes the janky fadeout system even more glitchy map.towermode=false; } map.cameraseekframe = 0; map.resumedelay = 0; graphics.towerbg.scrolldir = 0; map.customshowmm = true; map.revealmap = true; SDL_memset(map.roomdeaths, 0, sizeof(map.roomdeaths)); SDL_memset(map.roomdeathsfinal, 0, sizeof(map.roomdeathsfinal)); map.resetmap(); map.currentregion = 0; SDL_zeroa(map.region); //entityclass obj.nearelephant = false; obj.upsetmode = false; obj.upset = 0; obj.trophytext = 0 ; obj.trophytype = 0; obj.altstates = 0; obj.resetallflags(); for (i = 0; i < (int) SDL_arraysize(obj.customcrewmoods); i++){ obj.customcrewmoods[i]=true; } SDL_memset(obj.collect, false, sizeof(obj.collect)); SDL_memset(obj.customcollect, false, sizeof(obj.customcollect)); i = 100; //previously a for-loop iterating over collect/customcollect set this to 100 int theplayer = obj.getplayer(); if (INBOUNDS_VEC(theplayer, obj.entities)){ obj.entities[theplayer].tile = 0; } /* Disable duplicate player entities */ for (int i = 0; i < (int) obj.entities.size(); i++) { if (obj.entities[i].rule == 0 && i != theplayer) { obj.disableentity(i); } } obj.customscript = ""; //Script Stuff position = 0; commands.clear(); scriptdelay = 0; scriptname = "null"; running = false; for (size_t ii = 0; ii < NUM_SCRIPT_ARGS; ++ii) { words[ii] = ""; raw_words[ii] = ""; } obj.customactivitycolour = ""; obj.customactivitytext = ""; obj.customactivitypositiony = -1; } bool scriptclass::loadcustom(const std::string& t) { //this magic function breaks down the custom script and turns into real scripting! std::string cscriptname=""; for(size_t i=0; i=7) cscriptname+=t[i]; } std::string tstring; std::vector* contents = NULL; for(size_t i = 0; i < customscripts.size(); i++){ Script& script_ = customscripts[i]; if(script_.name == cscriptname){ contents = &script_.contents; break; } } if(contents == NULL){ return false; } std::vector& lines = *contents; //Ok, we've got the relavent script segment, we do a pass to assess it, then run it! int customcutscenemode=0; for(size_t i=0; i= 0 ? ti : 1; for (int ti2 = 0; ti2 < nti; ti2++) { i++; if (INBOUNDS_VEC(i, lines)) { add(lines[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(player,0,0,"+words[1]+")"); int ti=help.Int(words[1].c_str()); int nti = ti>=0 ? ti : 1; for(int ti2=0; ti2 #include #include #include #include "Textbox.h" #define filllines(lines) commands.insert(commands.end(), lines, lines + SDL_arraysize(lines)) #ifdef SCRIPT_DEFINITION #define TEXT_COLOUR(a) textbox_colours[a] #else #define TEXT_COLOUR(a) script.textbox_colours[a] #endif struct Script { std::string name; std::vector contents; }; #define NUM_SCRIPT_ARGS 40 enum StartMode { Start_MAINGAME, Start_MAINGAME_TELESAVE, Start_MAINGAME_QUICKSAVE, Start_TIMETRIAL_SPACESTATION1, Start_TIMETRIAL_LABORATORY, Start_TIMETRIAL_TOWER, Start_TIMETRIAL_SPACESTATION2, Start_TIMETRIAL_WARPZONE, Start_TIMETRIAL_FINALLEVEL, Start_NODEATHMODE_WITHCUTSCENES, Start_NODEATHMODE_NOCUTSCENES, Start_SECRETLAB, Start_INTERMISSION1_VITELLARY, Start_INTERMISSION1_VERMILION, Start_INTERMISSION1_VERDIGRIS, Start_INTERMISSION1_VICTORIA, Start_INTERMISSION2_VITELLARY, Start_INTERMISSION2_VERMILION, Start_INTERMISSION2_VERDIGRIS, Start_INTERMISSION2_VICTORIA, Start_EDITOR, Start_EDITORPLAYTESTING, Start_CUSTOM, Start_CUSTOM_QUICKSAVE, Start_QUIT, Start_CUTSCENETEST, Start_FIRST_NODEATHMODE = Start_NODEATHMODE_WITHCUTSCENES, Start_LAST_NODEATHMODE = Start_NODEATHMODE_NOCUTSCENES, Start_FIRST_INTERMISSION1 = Start_INTERMISSION1_VITELLARY, Start_LAST_INTERMISSION1 = Start_INTERMISSION1_VICTORIA, Start_FIRST_INTERMISSION2 = Start_INTERMISSION2_VITELLARY, Start_LAST_INTERMISSION2 = Start_INTERMISSION2_VICTORIA, Start_FIRST_TIMETRIAL = Start_TIMETRIAL_SPACESTATION1 }; class scriptclass { public: scriptclass(void); bool load(const std::string& name); void loadother(const char* t); bool loadcustom(const std::string& t); void loadalts(const std::string& processed, const std::string& raw); void add_test_line(const std::string& speaker, const std::string& english, char textcase, bool textbuttons); void loadtest(const std::string& name); void inline add(const std::string& t) { commands.push_back(t); } void add_default_colours(void); void clearcustom(void); void tokenize(const std::string& t); void run(void); void startgamemode(enum StartMode mode); void teleport(void); void hardreset(void); //Script contents std::vector commands; std::string words[NUM_SCRIPT_ARGS]; std::vector txt; std::string scriptname; int position; int looppoint, loopcount; int scriptdelay; bool running; // Textbox stuff std::map textbox_colours; int textx; int texty; TextboxCrewmatePosition textcrewmateposition; TextboxOriginalContext textoriginalcontext; int r,g,b; bool textflipme; char textcase; bool textbuttons; bool textlarge; int textboxtimer; std::vector textbox_sprites; TextboxImage textbox_image; bool textbox_absolutepos; bool textbox_force_outline; bool textbox_outline; //Misc int i, j, k; //Custom level stuff std::vector