├── README.md ├── build-env.cmd ├── classic ├── ClassicOpenZelda.config ├── ClassicOpenZelda.creator ├── ClassicOpenZelda.creator.user ├── ClassicOpenZelda.files ├── ClassicOpenZelda.includes ├── build.mk ├── license.txt ├── makefile ├── newcommands&changes.txt ├── readme.txt ├── rm.bat ├── src │ ├── AMX │ │ ├── amx.c │ │ ├── amx.h │ │ ├── amxcons.cpp │ │ ├── amxcore.cpp │ │ ├── amxcore.h │ │ ├── amxexec.asm │ │ ├── amxtime.c │ │ ├── bfixed.c │ │ ├── dfixed.c │ │ ├── float.cpp │ │ ├── float.h │ │ ├── jitr.asm │ │ ├── jits.asm │ │ ├── makefile.mingw │ │ ├── osdefs.h │ │ ├── power.c │ │ ├── sclinux.h │ │ ├── sdbg.c │ │ └── srun.cpp │ ├── Animations.cpp │ ├── BitFont.h │ ├── BitmapTextBuffer.cpp │ ├── BitmapTextBuffer.h │ ├── BmpHeader.h │ ├── Boundary.cpp │ ├── Boundary.h │ ├── CAnimation.cpp │ ├── CAnimation.h │ ├── CCounter.cpp │ ├── CCounter.h │ ├── CDisplay.cpp │ ├── CDisplay.h │ ├── CEntString.cpp │ ├── CEntString.h │ ├── CEntity.cpp │ ├── CEntity.h │ ├── CFade.cpp │ ├── CFade.h │ ├── CGame.cpp │ ├── CGame.h │ ├── CGraphics.cpp │ ├── CGraphics.h │ ├── CGroup.cpp │ ├── CGroup.h │ ├── CMusic.cpp │ ├── CMusic.h │ ├── CNightDay.cpp │ ├── CNightDay.h │ ├── CPlayer.cpp │ ├── CPlayer.h │ ├── CQuestLoader.cpp │ ├── CQuestLoader.h │ ├── CSFX.cpp │ ├── CSFX.h │ ├── CSaveLoad.cpp │ ├── CSaveLoad.h │ ├── CScreen.cpp │ ├── CScreen.h │ ├── CSound.cpp │ ├── CSound.h │ ├── CSprite.cpp │ ├── CSprite.h │ ├── CSpriteSheet.cpp │ ├── CSpriteSheet.h │ ├── CTextBox.cpp │ ├── CTextBox.h │ ├── CVirtualArchive.cpp │ ├── CVirtualArchive.h │ ├── CVirtualFile.cpp │ ├── CVirtualFile.h │ ├── CWipe.cpp │ ├── CWipe.h │ ├── CheckKeys.cpp │ ├── Counters.cpp │ ├── EntityList.cpp │ ├── EntityList.h │ ├── FS_Functions.cpp │ ├── FS_Functions.h │ ├── File.cpp │ ├── FontList.cpp │ ├── FontList.h │ ├── GameOver.cpp │ ├── GameOver.h │ ├── GeneralData.h │ ├── GeneralFunctions.cpp │ ├── Global.h │ ├── Hash.cpp │ ├── Hash.h │ ├── IntroMessage.h │ ├── LList.h │ ├── Launcher.cpp │ ├── Main.cpp │ ├── OpenZelda.ico │ ├── OpenZelda_private.h │ ├── OpenZelda_private.rc │ ├── PauseStack.cpp │ ├── PauseStack.h │ ├── SaveEntity.cpp │ ├── SaveLoadFunctions.cpp │ ├── SaveLoadFunctions.h │ ├── Script.cpp │ ├── Script.h │ ├── ShapeBuffer.cpp │ ├── ShapeBuffer.h │ ├── Socket.cpp │ ├── Socket.h │ ├── SocketScript.cpp │ ├── TTFfont.cpp │ ├── TTFfont.h │ ├── TextBuffer.cpp │ ├── TextBuffer.h │ ├── Texture.cpp │ ├── keys.png │ ├── license.txt │ └── qst.ico └── uname.bat ├── compiling.txt ├── credits.txt ├── custom ├── ozengine │ ├── Info.plist │ ├── custom_lux_screen.cpp │ ├── custom_platform_main.cpp │ ├── custom_project_media.cpp │ ├── openzelda-player.icns │ ├── openzelda-player.ico │ ├── openzelda-player.svg │ ├── openzelda.rc │ └── packageopenzelda.sh └── questdesigner │ ├── Info.plist │ ├── banner.png │ ├── default_banner.h │ ├── openzelda │ ├── openzelda-quest-designer.icns │ ├── openzelda-quest-designer.ico │ ├── openzelda-quest-designer.svg │ ├── openzelda.rc │ ├── quest_designer.launcher │ └── questdesigner.bundle ├── globalsettings.mk ├── license.txt ├── makefile ├── openzelda └── share │ ├── applications │ ├── OpenZelda.desktop │ └── QuestDesigner.desktop │ ├── gtksourceview-2.0 │ ├── language-specs │ │ ├── def.lang │ │ ├── language2.rng │ │ ├── pawn.lang │ │ └── readme.txt │ └── styles │ │ ├── classic.xml │ │ ├── styles.rng │ │ └── tango.xml │ ├── icons │ └── hicolor │ │ ├── 16x16 │ │ └── mimetypes │ │ │ └── application-x-openzelda-quest-source.png │ │ ├── 22x22 │ │ └── actions │ │ │ ├── draw-ellipse.png │ │ │ ├── draw-path.png │ │ │ ├── draw-polygon.png │ │ │ ├── draw-rectangle.png │ │ │ └── draw-text.png │ │ ├── 48x48 │ │ └── apps │ │ │ ├── openzelda-player.png │ │ │ └── openzelda-quest-designer.png │ │ ├── index.theme │ │ ├── openzelda-player.png │ │ ├── openzelda-quest-designer.png │ │ └── scalable │ │ ├── apps │ │ ├── openzelda-player.svg │ │ └── openzelda-quest-designer.svg │ │ └── mimetypes │ │ └── application-x-openzelda-quest-source.svg │ ├── mime │ └── openzelda-quest.xml │ └── openzelda-2.0 │ ├── binaries │ └── readme.txt │ ├── button-border.png │ ├── credits.txt │ ├── dialog-border.png │ ├── examples │ └── Preview │ │ ├── dialog │ │ ├── 00.txt │ │ └── en.txt │ │ ├── edit.zelda │ │ ├── lang │ │ ├── 00.txt │ │ ├── en.txt │ │ └── qq.txt │ │ ├── maps │ │ ├── Exit.png │ │ ├── Exit.xml │ │ ├── SimpleTitleScreen.png │ │ ├── SimpleTitleScreen.xml │ │ ├── d1_bossroom.png │ │ ├── d1_bossroom.xml │ │ ├── d1_bossroom.xml.entities │ │ ├── d1_itemroom.png │ │ ├── d1_itemroom.xml │ │ ├── d1_outside.png │ │ ├── d1_outside.xml │ │ ├── d1_outside.xml.entities │ │ ├── d1_outsidetest.png │ │ ├── d1_outsidetest.xml │ │ ├── d1_outsidetest.xml.entities │ │ ├── d1_room.png │ │ ├── d1_room.xml │ │ ├── d1_room1.png │ │ ├── d1_room1.xml │ │ ├── d1_room1.xml.entities │ │ ├── d1_room2.png │ │ ├── d1_room2.xml │ │ ├── d1_room2.xml.entities │ │ ├── d1_room3.png │ │ ├── d1_room3.xml │ │ ├── d1_room3.xml.entities │ │ ├── d1_room4.png │ │ ├── d1_room4.xml │ │ ├── d1_room5.png │ │ ├── d1_room5.xml │ │ ├── d1_room6.png │ │ ├── d1_room6.xml │ │ ├── d1_room6.xml.entities │ │ ├── d1_room7.png │ │ ├── d1_room7.xml │ │ ├── empty.png │ │ ├── empty.xml │ │ ├── hud.png │ │ ├── hud.xml │ │ └── thumbs │ │ │ └── d1_bossroom.png │ │ ├── preload │ │ ├── audio.txt │ │ ├── entities.txt │ │ └── spritesheet.txt │ │ ├── resources │ │ ├── icon256.png │ │ └── icon32.png │ │ ├── scripts │ │ ├── main.mps │ │ ├── maps │ │ │ ├── Exit.mps.options │ │ │ ├── SimpleTitleScreen.mps │ │ │ ├── SimpleTitleScreen.mps.options │ │ │ ├── d1_bossroom.mps │ │ │ ├── d1_bossroom.mps.options │ │ │ ├── d1_itemroom.mps │ │ │ ├── d1_itemroom.mps.options │ │ │ ├── d1_outside.mps │ │ │ ├── d1_outside.mps.options │ │ │ ├── d1_outsidetest.mps.options │ │ │ ├── d1_room.mps.options │ │ │ ├── d1_room1.mps │ │ │ ├── d1_room1.mps.options │ │ │ ├── d1_room2.mps │ │ │ ├── d1_room2.mps.options │ │ │ ├── d1_room3.mps │ │ │ ├── d1_room3.mps.options │ │ │ ├── d1_room4.mps │ │ │ ├── d1_room4.mps.options │ │ │ ├── d1_room5.mps │ │ │ ├── d1_room5.mps.options │ │ │ ├── d1_room6.mps │ │ │ ├── d1_room6.mps.options │ │ │ ├── d1_room7.mps │ │ │ ├── d1_room7.mps.options │ │ │ ├── empty.mps │ │ │ ├── empty.mps.options │ │ │ ├── hud.mps.options │ │ │ └── routines │ │ │ │ ├── enemy_check.inc │ │ │ │ └── standard.inc │ │ └── routines │ │ │ ├── collision.inc │ │ │ ├── counters.inc │ │ │ ├── drop_item.inc │ │ │ ├── dungeon.inc │ │ │ ├── enemy.inc │ │ │ ├── entity_graphics.inc │ │ │ ├── game_default.inc │ │ │ ├── item.inc │ │ │ ├── language_info.inc │ │ │ ├── map_default.inc │ │ │ ├── mokoi_quest.inc │ │ │ ├── movement.inc │ │ │ ├── npc.inc │ │ │ ├── open_zelda.inc │ │ │ ├── player_function.inc │ │ │ ├── public_events.inc │ │ │ ├── quest_types.inc │ │ │ └── weapon.inc │ │ ├── sprites │ │ ├── __banner.png │ │ ├── openzelda-mid.png │ │ └── openzelda-mid.png.xml │ │ └── worlds │ │ └── Dungeon_One.txt │ ├── help │ ├── common.css │ ├── en │ │ ├── Building.xml │ │ ├── Demo.xml │ │ ├── Demo_Audio.xml │ │ ├── DesignNotes.xml │ │ ├── DesignNotes_Controller.xml │ │ ├── DesignNotes_Formats.xml │ │ ├── DesignNotes_GUIStyling.xml │ │ ├── DesignNotes_GameProcess.xml │ │ ├── Editor.xml │ │ ├── Editor_Audio.xml │ │ ├── Editor_Entities.xml │ │ ├── Editor_Language.xml │ │ ├── Editor_Maps.xml │ │ ├── Editor_Project.xml │ │ ├── Editor_Spritesheet.xml │ │ ├── Editor_Worlds.xml │ │ ├── Guides.xml │ │ ├── Guides_CreatingGames.xml │ │ ├── Guides_CreatingGenres.xml │ │ ├── Scripting.xml │ │ ├── Scripting_Pawn.xml │ │ ├── Scripting_Pawn_ErrorCodes.xml │ │ ├── Scripting_Pawn_Functions.xml │ │ ├── Scripting_Pawn_Operators.xml │ │ ├── Scripting_Pawn_Statements.xml │ │ ├── Scripting_Pawn_Syntax.xml │ │ ├── Scripting_Pawn_Variables.xml │ │ ├── Tutorials.xml │ │ ├── Tutorials_1HelloWorld.xml │ │ ├── Tutorials_2UsingGraphics.xml │ │ ├── Tutorials_3BasicEntity.xml │ │ ├── Tutorials_4MovingEntity.xml │ │ ├── Tutorials_5TalkingToOtherEntity.xml │ │ ├── Tutorials_BasicInvaders.xml │ │ ├── Tutorials_Puttytris.xml │ │ └── index.xml │ ├── highlight.pack.js │ └── images │ │ ├── CameraScroll.png │ │ ├── LayerColour.png │ │ ├── editor_spritesheet_newsprite.png │ │ ├── editor_spritesheet_quickcreate.png │ │ ├── editor_spritesheet_spritegrouping.png │ │ ├── editor_start.png │ │ ├── editor_window_game.png │ │ ├── editor_window_language.png │ │ ├── editor_window_spritesheet.png │ │ ├── style_hgradient.png │ │ ├── style_negative.png │ │ ├── style_normal.png │ │ ├── style_outline.png │ │ ├── style_vgradient.png │ │ └── toolbar.png │ ├── icons │ └── hicolor │ │ ├── 22x22 │ │ └── actions │ │ │ ├── draw-ellipse.png │ │ │ ├── draw-path.png │ │ │ ├── draw-polygon.png │ │ │ ├── draw-rectangle.png │ │ │ ├── draw-text.png │ │ │ ├── meg-halignment.png │ │ │ └── meg-valignment.png │ │ ├── index.theme │ │ └── scalable │ │ ├── categories │ │ ├── help-browser.svg │ │ ├── meg-audio.svg │ │ ├── meg-language.svg │ │ ├── meg-map.svg │ │ ├── meg-play.svg │ │ ├── meg-project.svg │ │ ├── meg-question.svg │ │ ├── meg-section.svg │ │ └── meg-spritesheet.svg │ │ └── mimetypes │ │ ├── text-x-generic.svg │ │ └── text-x-script.svg │ ├── include │ ├── console.inc │ ├── controller.inc │ ├── core.inc │ ├── default.inc │ ├── entities.inc │ ├── enums.inc │ ├── fixed.inc │ ├── float.inc │ ├── game.inc │ ├── graphics.inc │ ├── helper.inc │ ├── input.inc │ ├── maps.inc │ ├── network.inc │ ├── player.inc │ ├── real.inc │ ├── realenums.inc │ ├── string.inc │ ├── system.inc │ └── time.inc │ ├── license.txt │ ├── portal.css │ ├── readme.txt │ ├── scripts │ ├── linux-install.sh │ └── linux-remove.sh │ ├── tango.xml │ └── window_icon.png └── ozstandalone ├── LICENSE.md ├── README.md ├── build-standalone-env.cmd ├── custom └── openzelda.make ├── makefile ├── makefiles ├── linux-standalone.make └── windows-standalone.make ├── platform.mk └── setting.mk /README.md: -------------------------------------------------------------------------------- 1 | Brings together various repos to create Open Zelda Game Development Software 2 | 3 | Check out the required reposities to the showned directory ( or run make clone-git ) 4 | - https://github.com/openzelda/content-package > /openzelda/share/openzelda-2.0/packages/OpenZelda-2_0-Beta1.package/ 5 | - https://github.com/lukesalisbury/luxengine > /ozengine/ 6 | - https://github.com/lukesalisbury/elix > /elix/ 7 | - https://github.com/lukesalisbury/meg > /questdesigner/ 8 | -------------------------------------------------------------------------------- /build-env.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | cls 3 | @rem Make sure these paths are correct. 4 | set MAKE=mingw32-make.exe 5 | set MINGWPATH=C:\dev\TDM-GCC-64 6 | set MSYSPATH=C:\dev\mingw\msys\1.0 7 | set SUPPORTPATH=C:\dev\supportlibs 8 | set PATH=;%MINGWPATH%\bin\;%MSYSPATH%\bin;%SUPPORTPATH%\bin;%PATH% 9 | 10 | set LDFLAGS=-L"%SUPPORTPATH%/lib" 11 | set CPPFLAGS=-I"%SUPPORTPATH%/include" -I"%SUPPORTPATH%/include/sdl2" -I"%MINGWPATH%/include" -I"%MINGWPATH%/include/sdl2" 12 | set CFLAGS=-I"%SUPPORTPATH%/include" -I"%SUPPORTPATH%/include/sdl2" -I"%MINGWPATH%/include" -I"%MINGWPATH%/include/sdl2" 13 | 14 | set BUILDDEBUG=FALSE 15 | 16 | echo Open Zelda Build Environment - Run %MAKE% 17 | echo ---------------------------------------- 18 | 19 | IF EXIST %MSYSPATH%\bin\mkdir.exe ( IF EXIST %MSYSPATH%\bin\uname.exe ( @echo - MSYS path: %MSYSPATH% ) ) ELSE ( @echo - MSYS not Installed at %MSYSPATH% ) 20 | IF EXIST %MINGWPATH%\bin\gcc.exe ( @echo - Compiler path: %MINGWPATH% ) ELSE ( @echo - Compiler not Installed at %MINGWPATH% ) 21 | IF EXIST %SUPPORTPATH%\lib\libSDL2.a ( @echo - SDL2 path: %SUPPORTPATH% ) ELSE ( @echo - SDL2 not Installed at %SUPPORTPATH% ) 22 | IF EXIST %SUPPORTPATH%\lib\gobject-2.0.lib ( @echo - GTK path: %SUPPORTPATH% ) ELSE ( @echo - GTK not Installed at %SUPPORTPATH% ) 23 | 24 | cmd /k echo ---------------------------------------- 25 | -------------------------------------------------------------------------------- /classic/ClassicOpenZelda.config: -------------------------------------------------------------------------------- 1 | // Add predefined macros for your project here. For example: 2 | // #define THE_ANSWER 42 3 | -------------------------------------------------------------------------------- /classic/ClassicOpenZelda.creator: -------------------------------------------------------------------------------- 1 | [General] 2 | -------------------------------------------------------------------------------- /classic/ClassicOpenZelda.files: -------------------------------------------------------------------------------- 1 | src/AMX/amx.c 2 | src/AMX/amx.h 3 | src/AMX/amxcons.cpp 4 | src/AMX/amxcore.cpp 5 | src/AMX/amxcore.h 6 | src/AMX/amxtime.c 7 | src/AMX/bfixed.c 8 | src/AMX/dfixed.c 9 | src/AMX/float.cpp 10 | src/AMX/float.h 11 | src/AMX/osdefs.h 12 | src/AMX/power.c 13 | src/AMX/sclinux.h 14 | src/AMX/sdbg.c 15 | src/AMX/srun.cpp 16 | src/Animations.cpp 17 | src/BitFont.h 18 | src/BitmapTextBuffer.cpp 19 | src/BitmapTextBuffer.h 20 | src/BmpHeader.h 21 | src/Boundary.cpp 22 | src/Boundary.h 23 | src/CAnimation.cpp 24 | src/CAnimation.h 25 | src/CCounter.cpp 26 | src/CCounter.h 27 | src/CDisplay.cpp 28 | src/CDisplay.h 29 | src/CEntity.cpp 30 | src/CEntity.h 31 | src/CEntString.cpp 32 | src/CEntString.h 33 | src/CFade.cpp 34 | src/CFade.h 35 | src/CGame.cpp 36 | src/CGame.h 37 | src/CGraphics.cpp 38 | src/CGraphics.h 39 | src/CGroup.cpp 40 | src/CGroup.h 41 | src/CheckKeys.cpp 42 | src/CMusic.cpp 43 | src/CMusic.h 44 | src/CNightDay.cpp 45 | src/CNightDay.h 46 | src/Counters.cpp 47 | src/CPlayer.cpp 48 | src/CPlayer.h 49 | src/CQuestLoader.cpp 50 | src/CQuestLoader.h 51 | src/CSaveLoad.cpp 52 | src/CSaveLoad.h 53 | src/CScreen.cpp 54 | src/CScreen.h 55 | src/CSFX.cpp 56 | src/CSFX.h 57 | src/CSound.cpp 58 | src/CSound.h 59 | src/CSprite.cpp 60 | src/CSprite.h 61 | src/CSpriteSheet.cpp 62 | src/CSpriteSheet.h 63 | src/CTextBox.cpp 64 | src/CTextBox.h 65 | src/CVirtualArchive.cpp 66 | src/CVirtualArchive.h 67 | src/CVirtualFile.cpp 68 | src/CVirtualFile.h 69 | src/CWipe.cpp 70 | src/CWipe.h 71 | src/EntityList.cpp 72 | src/EntityList.h 73 | src/File.cpp 74 | src/FontList.cpp 75 | src/FontList.h 76 | src/FS_Functions.cpp 77 | src/FS_Functions.h 78 | src/GameOver.cpp 79 | src/GameOver.h 80 | src/GeneralData.h 81 | src/GeneralFunctions.cpp 82 | src/Global.h 83 | src/Hash.cpp 84 | src/Hash.h 85 | src/Launcher.cpp 86 | src/LList.h 87 | src/Main.cpp 88 | src/OpenZelda_private.h 89 | src/PauseStack.cpp 90 | src/PauseStack.h 91 | src/SaveEntity.cpp 92 | src/SaveLoadFunctions.cpp 93 | src/SaveLoadFunctions.h 94 | src/Script.cpp 95 | src/Script.h 96 | src/ShapeBuffer.cpp 97 | src/ShapeBuffer.h 98 | src/Socket.cpp 99 | src/Socket.h 100 | src/SocketScript.cpp 101 | src/TextBuffer.cpp 102 | src/TextBuffer.h 103 | src/Texture.cpp 104 | src/TTFfont.cpp 105 | src/TTFfont.h 106 | build.mk 107 | makefile 108 | -------------------------------------------------------------------------------- /classic/ClassicOpenZelda.includes: -------------------------------------------------------------------------------- 1 | src 2 | src/AMX 3 | . 4 | include 5 | -------------------------------------------------------------------------------- /classic/build.mk: -------------------------------------------------------------------------------- 1 | 2 | OBJ := obj/PauseStack.o obj/FontList.o obj/EntityList.o obj/Animations.o 3 | OBJ += obj/CGame.o obj/Counters.o obj/CGraphics.o obj/CSprite.o 4 | OBJ += obj/CSpriteSheet.o obj/BitmapTextBuffer.o obj/ShapeBuffer.o 5 | OBJ += obj/TextBuffer.o obj/CDisplay.o obj/CVirtualArchive.o 6 | OBJ += obj/CVirtualFile.o obj/Boundary.o obj/CGroup.o 7 | OBJ += obj/CQuestLoader.o obj/CScreen.o obj/Script.o 8 | OBJ += obj/CEntity.o obj/SaveEntity.o obj/CAnimation.o 9 | OBJ += obj/AMX/amx.o obj/AMX/amxcons.o obj/AMX/amxcore.o obj/AMX/amxtime.o 10 | OBJ += obj/AMX/float.o obj/CEntString.o obj/CTextBox.o obj/CCounter.o 11 | OBJ += obj/CNightDay.o obj/CFade.o obj/CWipe.o obj/GameOver.o 12 | OBJ += obj/CSaveLoad.o obj/SaveLoadFunctions.o obj/CMusic.o 13 | OBJ += obj/CSFX.o obj/CSound.o obj/Hash.o obj/FS_Functions.o 14 | OBJ += obj/CheckKeys.o obj/GeneralFunctions.o obj/Main.o 15 | OBJ += obj/Socket.o obj/SocketScript.o obj/Texture.o 16 | OBJ += obj/TTFfont.o 17 | 18 | LINKOBJ = obj/Launcher.o $(RES) 19 | 20 | .PHONY: all all-before all-after clean clean-custom 21 | 22 | all: all-before $(BIN) all-after 23 | 24 | clean: clean-custom 25 | $(RM) $(OBJ) $(BIN) 26 | 27 | 28 | $(SO): $(OBJ) 29 | $(CPP) $(OBJ) -o $(SO) $(LIBS) $(SOLNK) 30 | 31 | 32 | $(BIN): $(SO) $(LINKOBJ) 33 | $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS) 34 | strip $(BIN) 35 | strip $(SO) 36 | 37 | obj/%.o : src/%.cpp 38 | $(CPP) -c $(CXXFLAGS) -DLIBOZFILE="\"$(SOFILE)\"" -o $@ $< 39 | 40 | obj/%.o : src/%.c 41 | $(CC) -c $(CFLAGS) -o $@ $< 42 | -------------------------------------------------------------------------------- /classic/license.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2002-2012 Open Zelda 2 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 3 | 4 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 5 | 6 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 7 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 8 | 3. This notice may not be removed or altered from any source distribution. -------------------------------------------------------------------------------- /classic/rm.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set string=%* 3 | set string=%string:/=\% 4 | del %string% -------------------------------------------------------------------------------- /classic/src/AMX/amxcore.h: -------------------------------------------------------------------------------- 1 | int amx_StrUnpack(cell *dest,cell *source); 2 | -------------------------------------------------------------------------------- /classic/src/AMX/amxtime.c: -------------------------------------------------------------------------------- 1 | /* Date/time module for the Small AMX 2 | * 3 | * Copyright (c) ITB CompuPhase, 2001 4 | * This file may be freely used. No warranties of any kind. 5 | * 6 | * Version: $Id: amxtime.c,v 1.0 2001-07-22 16:10:26+02 thiadmer Exp thiadmer $ 7 | */ 8 | #include 9 | #include 10 | #if defined __WIN32__ || defined _WIN32 11 | #include 12 | #include 13 | #endif 14 | #include "amx.h" 15 | 16 | #if defined __BORLANDC__ || defined __WATCOMC__ 17 | #pragma argsused 18 | #endif 19 | static cell AMX_NATIVE_CALL _time(AMX *amx, cell *params) 20 | { 21 | time_t sec1970; 22 | struct tm gtm; 23 | cell *cptr; 24 | 25 | assert(params[0]==3*sizeof(cell)); 26 | 27 | time(&sec1970); 28 | 29 | /* on DOS/Windows, the timezone is usually not set for the C run-time 30 | * library; in that case gmtime() and localtime() return the same value 31 | */ 32 | gtm=*localtime(&sec1970); 33 | if (amx_GetAddr(amx,params[1],&cptr)==AMX_ERR_NONE) 34 | *cptr=gtm.tm_hour; 35 | if (amx_GetAddr(amx,params[2],&cptr)==AMX_ERR_NONE) 36 | *cptr=gtm.tm_min; 37 | if (amx_GetAddr(amx,params[3],&cptr)==AMX_ERR_NONE) 38 | *cptr=gtm.tm_sec; 39 | 40 | /* the time() function returns the number of seconds since January 1 1970 41 | * in Universal Coordinated Time (the successor to Greenwich Mean Time) 42 | */ 43 | return sec1970; 44 | } 45 | 46 | #if defined __BORLANDC__ || defined __WATCOMC__ 47 | #pragma argsused 48 | #endif 49 | static cell AMX_NATIVE_CALL _date(AMX *amx, cell *params) 50 | { 51 | time_t sec1970; 52 | struct tm gtm; 53 | cell *cptr; 54 | 55 | assert(params[0]==3*sizeof(cell)); 56 | 57 | time(&sec1970); 58 | 59 | gtm=*localtime(&sec1970); 60 | if (amx_GetAddr(amx,params[1],&cptr)==AMX_ERR_NONE) 61 | *cptr=gtm.tm_year+1900; 62 | if (amx_GetAddr(amx,params[2],&cptr)==AMX_ERR_NONE) 63 | *cptr=gtm.tm_mon+1; 64 | if (amx_GetAddr(amx,params[3],&cptr)==AMX_ERR_NONE) 65 | *cptr=gtm.tm_mday; 66 | 67 | return 0; 68 | } 69 | 70 | #if defined __BORLANDC__ || defined __WATCOMC__ 71 | #pragma argsused 72 | #endif 73 | static cell AMX_NATIVE_CALL _tickcount(AMX *amx, cell *params) 74 | { 75 | #if defined __WIN32__ || defined _WIN32 76 | static int timerset = 0; 77 | #endif 78 | cell value; 79 | 80 | assert(params[0]==sizeof(cell)); 81 | value=SDL_GetTicks(); /* this value is already in milliseconds */ 82 | return value; 83 | } 84 | 85 | 86 | AMX_NATIVE_INFO time_Natives[] = { 87 | { "time", _time }, 88 | { "date", _date }, 89 | { "tickcount", _tickcount }, 90 | { NULL, NULL } /* terminator */ 91 | }; 92 | 93 | -------------------------------------------------------------------------------- /classic/src/AMX/float.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/classic/src/AMX/float.h -------------------------------------------------------------------------------- /classic/src/AMX/makefile.mingw: -------------------------------------------------------------------------------- 1 | # unix/linux makefile by Adam D. Moss 2 | 3 | # NOTE: AMX seems to require GCC version 3 or later, or you get 4 | # lots of assorted compilation errors. 5 | 6 | CC = gcc 7 | 8 | # pretty optimal (speed and size) for GCC 3.1 on x86 9 | COPTS = -DASM32 -D__GNUWIN32__ -DNDEBUG -D_CONSOLE -D_MBCS -g0 -Os -Wall 10 | 11 | 12 | #INCS = -I../linux 13 | ASM = nasmw 14 | AR = ar 15 | 16 | # if you don't have ranlib then you should define RANLIB = true 17 | RANLIB = F:\Dev-Cpp\bin\ranlib 18 | # RANLIB = true 19 | 20 | # desired resulting .a file name 21 | ARFILE = libamx.a 22 | 23 | # because we're using the FLOATPOINT module 24 | LDLIBS = -lm 25 | 26 | ########################################################### 27 | 28 | CFLAGS = $(COPTS) $(INCS) 29 | 30 | EXECS = srun 31 | OBJS = amx.o amxcore.o amxcons.o amxtime.o dfixed.o power.o float.o 32 | 33 | 34 | all: $(ARFILE) $(EXECS) 35 | 36 | $(ARFILE): $(OBJS) 37 | $(AR) r $(ARFILE) $(OBJS) 38 | $(RANLIB) $(ARFILE) 39 | 40 | %.o: %.c 41 | F:\Dev-Cpp\bin\$(CC) $(CFLAGS) -c $< -o $@ 42 | %.o: %.cpp 43 | F:\Dev-Cpp\bin\$(CC) $(CFLAGS) -c $< -o $@ 44 | %.o : %.asm ; 45 | F:\Dev-Cpp\bin\$(ASM) -O1 -f coff $< 46 | 47 | srun: srun.o $(ARFILE) 48 | F:\Dev-Cpp\bin\$(CC) $(CFLAGS) srun.o $(ARFILE) -o srun.exe $(LDLIBS) 49 | 50 | clean: 51 | rm -f $(ARFILE) $(OBJS) $(WINARFILE) $(WINOBJS) gmon.out 52 | -------------------------------------------------------------------------------- /classic/src/AMX/osdefs.h: -------------------------------------------------------------------------------- 1 | /* __MSDOS__ set when compiling for DOS (not Windows) 2 | * _Windows set when compiling for any version of Microsoft Windows 3 | * __WIN32__ set when compiling for Windows95 or WindowsNT (32 bit mode) 4 | * __32BIT__ set when compiling in 32-bit "flat" mode (DOS or Windows) 5 | * 6 | * Copyright 1998-2000, ITB CompuPhase, The Netherlands. 7 | * info@compuphase.com. 8 | */ 9 | 10 | #ifndef _OSDEFS_H 11 | #define _OSDEFS_H 12 | 13 | /* Every compiler uses different "default" macros to indicate the mode 14 | * it is in. Throughout the source, we use the Borland C++ macros, so 15 | * the macros of Watcom C/C++ and Microsoft Visual C/C++ are mapped to 16 | * those of Borland C++. 17 | */ 18 | #if defined(__WATCOMC__) 19 | # if defined(__WINDOWS__) || defined(__NT__) 20 | # define _Windows 1 21 | # endif 22 | # ifdef __386__ 23 | # define __32BIT__ 1 24 | # endif 25 | # if defined(_Windows) && defined(__32BIT__) 26 | # define __WIN32__ 1 27 | # endif 28 | #elif defined(_MSC_VER) 29 | # if defined(_WINDOWS) || defined(_WIN32) 30 | # define _Windows 1 31 | # endif 32 | # ifdef _WIN32 33 | # define __WIN32__ 1 34 | # define __32BIT__ 1 35 | # endif 36 | #endif 37 | 38 | /* Linux already has these */ 39 | #if !defined BIG_ENDIAN 40 | #define BIG_ENDIAN 4321 41 | #endif 42 | #if !defined LITTLE_ENDIAN 43 | #define LITTLE_ENDIAN 1234 44 | #endif 45 | /* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */ 46 | #if !defined BYTE_ORDER 47 | #if defined UCLINUX 48 | #define BYTE_ORDER BIG_ENDIAN 49 | #else 50 | #define BYTE_ORDER LITTLE_ENDIAN 51 | #endif 52 | #endif 53 | 54 | 55 | #if defined(_Windows) && !defined(_INC_WINDOWS) && !defined(__WINDOWS_H) && !defined(NOWINDOWS) 56 | # include 57 | # include 58 | #endif 59 | 60 | #endif /* _OSDEFS_H */ 61 | -------------------------------------------------------------------------------- /classic/src/AMX/power.c: -------------------------------------------------------------------------------- 1 | /* This file implements two native functions. It is provided as 2 | * an example to show how to add native functions. See the manual 3 | * for more information. 4 | * 5 | * Copyright (c) ITB CompuPhase, 1998, 1999 6 | * This file may be freely used. No warranties of any kind. 7 | */ 8 | #include "amx.h" 9 | 10 | static cell power(AMX *amx, cell *params) 11 | { 12 | /* power(value, exponent); 13 | * params[1] = value 14 | * params[2] = exponent 15 | */ 16 | cell result = 1; 17 | while (params[2]-- > 0) 18 | result *= params[1]; 19 | return result; 20 | } 21 | 22 | static cell sqroot(AMX *amx, cell *params) 23 | { 24 | /* sqroot(value); 25 | * params[1] = value 26 | * This routine uses a simple successice approximation algorithm. 27 | */ 28 | cell div = params[1]; 29 | cell result = 1; 30 | while (div > result) { /* end when div == result, or just below */ 31 | div = (div + result) / 2; /* take mean value as new divisor */ 32 | result = params[1] / div; 33 | } /* while */ 34 | return div; 35 | } 36 | 37 | AMX_NATIVE_INFO power_Natives[] = { 38 | { "power", power }, 39 | { "sqroot", sqroot }, 40 | { 0, 0 } /* terminator */ 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /classic/src/AMX/sclinux.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Things needed to compile under linux. 3 | * 4 | * Should be reworked totally to use GNU's 'configure' 5 | */ 6 | #ifndef SCLINUX_H 7 | #define SCLINUX_H 8 | 9 | /* getchar() is not a 'cool' replacement for MSDOS getch: Linux/unix depends on the features activated or not about the 10 | * controlling terminal's tty. This means that ioctl(2) calls must be performed, for instance to have the controlling 11 | * terminal tty's in 'raw' mode, if we want to be able to fetch a single character. This also means that everything must 12 | * be put back correctly when the function ends. See GETCH.C for an implementation. 13 | * 14 | * For interactive use of PawnRun/PawnDbg if would be much better to use GNU's readline package: the user would be able to 15 | * have a complete emacs/vi like line editing system. 16 | */ 17 | 18 | 19 | #define stricmp(a,b) strcasecmp(a,b) 20 | #define strnicmp(a,b,c) strncasecmp(a,b,c) 21 | 22 | /* 23 | * WinWorld wants '\'. Unices do not. 24 | */ 25 | #define DIRECTORY_SEP_CHAR '/' 26 | #define DIRECTORY_SEP_STR "/" 27 | 28 | /* 29 | * SC assumes that a computer is Little Endian unless told otherwise. It uses 30 | * (and defines) the macros BYTE_ORDER and BIG_ENDIAN. 31 | * For Linux, we must overrule these settings with those defined in glibc. 32 | */ 33 | #if !defined __BYTE_ORDER 34 | # include 35 | #endif 36 | 37 | #if defined __OpenBSD__ || defined __FreeBSD__ 38 | # define __BYTE_ORDER BYTE_ORDER 39 | # define __LITTLE_ENDIAN LITTLE_ENDIAN 40 | # define __BIG_ENDIAN BIG_ENDIAN 41 | #endif 42 | 43 | #if !defined __BYTE_ORDER 44 | # error "Can't figure computer byte order (__BYTE_ORDER macro not found)" 45 | #endif 46 | 47 | #endif /* SCLINUX_H */ 48 | -------------------------------------------------------------------------------- /classic/src/AMX/srun.cpp: -------------------------------------------------------------------------------- 1 | /* Command-line shell for the "Small" Abstract Machine, using the 2 | * Microsoft Windows DLL interface. 3 | * 4 | * Copyright (c) ITB CompuPhase, 1997-2001 5 | * Copyright (c) Mark Peter, 1998-1999 6 | * 7 | * This file may be freely used. No warranties of any kind. 8 | */ 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include "amx.h" 14 | 15 | 16 | extern AMX_NATIVE_INFO core_Natives[]; 17 | extern AMX_NATIVE_INFO console_Natives[]; 18 | 19 | // *********************** NATIVE FUNCTION ***************** 20 | cell AMX_NATIVE_CALL print2(AMX *amx, cell *params); 21 | static cell print2(AMX *amx, cell *params) 22 | { 23 | char szString[512]; 24 | cell div; 25 | 26 | cell *t = 0; 27 | amx_GetAddr(amx, params[1], &t); 28 | amx_GetString(szString, t); 29 | 30 | cell q = params[2]; 31 | 32 | printf(szString); 33 | return 45; 34 | } 35 | 36 | AMX_NATIVE_INFO other_Natives[] = { 37 | { "print2", print2 }, 38 | { 0, 0 } /* terminator */ 39 | }; 40 | // ********************************************************* 41 | 42 | void *loadprogram(AMX *amx,char *filename) 43 | { 44 | FILE *fp; 45 | AMX_HEADER hdr; 46 | void *program = NULL; 47 | 48 | if ((fp = fopen("..\\..\\hello.amx","rb")) != NULL) { 49 | fread(&hdr, sizeof hdr, 1, fp); 50 | if ((program = malloc((int)hdr.stp)) != NULL) { 51 | rewind(fp); 52 | fread(program, 1, (int)hdr.size, fp); 53 | fclose(fp); 54 | memset(amx,0,sizeof *amx); 55 | if (amx_Init(amx,program) == AMX_ERR_NONE) 56 | return program; 57 | free(program); 58 | } /* if */ 59 | } /* if */ 60 | return NULL; 61 | } 62 | 63 | 64 | class CEntity 65 | { 66 | public: 67 | CEntity(char* szFileName); 68 | CEntity(); 69 | ~CEntity(); 70 | void RunScript(); 71 | AMX amx; 72 | void *program; 73 | }; 74 | 75 | 76 | CEntity::CEntity() 77 | { 78 | } 79 | 80 | CEntity::CEntity(char* szFileName) 81 | { 82 | program = loadprogram(&amx, szFileName); 83 | amx_Register(&amx, other_Natives, -1); 84 | //amx_Register(&amx, core_Natives, -1); 85 | //amx_Register(&amx, console_Natives, -1); 86 | } 87 | 88 | void CEntity::RunScript() 89 | { 90 | cell ret; 91 | amx_Exec(&amx, &ret, AMX_EXEC_MAIN, 0); 92 | } 93 | 94 | CEntity::~CEntity() 95 | { 96 | free(program); 97 | } 98 | 99 | 100 | 101 | int main(int argc,char *argv[]) 102 | { 103 | CEntity* pEnt1 = new CEntity("..\\..\\hello.amx"); 104 | pEnt1->RunScript(); 105 | delete(pEnt1); 106 | 107 | return 0; 108 | } -------------------------------------------------------------------------------- /classic/src/BitmapTextBuffer.h: -------------------------------------------------------------------------------- 1 | // BitmapTextBuffer.h: interface for the CTextBuffer class. 2 | // 3 | ////////////////////////////////////////////////////////////////////// 4 | 5 | #if !defined(AFX_BITMAPTEXTBUFFER_H__89B46B4E_4376_40A9_BD40_16DEE4A45915__INCLUDED_) 6 | #define AFX_BITMAPTEXTBUFFER_H__89B46B4E_4376_40A9_BD40_16DEE4A45915__INCLUDED_ 7 | 8 | #if _MSC_VER >= 1000 9 | #pragma once 10 | #endif // _MSC_VER >= 1000 11 | 12 | #include "GeneralData.h" 13 | #define MAX_BIT_TEXTS 100 14 | 15 | 16 | // Name: struct _BitmapTextBuffer 17 | struct _BitmapTextBuffer{ 18 | char szText[256]; 19 | SDL_Point sPoint; 20 | SDL_Color dwColour; 21 | int nStyle; 22 | int nScale; 23 | }; 24 | 25 | 26 | 27 | class CBitmapTextBuffer 28 | { 29 | _BitmapTextBuffer m_Text[MAX_BIT_TEXTS]; 30 | int m_nTexts; 31 | 32 | public: 33 | CBitmapTextBuffer(); 34 | virtual ~CBitmapTextBuffer(); 35 | 36 | void AddText( char* szText, SDL_Point point, SDL_Color dwColour, int nStyle, int nScale); 37 | void DrawTexts(); 38 | void MakeSpriteName(char cCharacter, char* szBuffer, int nStyle); 39 | }; 40 | 41 | #endif // !defined(AFX_BITMAPTEXTBUFFER_H__89B46B4E_4376_40A9_BD40_16DEE4A45915__INCLUDED_) 42 | -------------------------------------------------------------------------------- /classic/src/BmpHeader.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef BMP_FILE 4 | #define BMP_FILE 5 | 6 | typedef struct _BMPFileHeader 7 | { 8 | uint16_t FileType; /* File type, always 4D42h ("BM") */ 9 | uint32_t FileSize; /* Size of the file in bytes */ 10 | uint16_t Reserved1; /* Always 0 */ 11 | uint16_t Reserved2; /* Always 0 */ 12 | uint32_t BitmapOffset; /* Starting position of image data in bytes */ 13 | } BMPFILEHEADER; 14 | 15 | typedef struct _BitmapHeader 16 | { 17 | uint32_t Size; /* Size of this header in bytes */ 18 | int32_t Width; /* Image width in pixels */ 19 | int32_t Height; /* Image height in pixels */ 20 | uint16_t Planes; /* Number of color planes */ 21 | uint16_t BitsPerPixel; /* Number of bits per pixel */ 22 | uint32_t Compression; /* Compression methods used */ 23 | uint32_t SizeOfBitmap; /* Size of bitmap in bytes */ 24 | int32_t HorzResolution; /* Horizontal resolution in pixels per meter */ 25 | int32_t VertResolution; /* Vertical resolution in pixels per meter */ 26 | uint32_t ColorsUsed; /* Number of colors in the image */ 27 | uint32_t ColorsImportant; /* Minimum number of important colors */ 28 | } BITMAPHEADER; 29 | 30 | typedef struct _BitmapPalette 31 | { 32 | uint8_t Blue; /* Blue component */ 33 | uint8_t Green; /* Green component */ 34 | uint8_t Red; /* Red component */ 35 | uint8_t Reserved; /* Padding (always 0) */ 36 | } BITMAPPALETTE; 37 | 38 | 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /classic/src/Boundary.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // Boundary.cpp: implementation of the CBoundary class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #include "Boundary.h" 16 | 17 | ////////////////////////////////////////////////////////////////////// 18 | // Construction/Destruction 19 | ////////////////////////////////////////////////////////////////////// 20 | 21 | CBoundary::CBoundary() 22 | { 23 | 24 | } 25 | 26 | CBoundary::~CBoundary() 27 | { 28 | m_pEntityList.free(true); 29 | } 30 | 31 | 32 | //----------------------------------------------------------------------------- 33 | // Name: AddEntity() 34 | // Desc: 35 | // 36 | //----------------------------------------------------------------------------- 37 | void CBoundary::AddEntity( CEntity* pNewEntity ) 38 | { 39 | // Add the entity supplied to the list 40 | m_pEntityList.additem(pNewEntity, pNewEntity->GetIdent()); 41 | } 42 | 43 | 44 | //----------------------------------------------------------------------------- 45 | // Name: RemoveEntity() 46 | // Desc: 47 | // 48 | //----------------------------------------------------------------------------- 49 | void CBoundary::RemoveEntity(CEntity* pNewEntity ) 50 | { 51 | m_pEntityList.removeitem( pNewEntity, true ); 52 | } 53 | 54 | 55 | //----------------------------------------------------------------------------- 56 | // Name: ClearEntities() 57 | // Desc: 58 | // 59 | //----------------------------------------------------------------------------- 60 | void CBoundary::ClearEntities() 61 | { 62 | // Clear the Linked list and start again 63 | m_pEntityList.free(true); 64 | } 65 | -------------------------------------------------------------------------------- /classic/src/Boundary.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // Boundary.h: interface for the CBoundary class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #if !defined(AFX_BOUNDARY_H__A9AAEA59_C01D_4649_AD81_9E2B9D78D3DC__INCLUDED_) 16 | #define AFX_BOUNDARY_H__A9AAEA59_C01D_4649_AD81_9E2B9D78D3DC__INCLUDED_ 17 | 18 | #include "LList.h" 19 | #include "CEntity.h" 20 | 21 | class CEntity; 22 | 23 | class CBoundary 24 | { 25 | LList m_pEntityList; // List of Entities in this group 26 | 27 | public: 28 | 29 | RECT2D bounds; // Bounding rectangle for the group 30 | long lScriptIndex; // Unsure what this does really 31 | int wLoopBack; // Not sure if used 32 | char szMusic[64]; // Name of the music file to play 33 | 34 | public: 35 | CBoundary(); 36 | virtual ~CBoundary(); 37 | 38 | void AddEntity( CEntity* pNewEntity ); 39 | void RemoveEntity(CEntity* pNewEntity ); 40 | void ClearEntities(); 41 | 42 | LList* GetEntList(){ return &m_pEntityList;} 43 | }; 44 | 45 | #endif // !defined(AFX_BOUNDARY_H__A9AAEA59_C01D_4649_AD81_9E2B9D78D3DC__INCLUDED_) 46 | -------------------------------------------------------------------------------- /classic/src/CCounter.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CCounter.h 13 | // 14 | // Desc: Counter Class 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CCOUNTER_H 18 | #define CCOUNTER_H 19 | 20 | //----------------------------------------------------------------------------- 21 | // Classes defined in this header file 22 | //----------------------------------------------------------------------------- 23 | class CCounter; 24 | 25 | //----------------------------------------------------------------------------- 26 | // Name: class CCounter 27 | // Desc: 28 | //----------------------------------------------------------------------------- 29 | class CCounter 30 | { 31 | char m_szIdent[64]; // Identifier for this object 32 | long m_lMin; // Min / Max Values 33 | long m_lMax; 34 | float m_rValue; // The actual Counter Value 35 | long m_lTarget; // The Target Value to reach 36 | float m_lSpeed; // Speed at which it moves from the current value to target 37 | 38 | public: 39 | 40 | CCounter(char *szIdent, long lMin, long lMax); 41 | ~CCounter(); 42 | void Update(); 43 | 44 | 45 | // Data Broker Functions 46 | void SetMin(long lMin){m_lMin = lMin;} 47 | void SetMax(long lMax){m_lMax = lMax;} 48 | long GetMin(){return m_lMin;} 49 | long GetMax(){return m_lMax;} 50 | void SetValue(long lVal); 51 | void SetTarget(long lTarg); 52 | void SetSpeed(long lSpeed){m_lSpeed = (float)lSpeed;} 53 | 54 | // Access Functions 55 | long GetValue(){return (long)m_rValue;} 56 | long GetTarget(){return m_lTarget;} 57 | 58 | }; 59 | 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /classic/src/CEntString.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CEntString.h 13 | // 14 | // Desc: 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CENTSTRING_H 18 | #define CENTSTRING_H 19 | 20 | #include "GeneralData.h" 21 | 22 | 23 | //----------------------------------------------------------------------------- 24 | // Classes defined in this header file 25 | //----------------------------------------------------------------------------- 26 | class CEntString; 27 | 28 | 29 | //----------------------------------------------------------------------------- 30 | // Name: class CEntString 31 | // Desc: 32 | //----------------------------------------------------------------------------- 33 | class CEntString 34 | { 35 | protected: 36 | 37 | char* pMessage; 38 | char cNextMessage[MAX_ANSWERS]; 39 | int wNumNext; 40 | bool fGotoNext; 41 | 42 | public: 43 | CEntString(int wMessageSize); 44 | ~CEntString(); 45 | void Save(FILE* sFile); 46 | void Load(FILE* sFile); 47 | 48 | // Access Functions 49 | char* GetMessage(){return pMessage;} 50 | int GetNextMessage(int index); 51 | int GetNumNext(){return wNumNext;} 52 | bool GetGotoNext(){return fGotoNext;} 53 | 54 | // Data Broker Functions 55 | void SetGotoNext(bool fNext){fGotoNext = fNext;} 56 | void SetNextMessage(int wIndex, int wVal); 57 | void SetNumNext(int wNext){wNumNext = wNext;} 58 | }; 59 | 60 | 61 | #endif 62 | 63 | -------------------------------------------------------------------------------- /classic/src/CFade.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CFade.h 13 | // 14 | // Desc: 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CFADE_H 18 | #define CFADE_H 19 | 20 | 21 | //----------------------------------------------------------------------------- 22 | // Classes defined in this header file 23 | //----------------------------------------------------------------------------- 24 | class CFade; 25 | 26 | //----------------------------------------------------------------------------- 27 | // Name: class CFade 28 | // Desc: 29 | //----------------------------------------------------------------------------- 30 | class CFade 31 | { 32 | int m_wRedTarg; 33 | int m_wGreenTarg; 34 | int m_wBlueTarg; 35 | 36 | float m_rCurrentRed; 37 | float m_rCurrentGreen; 38 | float m_rCurrentBlue; 39 | float m_rFadeRate; 40 | 41 | public: 42 | 43 | CFade(); 44 | ~CFade(); 45 | 46 | bool FadeTo(int r, int g, int b, int wSpeed); 47 | void DoFade(); 48 | void CombineColor(int* wInputCol, int rgb); 49 | 50 | 51 | int GetRed(){return (int)m_wRedTarg;} 52 | int GetGreen(){return (int)m_wGreenTarg;} 53 | int GetBlue(){return (int)m_wBlueTarg;} 54 | 55 | 56 | }; 57 | 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /classic/src/CGraphics.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CGraphics.h 13 | // 14 | // Desc: Class which encapsulates all Sprite Sheets 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CGRAPHICS_H 18 | #define CGRAPHICS_H 19 | 20 | #include 21 | #include "CSpriteSheet.h" 22 | #include "LList.h" 23 | #include "Hash.h" 24 | 25 | //----------------------------------------------------------------------------- 26 | // Classes defined in this header file 27 | //----------------------------------------------------------------------------- 28 | class CGraphics; 29 | 30 | //----------------------------------------------------------------------------- 31 | // Name: class CGraphics 32 | // Desc: Class to house all sprite sheets 33 | //----------------------------------------------------------------------------- 34 | class CGraphics 35 | { 36 | 37 | LList m_pSheets; // Linked List of Sprite Sheets 38 | int m_wNumSheets; // Number of Sprite Sheets 39 | CHash* m_pSpriteHashTable; // Hash Table of sprites 40 | 41 | public: 42 | CGraphics(); 43 | ~CGraphics(); 44 | 45 | void HashSprites(); 46 | long CountSprites(); 47 | void LoadCustomSheets(char* FileName); // Loads Sprite Sheets from the Current QST 48 | void ResetAnimations(); 49 | CSprite* GetSprite(char *szCode, bool fOnlyBackground); 50 | CSpriteSheet* GetSpriteSheet(CSprite* pSprite); 51 | void LoadMasks(); 52 | }; 53 | 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /classic/src/CMusic.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CMusic.cpp 13 | // 14 | // Desc: 15 | // 16 | // 17 | //----------------------------------------------------------------------------- 18 | #define STRICT 19 | #include "CMusic.h" 20 | #include "GeneralData.h" 21 | //----------------------------------------------------------------------------- 22 | // Defines, constants, and global variables 23 | //----------------------------------------------------------------------------- 24 | 25 | //----------------------------------------------------------------------------- 26 | // CMusic Constructor 27 | //----------------------------------------------------------------------------- 28 | CMusic::CMusic(char* szFileName, bool free) 29 | { 30 | SetName("none"); 31 | m_wLoopBack = 0; 32 | bFree = free; 33 | 34 | // Load the Track provided 35 | //m_pMod = FMUSIC_LoadSong(szFileName); 36 | 37 | std::string path(FS_Gamedir()); 38 | path.append(szFileName); 39 | 40 | m_pMod = Mix_LoadMUS(path.c_str()); 41 | } 42 | 43 | 44 | //----------------------------------------------------------------------------- 45 | // CMusic destructor 46 | //----------------------------------------------------------------------------- 47 | CMusic::~CMusic() 48 | { 49 | /* 50 | if (FMUSIC_IsPlaying(m_pMod)) 51 | FMUSIC_StopSong(m_pMod); 52 | 53 | FMUSIC_FreeSong(m_pMod); 54 | */ 55 | 56 | Mix_FreeMusic(m_pMod); 57 | 58 | 59 | } 60 | -------------------------------------------------------------------------------- /classic/src/CMusic.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CMusic.h 13 | // 14 | // Desc: 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CMUSIC_H 18 | #define CMUSIC_H 19 | 20 | //#include "FMOD/fmod.h" 21 | #include 22 | #include 23 | 24 | //----------------------------------------------------------------------------- 25 | // Classes defined in this header file 26 | //----------------------------------------------------------------------------- 27 | class CMusic; 28 | 29 | //----------------------------------------------------------------------------- 30 | // Name: class CMusic 31 | // Desc: 32 | //----------------------------------------------------------------------------- 33 | class CMusic 34 | { 35 | Mix_Music *m_pMod; 36 | char m_szName[64]; // Name of Music File 37 | int m_wLoopBack; // LoopBack Value 38 | bool bFree; 39 | public: 40 | CMusic(char* szFileName, bool free = false); 41 | ~CMusic(); 42 | 43 | // Access Functions 44 | Mix_Music * GetModule(){return m_pMod; } 45 | char* GetName(){return m_szName;} 46 | int GetLoopBack(){return m_wLoopBack;} 47 | 48 | // Data Broker Functions 49 | void SetName(char* name){strncpy(m_szName, name, 64);} 50 | void SetLoopBack(int val){m_wLoopBack = val;} 51 | }; 52 | 53 | 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /classic/src/CPlayer.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CPlayer.h 13 | // 14 | // Desc: 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CPLAYER_H 18 | #define CPLAYER_H 19 | 20 | #include "CEntity.h" 21 | #include "CAnimation.h" 22 | 23 | enum PlayerState{standing, walking}; 24 | 25 | 26 | //----------------------------------------------------------------------------- 27 | // Classes defined in this header file 28 | //----------------------------------------------------------------------------- 29 | class CPlayer; 30 | 31 | 32 | //----------------------------------------------------------------------------- 33 | // Name: class CPlayer 34 | // Desc: 35 | //----------------------------------------------------------------------------- 36 | class CPlayer : public CEntity 37 | { 38 | CAnimation* m_pStandn; 39 | CAnimation* m_pStande; 40 | CAnimation* m_pStands; 41 | CAnimation* m_pStandw; 42 | CAnimation* m_pWalkn; 43 | CAnimation* m_pWalke; 44 | CAnimation* m_pWalks; 45 | CAnimation* m_pWalkw; 46 | 47 | PlayerState m_eState; 48 | 49 | public: 50 | CPlayer(); 51 | ~CPlayer(); 52 | 53 | void Update(); 54 | void Stand(); 55 | }; 56 | 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /classic/src/CSFX.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CSFX.cpp 13 | // 14 | // Desc: 15 | // 16 | // 17 | //----------------------------------------------------------------------------- 18 | #define STRICT 19 | #include "CSFX.h" 20 | #include "GeneralData.h" 21 | //----------------------------------------------------------------------------- 22 | // Defines, constants, and global variables 23 | //----------------------------------------------------------------------------- 24 | 25 | //----------------------------------------------------------------------------- 26 | // CSFX Constructor 27 | //----------------------------------------------------------------------------- 28 | CSFX::CSFX(char* szFileName) 29 | { 30 | std::string path(FS_Gamedir()); 31 | path.append(szFileName); 32 | 33 | 34 | memset(m_szName, 0, sizeof(m_szName)); 35 | m_pSample = Mix_LoadWAV(path.c_str()); 36 | } 37 | 38 | 39 | //----------------------------------------------------------------------------- 40 | // CSFX destructor 41 | //----------------------------------------------------------------------------- 42 | CSFX::~CSFX() 43 | { 44 | Mix_FreeChunk(m_pSample); 45 | //FSOUND_Sample_Free(m_pSample); 46 | } 47 | -------------------------------------------------------------------------------- /classic/src/CSFX.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CSFX.h 13 | // 14 | // Desc: 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CSFX_H 18 | #define CSFX_H 19 | 20 | //#include "FMOD/fmod.h" 21 | #include 22 | #include 23 | 24 | //----------------------------------------------------------------------------- 25 | // Classes defined in this header file 26 | //----------------------------------------------------------------------------- 27 | class CSFX; 28 | 29 | //----------------------------------------------------------------------------- 30 | // Name: class CSFX 31 | // Desc: 32 | //----------------------------------------------------------------------------- 33 | class CSFX 34 | { 35 | Mix_Chunk *m_pSample; 36 | char m_szName[64]; // Name of Sound File 37 | 38 | public: 39 | CSFX(char* szFileName); 40 | ~CSFX(); 41 | 42 | // Access Functions 43 | Mix_Chunk * GetSample(){return m_pSample;} 44 | char* GetName(){return m_szName;} 45 | 46 | // Data Broker Functions 47 | void SetName(char* name){strcpy(m_szName, name);} 48 | }; 49 | 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /classic/src/CSaveLoad.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CSaveLoad.h 13 | // 14 | // Desc: A Class For Saving & Loading 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CSAVELOAD_H 18 | #define CSAVELOAD_H 19 | #include "GeneralData.h" 20 | #define MAX_ITEMS 6 21 | //----------------------------------------------------------------------------- 22 | // Classes defined in this header file 23 | //----------------------------------------------------------------------------- 24 | class CSaveLoad; 25 | 26 | struct _slot{ 27 | char szName[32]; 28 | SDL_Point sMenuPos; 29 | int wHealth; 30 | }; 31 | 32 | //----------------------------------------------------------------------------- 33 | // Name: class CSaveLoad 34 | // Desc: 35 | //----------------------------------------------------------------------------- 36 | class CSaveLoad 37 | { 38 | bool m_isSaving; 39 | bool m_isLoading; 40 | bool m_isWhereScreen; 41 | float m_rCounter; 42 | int m_wSelected; 43 | 44 | // Menu position variables 45 | int m_wMenuItems; 46 | _slot m_sSlots[MAX_ITEMS]; 47 | 48 | public: 49 | 50 | CSaveLoad(); 51 | ~CSaveLoad(); 52 | 53 | void DoSaveLoad(); 54 | void PreSave(); 55 | void PreLoad(); 56 | void DoSaveGame(); 57 | void DoLoadGame(); 58 | void HandleKeys(); 59 | void FillSaveGameInfo(); 60 | void DrawHearts(int x, int y, int wNumHearts); 61 | void WriteQuestTitle(); 62 | void DoWhereStart(); 63 | 64 | void DrawMat(int x, int y, int width, int height); 65 | void DrawTileLine(int StartX, int StartY, int Length, int Direction, char* code); 66 | }; 67 | 68 | 69 | #endif 70 | 71 | -------------------------------------------------------------------------------- /classic/src/CVirtualArchive.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // VirtualArchive.h: interface for the CVirtualArchive class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #if !defined(_VIRTUALARCHIVE_H__) 16 | #define _VIRTUALARCHIVE_H__ 17 | #include 18 | #include 19 | #include 20 | #include "CVirtualFile.h" 21 | #include "GeneralData.h" 22 | #include "CQuestLoader.h" 23 | 24 | class CQuestLoader; 25 | class CVirtualFile; 26 | 27 | class CVirtualArchive 28 | { 29 | std::list m_Files; // List of virtual files in archive 30 | char m_szFileName[512]; // Filename of archive 31 | long m_lHeaderSize; // Length of header portion 32 | char m_cEncryptionKeys[ NUM_ENC_KEYS ]; 33 | 34 | //void LoadFile( FILE *pIn); 35 | void LoadFile(gzFile pIn); 36 | public: 37 | CVirtualArchive(); 38 | virtual ~CVirtualArchive(); 39 | 40 | void CheckForEntities(); 41 | bool ExtractAMXFiles(); 42 | bool LoadHeader(); 43 | //bool GetNextEntry(char *szString, size_t sLen, FILE * in); 44 | bool GetNextEntry(char *szString, size_t sLen, gzFile in); 45 | bool LoadScreenFiles( CQuestLoader* pQuest); 46 | bool LoadQSSFile( CQuestLoader* pQuest ); 47 | CVirtualFile* GetSheetsFile(); 48 | bool ExtractFile( char* szName, char* szLocation ); 49 | CVirtualFile* FindFile( char* szName ); 50 | bool LoadEntities(); 51 | 52 | // Data Brokers 53 | void SetFileName( char* szFileName ){ strncpy(m_szFileName, szFileName, 512);} 54 | 55 | char* GetFileName(){ return m_szFileName;} 56 | long GetHeaderLength(){ return m_lHeaderSize;} 57 | 58 | }; 59 | 60 | #endif // !defined(AFX_VIRTUALARCHIVE_H__C45F5E63_D946_4462_8651_A34F9B3E251E__INCLUDED_) 61 | -------------------------------------------------------------------------------- /classic/src/CWipe.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: CWipe.h 13 | // 14 | // Desc: 15 | // 16 | //----------------------------------------------------------------------------- 17 | #ifndef CWIPE_H 18 | #define CWIPE_H 19 | 20 | #include "GeneralData.h" 21 | 22 | //----------------------------------------------------------------------------- 23 | // Classes defined in this header file 24 | //----------------------------------------------------------------------------- 25 | class CWipe; 26 | 27 | //----------------------------------------------------------------------------- 28 | // Name: class CWipe 29 | // Desc: 30 | //----------------------------------------------------------------------------- 31 | class CWipe 32 | { 33 | int m_wWipeFacing; 34 | bool m_fWiping; 35 | float m_rWipeCount; 36 | long m_lWipeStartX; 37 | long m_lWipeStartY; 38 | int m_wWipeSpeed; 39 | 40 | // For secondary wipe 41 | bool m_bSecondWiping; 42 | long m_lTempWorldXBefore; 43 | long m_lTempWorldYBefore; 44 | long m_lSecondWipeLimit; 45 | 46 | public: 47 | 48 | void BeginWipe(int wDir, int wSpeed); 49 | void DoWipe(); 50 | void EndWipe(); 51 | void EndSecondWipe(); 52 | void CheckForSecondWipe(); 53 | void DoSecondWipe(); 54 | void BeginSecondWipe(); 55 | 56 | CWipe(); 57 | ~CWipe(); 58 | 59 | bool isWiping(){ return m_fWiping;} 60 | }; 61 | 62 | 63 | #endif 64 | 65 | -------------------------------------------------------------------------------- /classic/src/FS_Functions.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | /* File-System Functions */ 12 | 13 | #include "FS_Functions.h" 14 | #include "string.h" 15 | #include 16 | 17 | /* Create a Global String to store the base directory for the program */ 18 | 19 | char * g_szTempDir = NULL; 20 | char * g_szSaveDir = NULL; 21 | /* 22 | ============ 23 | FS_Gamedir 24 | 25 | Called to find out the base Directory 26 | ============ 27 | */ 28 | char * FS_Gamedir() 29 | { 30 | if ( !g_szTempDir ) 31 | { 32 | g_szTempDir = SDL_GetPrefPath("classic.openzelda.net", "temp"); 33 | 34 | } 35 | 36 | return g_szTempDir; 37 | } 38 | 39 | char * FS_Savedir() 40 | { 41 | if ( !g_szSaveDir ) 42 | { 43 | g_szSaveDir = SDL_GetPrefPath("classic.openzelda.net", "saves"); 44 | } 45 | 46 | return g_szSaveDir; 47 | } 48 | 49 | /* 50 | ============ 51 | FS_SetGamedir 52 | ============ 53 | */ 54 | int FS_SetGamedir( char* szGameDir ) 55 | { 56 | 57 | return 1; 58 | } 59 | -------------------------------------------------------------------------------- /classic/src/FS_Functions.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | #ifndef FSFUNCTIONS_H 12 | #define FSFUNCTIONS_H 13 | 14 | // Define File-System Functions 15 | char *FS_Gamedir(); 16 | char *FS_Savedir(); 17 | int FS_SetGamedir( char* szGameDir ); 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /classic/src/File.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /classic/src/FontList.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | 12 | #if !defined(FONTLIST_H) 13 | #define FONTLIST_H 14 | 15 | #include 16 | #include 17 | 18 | #include "GeneralData.h" 19 | #include "FS_Functions.h" 20 | #include "TTFfont.h" 21 | 22 | class CFontList 23 | { 24 | 25 | private: 26 | SDL_Texture * font[127]; 27 | std::list m_pFonts; 28 | TextFont * m_pCurrentFont; 29 | 30 | void LoadBitmapFont(); 31 | void UnloadBitmapFont(); 32 | 33 | public: 34 | CFontList(); 35 | ~CFontList(); 36 | 37 | TextFont * CreateFont( int nSize ); 38 | void SetFontSize( int nSize ); 39 | 40 | TextFont * GetCurrentFont(); 41 | SDL_Texture * GetTexture( char q ); 42 | 43 | 44 | uint32_t DrawText(int x, int y, int scale, SDL_Color dwColor, char * strText); 45 | }; 46 | 47 | 48 | 49 | 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /classic/src/GameOver.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // GameOver.h: interface for the CGameOver class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #if !defined(AFX_GAMEOVER_H__5E6D708A_9AED_4C49_BBFB_6E388F6862D0__INCLUDED_) 16 | #define AFX_GAMEOVER_H__5E6D708A_9AED_4C49_BBFB_6E388F6862D0__INCLUDED_ 17 | 18 | #include "GeneralData.h" 19 | #define MAX_MENU_ITEMS 2 20 | 21 | struct _MenuItem{ 22 | char szName[64]; 23 | SDL_Point sMenuPos; 24 | }; 25 | 26 | 27 | class CGameOver 28 | { 29 | public: 30 | CGameOver(); 31 | virtual ~CGameOver(); 32 | 33 | bool m_bInUse; 34 | int m_nSelected; 35 | _MenuItem m_sMenuItems[MAX_MENU_ITEMS]; 36 | 37 | void PreGameOver(); 38 | void DoGameOver(); 39 | void HandleChoice(); 40 | 41 | }; 42 | 43 | #endif // !defined(AFX_GAMEOVER_H__5E6D708A_9AED_4C49_BBFB_6E388F6862D0__INCLUDED_) 44 | -------------------------------------------------------------------------------- /classic/src/Global.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2012 Luke Salisbury 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | #ifndef GLOBAL_H 12 | #define GLOBAL_H 13 | 14 | #include "CGame.h" 15 | 16 | CGame * GetGameObject(); 17 | SDL_Renderer * GetRendererObject(); 18 | 19 | #endif // GLOBAL_H 20 | -------------------------------------------------------------------------------- /classic/src/Hash.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | ////////////////////////////////////////////////////////////////////////// 12 | // File: DS_Hash.h 13 | // 14 | // Desc: Implementation of a hash table 15 | // 16 | // Date: 9th October 2001 17 | // 18 | // Author: Greg Denness 19 | // 20 | // Notes: Referenced from: 21 | // http://www.sparknotes.com/cs/searching/hashtables/ 22 | // 23 | ////////////////////////////////////////////////////////////////////////// 24 | 25 | #ifndef CHASH_H 26 | #define CHASH_H 27 | 28 | 29 | ///////////////////////// 30 | // Linked List Node - 'Bucket' 31 | // 32 | typedef struct _list_t_ { 33 | char *szString; 34 | void *pData; 35 | struct _list_t_ *pNext; 36 | } list_t; 37 | 38 | #include 39 | 40 | 41 | ///////////////////////// 42 | // CHash Class 43 | // 44 | class CHash 45 | { 46 | public: 47 | CHash(long lSize); 48 | ~CHash(); 49 | 50 | bool RemoveString(char *szStr); 51 | int AddString(char *szStr, void* pData);// Add a string to the table 52 | void* LookupString(char *szStr); // Check if a string exists and return it's 'bucket' 53 | 54 | 55 | private: 56 | std::map table; 57 | 58 | unsigned int Hash(char *szStr); // The Hash function 59 | }; 60 | 61 | 62 | 63 | #endif 64 | 65 | 66 | -------------------------------------------------------------------------------- /classic/src/Launcher.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | 12 | #include 13 | #include 14 | 15 | int (*openzelda_play)( SDL_Window * game_window, const char * quest ); 16 | 17 | extern "C" int main( int argc, char *argv[] ) 18 | { 19 | char so_path[512] = ""; 20 | char quest[512]=""; 21 | void * objectHandle; 22 | 23 | char * base_path = SDL_GetBasePath(); 24 | 25 | 26 | snprintf( so_path, 511,"%s/%s", base_path, LIBOZFILE ); 27 | 28 | objectHandle = SDL_LoadObject(so_path); 29 | if ( !objectHandle ) 30 | { 31 | SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,"Unable to load %s\n%s\n", LIBOZFILE, SDL_GetError()); 32 | exit(1); 33 | } 34 | 35 | 36 | if (SDL_Init(SDL_INIT_EVERYTHING) < 0) 37 | { 38 | SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,"Unable to init SDL: %s\n", SDL_GetError()); 39 | exit(1); 40 | } 41 | 42 | 43 | SDL_Window * window = SDL_CreateWindow("Open Zelda - Classic Edition", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, SDL_WINDOW_SHOWN|SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE ); 44 | 45 | openzelda_play = (int (*)( SDL_Window *, const char *))SDL_LoadFunction(objectHandle, "openzelda_play"); 46 | 47 | if ( argc > 1 ) 48 | { 49 | snprintf(quest, 512, "%s", argv[1] ); 50 | } 51 | else 52 | { 53 | //snprintf(quest, 512, "%s/quests/default.qst.gz", SDL_GetBasePath() ); 54 | } 55 | 56 | SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,"quest: %s\n", quest); 57 | openzelda_play( window, quest ); 58 | 59 | 60 | SDL_DestroyWindow(window); 61 | 62 | SDL_free(base_path); 63 | 64 | return 0; 65 | } 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /classic/src/OpenZelda.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/classic/src/OpenZelda.ico -------------------------------------------------------------------------------- /classic/src/OpenZelda_private.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENZELDA_PRIVATE_H 2 | #define OPENZELDA_PRIVATE_H 3 | 4 | /* VERSION DEFINITIONS */ 5 | #define VER_STRING "6.10.2.1412" 6 | #define VER_MAJOR 6 7 | #define VER_MINOR 10 8 | #define VER_RELEASE 2 9 | #define VER_BUILD 610 10 | #define COMPANY_NAME "" 11 | #define FILE_VERSION "6.10.2.1412" 12 | #define FILE_DESCRIPTION "Open Zelda Classic Edition" 13 | #define INTERNAL_NAME "ozc.exe" 14 | #define LEGAL_COPYRIGHT "" 15 | #define LEGAL_TRADEMARKS "Nintendo" 16 | #define PRODUCT_NAME "Open Zelda Classic Edition" 17 | #define PRODUCT_VERSION "6.10.2.1412" 18 | 19 | #endif /*OPENZELDA_PRIVATE_H*/ 20 | -------------------------------------------------------------------------------- /classic/src/OpenZelda_private.rc: -------------------------------------------------------------------------------- 1 | #include // include for version info constants 2 | 3 | 4 | ///////////////////////////////////////////////////////////////////////////// 5 | // 6 | // Icon 7 | // 8 | 9 | // Icon with lowest ID value placed first to ensure application icon 10 | // remains consistent on all systems. 11 | A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "OpenZelda.ico" 12 | 120 ICON DISCARDABLE "qst.ico" 13 | 14 | 1 VERSIONINFO 15 | FILEVERSION 6,10,2,1412 16 | PRODUCTVERSION 6,10,2,1412 17 | FILETYPE VFT_APP 18 | { 19 | BLOCK "StringFileInfo" 20 | { 21 | BLOCK "040904E4" 22 | { 23 | VALUE "CompanyName", "" 24 | VALUE "FileVersion", "6.10.2.1412" 25 | VALUE "FileDescription", "Open Zelda Classic Edition" 26 | VALUE "InternalName", "classicopenzelda.exe" 27 | VALUE "LegalCopyright", "" 28 | VALUE "LegalTrademarks", "Nintendo" 29 | VALUE "OriginalFilename", "classicopenzelda.exe" 30 | VALUE "ProductName", "Open Zelda Classic Edition" 31 | VALUE "ProductVersion", "6.10.2.1412" 32 | } 33 | } 34 | BLOCK "VarFileInfo" 35 | { 36 | VALUE "Translation", 0x0409, 1252 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /classic/src/PauseStack.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // PauseStack.h: interface for the CPauseStack class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #if !defined(AFX_PAUSESTACK_H__44CBBBDB_08A0_4897_99FE_67C4C26B3C38__INCLUDED_) 16 | #define AFX_PAUSESTACK_H__44CBBBDB_08A0_4897_99FE_67C4C26B3C38__INCLUDED_ 17 | 18 | #define MAX_STACK 20 19 | 20 | struct _PauseEntry{ 21 | int nPauseLevel; // The pause level being set 22 | char szScriptName[32]; // Name of script which called it 23 | long lLineNum; // Line number in script call 24 | }; 25 | 26 | 27 | class CPauseStack 28 | { 29 | _PauseEntry m_nPauseStack[MAX_STACK]; 30 | int m_nStackLevel; 31 | 32 | public: 33 | CPauseStack(); 34 | virtual ~CPauseStack(); 35 | 36 | void SetPauseLevel(int nLevel, long lLineNum, char* szScriptName ); 37 | void PurgeStack(); 38 | int GetPauseLevel(){ return m_nPauseStack[m_nStackLevel].nPauseLevel;} 39 | bool SearchStack(long lLineNum, char* szScriptName, int nLevel); 40 | }; 41 | 42 | #endif // !defined(AFX_PAUSESTACK_H__44CBBBDB_08A0_4897_99FE_67C4C26B3C38__INCLUDED_) 43 | -------------------------------------------------------------------------------- /classic/src/SaveLoadFunctions.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: SaveLoadFunctions.h 13 | // 14 | // Desc: Fuctions to save and load data 15 | // 16 | //----------------------------------------------------------------------------- 17 | 18 | #include "GeneralData.h" 19 | 20 | void SaveTheGame(int Slot); 21 | void SaveData( FILE* sfile, int Slot); 22 | void GetSaveFileName(char *buffer); 23 | bool CreateSaveFile(char *FileName); 24 | void WriteSlotHeader(FILE *sfile, char *Name ); 25 | void Writeint(FILE *sfile, char *Name, int val ); 26 | void WriteintNoHeader(FILE *sfile, int val ); 27 | void Writelong(FILE *sfile, char *Name, long val ); 28 | void WritelongNoHeader(FILE *sfile, long val ); 29 | void Writefloat(FILE *sfile, char *Name, float val ); 30 | void WritefloatNoHeader(FILE *sfile, float val ); 31 | void WriteSTRING(FILE *sfile,char *Name, char *val ); 32 | void WriteSTRINGNoHeader(FILE *sfile, char *val ); 33 | void fputsEx(char *String, FILE *sfile); 34 | bool FindSlotHeader(FILE *sfile, char *Name ); 35 | void Readint(FILE *sfile, char *Name, int &val ); 36 | void ReadintNoHeader(FILE *sfile, int &val ); 37 | void Readlong(FILE *sfile, char *Name, long &val ); 38 | void ReadlongNoHeader(FILE *sfile, long &val ); 39 | void Readfloat(FILE *sfile, char *Name, float &val ); 40 | void ReadfloatNoHeader(FILE *sfile, float &val ); 41 | void ReadSTRING(FILE *sfile, char *Name, char *val ); 42 | void ReadSTRINGNoHeader(FILE *sfile, char *val ); 43 | bool fgetsEx(char *Header, char *String, FILE *sfile, bool fSpanEntities = true); 44 | void WriteSlot( FILE* sfile, FILE* temp ); 45 | void LoadData( FILE* sfile, int Slot); 46 | void LoadTheGame(int Slot); 47 | -------------------------------------------------------------------------------- /classic/src/Script.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File: Script.h 13 | // 14 | // Desc: 15 | // 16 | // 17 | //----------------------------------------------------------------------------- 18 | #define STRICT 19 | #include "AMX/amx.h" 20 | 21 | // AMX functions 22 | void* loadprogram(AMX *amx, char *filename); 23 | bool RegisterNatives(AMX amx); 24 | bool GetStringParam(AMX *amx, cell sParam, char* szString); 25 | long TestCollidePoint(long x, long y, bool bIncludeObj); 26 | int CheckForHoleXY(long x, long y); 27 | -------------------------------------------------------------------------------- /classic/src/ShapeBuffer.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // ShapeBuffer.cpp: implementation of the CShapeBuffer class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #include "ShapeBuffer.h" 16 | #include "CGame.h" 17 | 18 | extern CGame* g_pGame; 19 | 20 | ////////////////////////////////////////////////////////////////////// 21 | // Construction/Destruction 22 | ////////////////////////////////////////////////////////////////////// 23 | 24 | CShapeBuffer::CShapeBuffer() 25 | { 26 | m_nShapes = 0; 27 | } 28 | 29 | CShapeBuffer::~CShapeBuffer() 30 | { 31 | 32 | } 33 | 34 | void CShapeBuffer::AddShape( int nType, RECT2D sRect, float fAngle, SDL_Color dwColour) 35 | { 36 | if (m_nShapes >= MAX_SHAPES ) 37 | return; 38 | 39 | m_Shapes[m_nShapes].nType = nType; 40 | m_Shapes[m_nShapes].sRect = sRect; 41 | m_Shapes[m_nShapes].fAngle = fAngle; 42 | m_Shapes[m_nShapes].dwColour = dwColour; 43 | m_nShapes++; 44 | } 45 | 46 | void CShapeBuffer::DrawShapes() 47 | { 48 | RECT2D sRect; 49 | int n; 50 | 51 | for ( n = 0 ; n < m_nShapes; n++ ) 52 | { 53 | if ( m_Shapes[n].nType == 0 ) 54 | { 55 | 56 | g_pGame->GetDisplay()->Rectangle(m_Shapes[n].sRect, 57 | DegToRad((int)m_Shapes[n].fAngle), 58 | m_Shapes[n].dwColour, true); 59 | } 60 | if ( m_Shapes[n].nType == 1 ) 61 | { 62 | sRect = m_Shapes[n].sRect; 63 | g_pGame->GetDisplay()->Line( sRect.left, sRect.top, sRect.right, sRect.bottom, 64 | m_Shapes[n].fAngle, m_Shapes[n].dwColour); 65 | } 66 | } 67 | 68 | 69 | m_nShapes = 0; 70 | } 71 | -------------------------------------------------------------------------------- /classic/src/ShapeBuffer.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // ShapeBuffer.h: interface for the CShapeBuffer class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #if !defined(AFX_SHAPEBUFFER_H__4E23174F_AF00_4B3F_B80C_5770A5BE3317__INCLUDED_) 16 | #define AFX_SHAPEBUFFER_H__4E23174F_AF00_4B3F_B80C_5770A5BE3317__INCLUDED_ 17 | 18 | #if _MSC_VER >= 1000 19 | #pragma once 20 | #endif // _MSC_VER >= 1000 21 | 22 | #include "GeneralData.h" 23 | 24 | #define MAX_SHAPES 200 25 | 26 | 27 | 28 | // Name: struct _ShapeBuffer 29 | struct _ShapeBuffer{ 30 | RECT2D sRect; 31 | float fAngle; 32 | SDL_Color dwColour; 33 | int nType; // 0- rectange 1- line 34 | }; 35 | 36 | 37 | class CShapeBuffer 38 | { 39 | _ShapeBuffer m_Shapes[MAX_SHAPES]; 40 | int m_nShapes; 41 | 42 | public: 43 | CShapeBuffer(); 44 | virtual ~CShapeBuffer(); 45 | 46 | void AddShape(int nType, RECT2D sRect, float fAngle, SDL_Color dwColour); 47 | void DrawShapes(); 48 | void ClearBuffer(){ m_nShapes = 0;} 49 | }; 50 | 51 | #endif // !defined(AFX_SHAPEBUFFER_H__4E23174F_AF00_4B3F_B80C_5770A5BE3317__INCLUDED_) 52 | -------------------------------------------------------------------------------- /classic/src/Socket.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | 12 | //----------------------------------------------------------------------------- 13 | // File: Socket.h 14 | // 15 | // Desc: Handles networking 16 | // 17 | //----------------------------------------------------------------------------- 18 | #ifndef CSOCKET_H 19 | #define CSOCKET_H 20 | 21 | #include "GeneralData.h" 22 | #include "CGame.h" 23 | 24 | //----------------------------------------------------------------------------- 25 | // Defines, constants, and global variables 26 | //----------------------------------------------------------------------------- 27 | 28 | 29 | 30 | 31 | //----------------------------------------------------------------------------- 32 | // Name: Class CSocket 33 | // Desc: 34 | //----------------------------------------------------------------------------- 35 | class CSocket 36 | { 37 | 38 | 39 | public: 40 | CSocket(); 41 | ~CSocket(); 42 | 43 | void SetSocket(int param, char* val); 44 | int ConnectSocket(); 45 | void CloseSocket(int i); 46 | void WriteSocket(int i); 47 | int ReadSocket(int i); 48 | uint32_t CheckSocket(); 49 | int AcceptSocket(); 50 | int ListenSocket(); 51 | 52 | }; 53 | #endif 54 | -------------------------------------------------------------------------------- /classic/src/SocketScript.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | //----------------------------------------------------------------------------- 12 | // File Name: SocketScript.cpp 13 | // 14 | // Desc: File holding small functions for sockets 15 | // 16 | //----------------------------------------------------------------------------- 17 | #include "CGame.h" 18 | #include "Socket.h" 19 | #include "Script.h" 20 | 21 | 22 | static cell AMX_NATIVE_CALL SocketRemoved(AMX *amx, cell *params) 23 | { 24 | return 0; 25 | } 26 | 27 | // ========================================= 28 | // Define a List of native General functions 29 | // ========================================= 30 | extern AMX_NATIVE_INFO socket_Natives[] = { 31 | { "SocketEvent", SocketRemoved }, 32 | { "SetSocket", SocketRemoved }, 33 | { "SocketConnect", SocketRemoved }, 34 | { "SocketDisconnect", SocketRemoved }, 35 | { "SocketSend", SocketRemoved }, 36 | { "SocketRead", SocketRemoved }, 37 | { "SocketAccept", SocketRemoved }, 38 | { "SocketListen", SocketRemoved }, 39 | { "isConnected", SocketRemoved }, 40 | { 0, 0 } 41 | }; 42 | -------------------------------------------------------------------------------- /classic/src/TTFfont.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | 12 | #include 13 | #include "FontList.h" 14 | #include "Global.h" 15 | 16 | 17 | TextFont::TextFont( char * name, uint32_t size ) 18 | { 19 | //font = NULL; 20 | 21 | m_dwFontHeight = size; 22 | } 23 | 24 | TextFont::~TextFont() 25 | { 26 | //TTF_CloseFont(font); 27 | //font = NULL; 28 | } 29 | 30 | uint32_t TextFont::GetSize() 31 | { 32 | return m_dwFontHeight; 33 | } 34 | 35 | uint32_t TextFont::DrawText( int x, int y, SDL_Color dwColor, char * strText ) 36 | { 37 | 38 | return GetGameObject()->GetFontList()->DrawText( x, y, m_dwFontHeight, dwColor, strText ); 39 | 40 | } 41 | 42 | uint32_t TextFont::DrawTextScaled(int x, int y, int z, float fXScale, float fYScale, SDL_Color dwColor, char * strText ) 43 | { 44 | return GetGameObject()->GetFontList()->DrawText( x, y, fXScale * m_dwFontHeight, dwColor, strText ); 45 | } 46 | 47 | uint32_t TextFont::GetTextExtent(char * strText, int32_t * piWidth, int32_t * piHeight ) 48 | { 49 | int32_t length = strlen(strText); 50 | *piWidth = 8 * length; 51 | *piHeight = m_dwFontHeight; 52 | return m_dwFontHeight; 53 | //return TTF_SizeText(font, strText, pSize, NULL); 54 | } 55 | 56 | Texture * TextFont::CreateTextTexture( SDL_Color dwColor, char * strText ) 57 | { 58 | return NULL; 59 | } 60 | -------------------------------------------------------------------------------- /classic/src/TTFfont.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | #ifndef TTFFONT_H 12 | #define TTFFONT_H 13 | 14 | #include 15 | //#include 16 | 17 | class TextFont 18 | { 19 | private: 20 | //TTF_Font * font; 21 | uint32_t m_dwFontHeight; 22 | public: 23 | TextFont( char * name, uint32_t size ); 24 | ~TextFont(); 25 | uint32_t GetSize(); 26 | uint32_t DrawText(int x, int y, SDL_Color dwColor, char * strText ); 27 | uint32_t DrawTextScaled( int x, int y, int z, float fXScale, float fYScale, SDL_Color dwColor, char * strText ); 28 | uint32_t GetTextExtent(char * strText, int32_t * piWidth , int32_t * piHeight); 29 | Texture * CreateTextTexture( SDL_Color dwColor, char * strText ); 30 | }; 31 | 32 | #endif // TTFFONT_H 33 | -------------------------------------------------------------------------------- /classic/src/TextBuffer.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // TextBuffer.cpp: implementation of the CTextBuffer class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #include "TextBuffer.h" 16 | #include "CGame.h" 17 | 18 | extern CGame* g_pGame; 19 | 20 | ////////////////////////////////////////////////////////////////////// 21 | // Construction/Destruction 22 | ////////////////////////////////////////////////////////////////////// 23 | 24 | CTextBuffer::CTextBuffer() 25 | { 26 | m_nTexts = 0; 27 | 28 | } 29 | 30 | CTextBuffer::~CTextBuffer() 31 | { 32 | 33 | } 34 | 35 | void CTextBuffer::AddText( char* szText, SDL_Point point, SDL_Color dwColour) 36 | { 37 | if (m_nTexts >= MAX_TEXTS ) 38 | return; 39 | 40 | strcpy( m_Text[m_nTexts].szText, szText ); 41 | m_Text[m_nTexts].sPoint = point; 42 | m_Text[m_nTexts].dwColour = dwColour; 43 | m_nTexts++; 44 | } 45 | 46 | 47 | void CTextBuffer::DrawTexts() 48 | { 49 | int n; 50 | 51 | if (!g_pGame->GetFontList()->GetCurrentFont()) 52 | return; 53 | 54 | for ( n = 0 ; n < m_nTexts; n++ ) 55 | { 56 | g_pGame->GetFontList()->GetCurrentFont()->DrawText( m_Text[n].sPoint.x, 57 | m_Text[n].sPoint.y, 58 | m_Text[n].dwColour, 59 | m_Text[n].szText); 60 | } 61 | 62 | m_nTexts = 0; 63 | } 64 | -------------------------------------------------------------------------------- /classic/src/TextBuffer.h: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | // TextBuffer.h: interface for the CTextBuffer class. 12 | // 13 | ////////////////////////////////////////////////////////////////////// 14 | 15 | #if !defined(AFX_TEXTBUFFER_H__89B46B4E_4376_40A9_BD40_16DEE4A45915__INCLUDED_) 16 | #define AFX_TEXTBUFFER_H__89B46B4E_4376_40A9_BD40_16DEE4A45915__INCLUDED_ 17 | 18 | #if _MSC_VER >= 1000 19 | #pragma once 20 | #endif // _MSC_VER >= 1000 21 | 22 | #include "GeneralData.h" 23 | #define MAX_TEXTS 100 24 | 25 | 26 | // Name: struct _TextBuffer 27 | struct _TextBuffer{ 28 | char szText[256]; 29 | SDL_Point sPoint; 30 | SDL_Color dwColour; 31 | }; 32 | 33 | 34 | 35 | class CTextBuffer 36 | { 37 | _TextBuffer m_Text[MAX_TEXTS]; 38 | int m_nTexts; 39 | 40 | public: 41 | CTextBuffer(); 42 | virtual ~CTextBuffer(); 43 | 44 | void AddText( char* szText, SDL_Point point, SDL_Color dwColour); 45 | void DrawTexts(); 46 | }; 47 | 48 | #endif // !defined(AFX_TEXTBUFFER_H__89B46B4E_4376_40A9_BD40_16DEE4A45915__INCLUDED_) 49 | -------------------------------------------------------------------------------- /classic/src/Texture.cpp: -------------------------------------------------------------------------------- 1 | /**************************** 2 | Copyright © 2002-2012 Open Zelda 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 8 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 9 | 3. This notice may not be removed or altered from any source distribution. 10 | ****************************/ 11 | #include "GeneralData.h" 12 | 13 | -------------------------------------------------------------------------------- /classic/src/keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/classic/src/keys.png -------------------------------------------------------------------------------- /classic/src/license.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2002-2012 Open Zelda 2 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 3 | 4 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 5 | 6 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 7 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 8 | 3. This notice may not be removed or altered from any source distribution. 9 | -------------------------------------------------------------------------------- /classic/src/qst.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/classic/src/qst.ico -------------------------------------------------------------------------------- /classic/uname.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | @echo WINDOWS -------------------------------------------------------------------------------- /compiling.txt: -------------------------------------------------------------------------------- 1 | 2 | Requirements 3 | ============================ 4 | 5 | Compiler 6 | ---------------------------- 7 | Any modern GCC would work, LLVM might also. 8 | 9 | 10 | Windows Compilers: 11 | TDM-GCC 12 | http://tdm-gcc.tdragon.net/ 13 | -or - 14 | Qt for Windows 32-bit (MinGW) 15 | http://www.qt.io/download-open-source/ 16 | 17 | Windows also requires MSYS 18 | http://sourceforge.net/projects/mingw/files/MSYS/ 19 | 20 | 21 | Libraries 22 | ---------------------------- 23 | - SDL 2.0.3* 24 | - SDL_Mixer 2.0.0* 25 | - GTK+ 2.20 / GTK+ 3.8 26 | - GtkSourceView (Not required) 27 | - libcurl (Not required) 28 | -------------------------------------------------------------------------------- /credits.txt: -------------------------------------------------------------------------------- 1 | Engine & Editor Programming: Luke 2 | Game Scripting: Luke. Credits also goes to GD, G8orByte, Satanman, HocusPocus & KingOfHeart. 3 | Media Content: Nintendo, Rippers: Luke (Artwork), El Oso Verde (IT Music), TheChemist (Artwork), GD (Artwork/Sound Effects), G8orByte(Sound Effects), HocusPocus (Artwork). 4 | Music provided by Zelda Reorchestrated http://www.zreomusic.com/ -------------------------------------------------------------------------------- /custom/ozengine/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleVersion 6 | 1.8 7 | CFBundleDocumentTypes 8 | 9 | 10 | CFBundleTypeMIMETypes 11 | 12 | application/x-open-zelda-quest 13 | 14 | CFBundleTypeName 15 | Quest File 16 | CFBundleTypeRole 17 | Viewer 18 | CFBundleTypeOSTypes 19 | 20 | Mokoi 21 | 22 | CFBundleTypeExtensions 23 | 24 | quest 25 | 26 | 27 | 28 | CFBundleName 29 | Open Zelda Player 30 | CFBundleExecutable 31 | openzelda 32 | LSMinimumSystemVersion 33 | 10.5.0 34 | CFBundleDisplayName 35 | Open Zelda Player 36 | CFBundleGetInfoString 37 | Open Zelda Player 38 | NSHumanReadableCopyright 39 | Open Zelda 40 | CFBundleIconFile 41 | openzelda-player.icns 42 | CFBundleIdentifier 43 | net.openzelda.player 44 | CFBundleInfoDictionaryVersion 45 | 6.0 46 | NSAppleScriptEnabled 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /custom/ozengine/openzelda-player.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/custom/ozengine/openzelda-player.icns -------------------------------------------------------------------------------- /custom/ozengine/openzelda-player.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/custom/ozengine/openzelda-player.ico -------------------------------------------------------------------------------- /custom/ozengine/openzelda.rc: -------------------------------------------------------------------------------- 1 | #include // include for version info constants 2 | 3 | A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "openzelda-player.ico" 4 | 5 | 1 VERSIONINFO 6 | FILEVERSION 0,9,6,1201 7 | PRODUCTVERSION 1,9,0,1201 8 | FILETYPE VFT_APP 9 | { 10 | BLOCK "StringFileInfo" 11 | { 12 | BLOCK "0C0904E4" 13 | { 14 | VALUE "CompanyName", "Open Zelda" 15 | VALUE "FileVersion", "20141201" 16 | VALUE "FileDescription", "Open Zelda - Zelda Game Creation Tool" 17 | VALUE "InternalName", "luxengine" 18 | VALUE "LegalCopyright", "Open Zelda openzelda.net" 19 | VALUE "LegalTrademarks", "" 20 | VALUE "OriginalFilename", "luxengine.exe" 21 | VALUE "ProductName", "Open Zelda" 22 | VALUE "ProductVersion", "1.9" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x0C09, 1252 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /custom/ozengine/packageopenzelda.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | enginedir=/Users/user/Source/openzelda/engine 4 | resourcesdir=/Users/user/Source/openzelda/resources 5 | output_dir=/Users/user/Source/ 6 | 7 | rm -R $output_dir/OpenZelda.app 8 | unzip -q $enginedir/custom/OpenZelda.app.zip -d $output_dir 9 | 10 | mkdir -p $output_dir/OpenZelda.app/Contents/share/openzelda-2.0/ 11 | 12 | cp $resourcesdir/bin/openzelda $output_dir/OpenZelda.app/Contents/MacOS/ 13 | cp $enginedir/custom/Info.plist $output_dir/OpenZelda.app/Contents/ 14 | cp $enginedir/custom/openzelda-player.icns $output_dir/OpenZelda.app/Contents/Resources/ 15 | cp $resourcesdir/share/openzelda-2.0/portal.css $output_dir/OpenZelda.app/Contents/share/openzelda-2.0/ 16 | cp $resourcesdir/share/openzelda-2.0/button-border.png $output_dir/OpenZelda.app/Contents/share/openzelda-2.0/ 17 | 18 | 19 | 20 | 21 | 22 | function do_strip { 23 | tp=$(file -b --mime-type "$1") 24 | 25 | if [ "$tp" != "application/octet-stream" ]; then 26 | return 27 | fi 28 | 29 | name=$(mktemp -t bundle) 30 | st=$(stat -f %p "$1") 31 | 32 | strip -o "$name" -S "$1" 33 | mv -f "$name" "$1" 34 | 35 | chmod "$st" "$1" 36 | chmod u+w "$1" 37 | } 38 | 39 | 40 | echo "Strip debug symbols from bundle binaries" 41 | 42 | # Strip debug symbols 43 | for i in $(find -E $output_dir"OpenZelda.app/Contents/Frameworks" -type f -regex '.*\.(so|dylib)$'); do 44 | do_strip "$i" 45 | done 46 | 47 | 48 | do_strip $output_dir"OpenZelda.app/Contents/MacOS/openzelda" 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /custom/questdesigner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleSignature 6 | OZQD 7 | CFBundlePackageType 8 | APPL 9 | CFBundleVersion 10 | 1.8 11 | CFBundleDocumentTypes 12 | 13 | 14 | CFBundleTypeExtensions 15 | 16 | zelda 17 | 18 | CFBundleTypeName 19 | Mokoi Game Source 20 | LSHandlerRank 21 | Default 22 | 23 | 24 | CFBundleName 25 | Quest Designer 26 | CFBundleExecutable 27 | quest_designer 28 | LSMinimumSystemVersion 29 | 10.5.0 30 | CFBundleDisplayName 31 | Quest Designer 32 | CFBundleGetInfoString 33 | Quest Designer 34 | NSHumanReadableCopyright 35 | Open Zelda 36 | CFBundleIconFile 37 | openzelda-quest-designer.icns 38 | CFBundleIdentifier 39 | net.openzelda.editor 40 | CFBundleInfoDictionaryVersion 41 | 6.0 42 | NSAppleScriptEnabled 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /custom/questdesigner/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/custom/questdesigner/banner.png -------------------------------------------------------------------------------- /custom/questdesigner/openzelda: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | open ../../../OpenZelda.app --args $1 3 | 4 | -------------------------------------------------------------------------------- /custom/questdesigner/openzelda-quest-designer.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/custom/questdesigner/openzelda-quest-designer.icns -------------------------------------------------------------------------------- /custom/questdesigner/openzelda-quest-designer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/custom/questdesigner/openzelda-quest-designer.ico -------------------------------------------------------------------------------- /custom/questdesigner/openzelda.rc: -------------------------------------------------------------------------------- 1 | #include // include for version info constants 2 | 3 | A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "openzelda-quest-designer.ico" 4 | 5 | 1 VERSIONINFO 6 | FILEVERSION 0,9,6,1201 7 | PRODUCTVERSION 1,9,0,1201 8 | FILETYPE VFT_APP 9 | { 10 | BLOCK "StringFileInfo" 11 | { 12 | BLOCK "0C0904E4" 13 | { 14 | VALUE "CompanyName", "Open Zelda" 15 | VALUE "FileVersion", "20141201" 16 | VALUE "FileDescription", "Quest Designer - Zelda Game Creation Tool" 17 | VALUE "InternalName", "Meg" 18 | VALUE "LegalCopyright", "Open Zelda openzelda.net" 19 | VALUE "LegalTrademarks", "" 20 | VALUE "OriginalFilename", "" 21 | VALUE "ProductName", "Open Zelda" 22 | VALUE "ProductVersion", "1.9.0" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x0C09, 1252 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /custom/questdesigner/quest_designer.launcher: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test "x$GTK_DEBUG_LAUNCHER" != x; then 4 | set -x 5 | fi 6 | 7 | if test "x$GTK_DEBUG_GDB" != x; then 8 | EXEC="gdb --args" 9 | else 10 | EXEC=exec 11 | fi 12 | 13 | name=`basename "$0"` 14 | tmp="$0" 15 | tmp=`dirname "$tmp"` 16 | tmp=`dirname "$tmp"` 17 | bundle=`dirname "$tmp"` 18 | bundle_contents="$bundle"/Contents 19 | bundle_res="$bundle_contents"/Resources 20 | bundle_lib="$bundle_res"/lib 21 | bundle_bin="$bundle_res"/bin 22 | bundle_data="$bundle_res"/share 23 | bundle_etc="$bundle_res"/etc 24 | 25 | export DYLD_LIBRARY_PATH="$bundle_lib" 26 | export XDG_CONFIG_DIRS="$bundle_etc"/xdg 27 | export XDG_DATA_DIRS="$bundle_data" 28 | export GTK_DATA_PREFIX="$bundle_res" 29 | export GTK_EXE_PREFIX="$bundle_res" 30 | export GTK_PATH="$bundle_res" 31 | export PANGO_LIBDIR="$bundle_lib" 32 | export PANGO_SYSCONFDIR="$bundle_etc" 33 | 34 | 35 | 36 | APP=name 37 | 38 | $EXEC "$bundle_contents/MacOS/$name-bin" "$@" $EXTRA_ARGS 39 | -------------------------------------------------------------------------------- /custom/questdesigner/questdesigner.bundle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ${env:JHBUILD_PREFIX} 5 | /Users/user/Source/openzelda/editor 6 | /Users/user/Source/openzelda/resources 7 | /Users/user/Source/ 8 | ${prefix:installer} 9 | 10 | gtk+-3.0 11 | 12 | ${prefix:editor}/custom/Info.plist 13 | ${prefix:resource}/bin/quest_designer 14 | ${prefix:editor}/custom/quest_designer.launcher 15 | ${prefix:resource}/bin/mokoipawnc4 16 | 17 | 18 | 19 | ${prefix}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.so 20 | ${prefix}/share/locale 21 | ${prefix}/share/themes 22 | ${prefix:editor}/custom/openzelda 23 | ${prefix:resource}/share 24 | ${prefix:editor}/custom/openzelda-quest-designer.icns 25 | ${prefix}/etc/gtk-3.0/* 26 | ${prefix}/share/glib-2.0/schemas/* 27 | 28 | 29 | ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/ 30 | ${prefix}/etc/pango/ 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /globalsettings.mk: -------------------------------------------------------------------------------- 1 | #Global Values 2 | 3 | BUILDCUSTOM=TRUE 4 | CUSTOMSETTINGS=openzelda 5 | INSTALLDIR?=/opt/openzelda 6 | BUILDDIR?=../openzelda/bin 7 | BUILDDEBUG?=TRUE 8 | SKIPMODULES?=TRUE 9 | -------------------------------------------------------------------------------- /openzelda/share/applications/OpenZelda.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Open Zelda 2.0 Beta 4 | GenericName=Open Zelda 5 | Comment= 6 | Exec=/opt/openzelda/bin/openzelda 7 | Icon=/opt/openzelda/share/icons/hicolor/openzelda-player.png 8 | Terminal=false 9 | Type=Application 10 | StartupNotify=true 11 | MimeType=application/x-openzelda-quest; 12 | Categories=Game; -------------------------------------------------------------------------------- /openzelda/share/applications/QuestDesigner.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Quest Designer 2.0 Beta 4 | GenericName=Quest Designer 5 | Comment= 6 | Exec=/opt/openzelda/bin/quest_designer 7 | Icon=/opt/openzelda/share/icons/hicolor/openzelda-quest-designer.png 8 | Terminal=false 9 | Type=Application 10 | StartupNotify=true 11 | MimeType=application/x-openzelda-quest-source 12 | Categories=Game; 13 | -------------------------------------------------------------------------------- /openzelda/share/gtksourceview-2.0/language-specs/readme.txt: -------------------------------------------------------------------------------- 1 | def.lang & language2.rng are part of the GtkSourceView project and are release under GNU LGPL 2.1 license 2 | 3 | http://projects.gnome.org/gtksourceview/ -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/16x16/mimetypes/application-x-openzelda-quest-source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/16x16/mimetypes/application-x-openzelda-quest-source.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/22x22/actions/draw-ellipse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/22x22/actions/draw-ellipse.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/22x22/actions/draw-path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/22x22/actions/draw-path.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/22x22/actions/draw-polygon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/22x22/actions/draw-polygon.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/22x22/actions/draw-rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/22x22/actions/draw-rectangle.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/22x22/actions/draw-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/22x22/actions/draw-text.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/48x48/apps/openzelda-player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/48x48/apps/openzelda-player.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/48x48/apps/openzelda-quest-designer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/48x48/apps/openzelda-quest-designer.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/openzelda-player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/openzelda-player.png -------------------------------------------------------------------------------- /openzelda/share/icons/hicolor/openzelda-quest-designer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/icons/hicolor/openzelda-quest-designer.png -------------------------------------------------------------------------------- /openzelda/share/mime/openzelda-quest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Open Zelda Quest 5 | 6 | 7 | 8 | 9 | 10 | 11 | Open Zelda Quest Source 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/binaries/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/binaries/readme.txt -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/button-border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/button-border.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/credits.txt: -------------------------------------------------------------------------------- 1 | Engine & Editor Programming: Luke 2 | Game Scripting: Luke. Credits also goes to GD, G8orByte, Satanman, HocusPocus & KingOfHeart. 3 | Media Content: Nintendo, Rippers: Luke (Artwork), El Oso Verde (IT Music), TheChemist (Artwork), GD (Artwork/Sound Effects), G8orByte(Sound Effects), HocusPocus (Artwork). 4 | Music provided by Zelda Reorchestrated http://www.zreomusic.com/ -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/dialog-border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/dialog-border.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/dialog/00.txt: -------------------------------------------------------------------------------- 1 | MSG_HELLO -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/dialog/en.txt: -------------------------------------------------------------------------------- 1 | Hello -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/edit.zelda: -------------------------------------------------------------------------------- 1 | [Mokoi] 2 | project.title=Preview Quest 3 | project.author=Open Zelda 4 | project.creation=1362109602 5 | project.id=1281603547 6 | player.number=2 7 | debug.able=false 8 | save.allowed=true 9 | map.width=512 10 | map.height=512 11 | screen.width=512 12 | screen.height=384 13 | display.width=512 14 | display.height=384 15 | language.default=en 16 | display.mode=OpenGL 17 | display.colour=0 18 | display.fullscreen=false 19 | string.layer0=Bottom Layer 20 | string.layer1=layer 1 21 | string.layer2=layer 2 22 | string.layer3=layer 3 23 | string.layer4=layer 4 24 | string.layer5=layer 5 25 | string.layer6=GUI Layer (Static) 26 | map.start=SimpleTitleScreen 27 | display.customsize=false 28 | audio.able=true 29 | save.access=false 30 | language.choose=false 31 | gui.style=dialog { border-image: dialog-border.png; border-width:12; color:#000000FF; box-model:box;} 32 | layer.static6=true 33 | control.buttons2=b109|b108|m1 34 | control.set2=controlaxisA0|controlaxisA1|mouse|b100|b101|b102|b103|b104|b105|b109|b106|b107|b108|b109|m1|m2|m3|m4|k2 35 | package.main=OpenZelda-2_0-Beta1.package -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/lang/00.txt: -------------------------------------------------------------------------------- 1 | Controls 2 | PressStart -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/lang/en.txt: -------------------------------------------------------------------------------- 1 | Movement: ▲▼ ◀▶\nUse Sword: ❶ 2 | Press ❼ to Play 3 | 4 | Press ❻ to Play -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/lang/qq.txt: -------------------------------------------------------------------------------- 1 | Movement: \342\226\262\342\226\274 \342\227\200\342\226\266\nUse Sword: \342\235\266\n 2 | Press ❻ to Play -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/Exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/Exit.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/SimpleTitleScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/SimpleTitleScreen.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/SimpleTitleScreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_bossroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_bossroom.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_bossroom.xml.entities: -------------------------------------------------------------------------------- 1 | d1_boss 288 160 2 | d1_bossroom_a 224 32 3 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_itemroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_itemroom.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_outside.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_outside.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_outside.xml.entities: -------------------------------------------------------------------------------- 1 | DungeonOutsideDoor 256 0 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_outsidetest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_outsidetest.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_outsidetest.xml.entities: -------------------------------------------------------------------------------- 1 | DungeonOutsideDoor 256 0 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room1.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room1.xml.entities: -------------------------------------------------------------------------------- 1 | D1_Ent 224 432 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room2.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room2.xml.entities: -------------------------------------------------------------------------------- 1 | dl_r2_d2 224 32 2 | d1_r2_d1 224 432 3 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room3.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room3.xml.entities: -------------------------------------------------------------------------------- 1 | 288 272 2 | 320 272 3 | 160 272 4 | 320 176 5 | 160 176 6 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room4.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room5.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room6.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room6.xml.entities: -------------------------------------------------------------------------------- 1 | d1_r6_a 432 192 2 | 240 224 3 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/d1_room7.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/empty.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/hud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/hud.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/hud.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/maps/thumbs/d1_bossroom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/maps/thumbs/d1_bossroom.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/preload/audio.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/preload/audio.txt -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/preload/entities.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/preload/entities.txt -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/preload/spritesheet.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/preload/spritesheet.txt -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/resources/icon256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/resources/icon256.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/resources/icon32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/resources/icon32.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/Exit.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/SimpleTitleScreen.mps: -------------------------------------------------------------------------------- 1 | forward public ReceivedData( size, data[] ) 2 | 3 | new online_version{64}; 4 | 5 | new music{64} = ""; 6 | new transition{20} = ""; 7 | 8 | new section_name{64} =""; 9 | new section_grid = 0; 10 | 11 | MapInit() 12 | { 13 | EntityGetSetting("music", music, SELF); 14 | EntityGetSetting("section", section_name); 15 | section_grid = EntityGetNumber("map"); 16 | 17 | 18 | AudioVolume(MUSIC, 64); 19 | if ( music{0} ) 20 | AudioPlayMusic(music); 21 | } 22 | 23 | public Init(...) 24 | { 25 | 26 | MapInit(); 27 | TextSprites(1,"alpha02.png"); 28 | 29 | } 30 | 31 | public Close() 32 | { 33 | TextSprites(0,""); 34 | } 35 | 36 | StartGame(n) 37 | { 38 | new x = (section_grid % 64); 39 | new y = (section_grid / 64); 40 | 41 | InputSetDefault(n); 42 | 43 | SectionSet(section_name, x, y) 44 | //TransitionPlayer( 0, 0, 0, section_name, x, y); 45 | 46 | } 47 | 48 | main() 49 | { 50 | if ( InputButton(0,2) || InputButton(1,2) ||InputButton(2,2) || InputButton(3,2) ) 51 | InputSetDefault(2); 52 | 53 | if ( InputButton(0,1) || InputButton(1,1) ||InputButton(2,1) || InputButton(3,1) ) 54 | InputSetDefault(1); 55 | 56 | 57 | if ( InputButton(6,1) == 1 ) 58 | StartGame(1); 59 | 60 | if ( InputButton(6,2) == 1 ) 61 | StartGame(2); 62 | 63 | } 64 | 65 | 66 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/SimpleTitleScreen.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_bossroom.mps: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | main() 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_bossroom.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_itemroom.mps: -------------------------------------------------------------------------------- 1 | #define NOINITFUNCTION 1 2 | #include 3 | 4 | main() 5 | { 6 | 7 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_itemroom.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_outside.mps: -------------------------------------------------------------------------------- 1 | // To ease development, may include a Init Function. 2 | // If You wish to use your own uncomment the next line 3 | #define HASINITFUNCTION 1 4 | #tryinclude 5 | #tryinclude 6 | 7 | 8 | public Init( ... ) 9 | { 10 | InitMap(); 11 | ResetEnemyCount() 12 | EntityPublicFunction( ENTITY_MAIN, "SetDay", ''n'', 1); 13 | } 14 | 15 | main() 16 | { 17 | 18 | CheckEnemy( "DungeonOutsideDoor", "OpenDoor" ); 19 | } 20 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_outside.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_outsidetest.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room1.mps: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | main() 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room1.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room2.mps: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | main() 5 | { 6 | DebugText("%d %d", switches, switch_pressed ); 7 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room2.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room3.mps: -------------------------------------------------------------------------------- 1 | #define NOINITFUNCTION 1 2 | #include 3 | 4 | main() 5 | { 6 | 7 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room3.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room4.mps: -------------------------------------------------------------------------------- 1 | #define NOINITFUNCTION 1 2 | #include 3 | 4 | main() 5 | { 6 | 7 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room4.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room5.mps: -------------------------------------------------------------------------------- 1 | #define NOINITFUNCTION 1 2 | #include 3 | 4 | main() 5 | { 6 | 7 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room5.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room6.mps: -------------------------------------------------------------------------------- 1 | #define NOINITFUNCTION 1 2 | #include 3 | 4 | main() 5 | { 6 | 7 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room6.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room7.mps: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | forward public SetPlayerPosition(x, y, z); 4 | 5 | new xx, yx, zx; 6 | new timer = 100; 7 | new Fixed:a = 1.0; 8 | new Fixed:position[3][2] = [ [272.0,96.0], [336.0,240.0],[208.0,320.0] ]; 9 | 10 | public SetPlayerPosition(x, y, z) 11 | { 12 | xx = fround(Fixed:x)+8; 13 | yx = fround(Fixed:y)+32; 14 | zx = 3000; 15 | } 16 | 17 | main() 18 | { 19 | if ( xx < 10 ) 20 | return; 21 | 22 | if ( !MaskGetValue(xx+8, yx+8) ) 23 | { 24 | if ( TimerCountdownWithReset( timer, 800 ) ) 25 | { 26 | for ( a = 1.0; a < 380.0; a += 20.0 ) 27 | { 28 | EntityCreate("attack_flamethrower1", "", position[0][0], position[0][1], 3.00, CURRENT_MAP, ''d'', a ); 29 | EntityCreate("attack_flamethrower1", "", position[1][0], position[1][1], 3.00, CURRENT_MAP, ''d'', a ); 30 | EntityCreate("attack_flamethrower1", "", position[2][0], position[2][1], 3.00, CURRENT_MAP, ''d'', a ); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/d1_room7.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/empty.mps: -------------------------------------------------------------------------------- 1 | #tryinclude 2 | 3 | 4 | main() 5 | { 6 | GameState(1); 7 | /**/ 8 | } 9 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/empty.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/hud.mps.options: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/routines/enemy_check.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2010/01/11 [luke]: new file. 12 | ***********************************************/ 13 | #include 14 | 15 | forward public KilledEnemy(); 16 | 17 | stock _enemycount = -1; 18 | 19 | stock CheckEnemy( entity_name{}, function{} ) 20 | { 21 | DebugText("CheckEnemy %d", _enemycount); 22 | if ( _enemycount >= 0 ) 23 | { 24 | if ( _enemycount == 0 ) 25 | { 26 | if ( entity_name{0} && function{0} ) 27 | EntityPublicFunction( EntityHash(entity_name), function, [ ARG_END ] ); 28 | else 29 | DialogShow( 1 ); 30 | _enemycount = -2; 31 | } 32 | } 33 | else if ( _enemycount == -1 ) 34 | { 35 | _enemycount = 0; 36 | if ( EntitiesList(map_id) ) 37 | { 38 | new child_entity; 39 | 40 | while ( EntitiesNext(child_entity, map_id) ) 41 | { 42 | if ( TYPE_ENEMY == EntityPublicFunction( child_entity, "GetType") ) 43 | _enemycount++; 44 | } 45 | 46 | } 47 | 48 | } 49 | 50 | } 51 | 52 | public KilledEnemy() 53 | { 54 | _enemycount--; 55 | } 56 | 57 | ResetEnemyCount() 58 | { 59 | _enemycount = -1; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/maps/routines/standard.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2013/04/01 [luke]: new file. 12 | ***********************************************/ 13 | 14 | 15 | 16 | new background_music{64} = ""; 17 | new screen_transition_mode{20} = ""; 18 | new map_id = 0; 19 | 20 | InitMap() 21 | { 22 | map_id = MapCurrent(); 23 | EntityGetSetting("music", background_music, SELF); 24 | EntityGetSetting("transition", screen_transition_mode, SELF); 25 | AudioVolume(MUSIC, 64); 26 | if ( background_music{0} ) 27 | AudioPlayMusic(background_music); 28 | } 29 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/counters.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2010/01/11 [luke]: new file. 12 | * 2013/01/31 [luke]: switch to Pawn 4 13 | ***********************************************/ 14 | 15 | /* Counters */ 16 | #define CounterLocation[.name{20}, .entityID, .screenX, .screenY] 17 | 18 | new counters[3][CounterLocation] = [ 19 | ["p_rupees", 0, 72, 36], 20 | ["p_arrows", 0, 136, 36], 21 | ["p_bombs", 0, 200, 36] 22 | ] 23 | 24 | 25 | CreateCounters() 26 | { 27 | for ( new q = 0; q < 3; q++ ) 28 | { 29 | counters[q].entityID = EntityCreate("counter", counters[q].name, counters[q].screenX, counters[q].screenY, 1, GLOBAL_MAP); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/dungeon.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2010/01/11 [luke]: new file. 12 | * 2013/01/31 [luke]: switch to Pawn 4 13 | ***********************************************/ 14 | #include 15 | 16 | forward public AddSwitch(); 17 | forward public SwitchPressed(); 18 | forward public SwitchRelease(); 19 | 20 | 21 | new switches = 0; 22 | new switch_pressed = 0; 23 | 24 | new on_events[SwitchEvent]; 25 | new off_events[SwitchEvent]; 26 | 27 | DungeonMapInit() 28 | { 29 | 30 | switches = 0; 31 | 32 | EntityGetSetting("on-event", on_events.function ); 33 | on_events.entity = EntityGetSettingHash("on-entity"); 34 | 35 | EntityGetSetting("off-event", off_events.function ); 36 | off_events.entity = EntityGetSettingHash("off-entity" ); 37 | 38 | 39 | if ( StringLength(off_events.function) && off_events.entity ) 40 | off_events.active = true; 41 | if ( StringLength(on_events.function) && on_events.entity ) 42 | on_events.active = true; 43 | InitMap(); 44 | } 45 | 46 | /* Switches */ 47 | public AddSwitch() 48 | { 49 | switches++; 50 | } 51 | 52 | public SwitchPressed() 53 | { 54 | switch_pressed++; 55 | if ( switch_pressed == switches) 56 | { 57 | if ( on_events.active ) 58 | EntityPublicFunction(on_events.entity, on_events.function); 59 | } 60 | } 61 | 62 | public SwitchRelease() 63 | { 64 | if ( switch_pressed == switches ) 65 | { 66 | if ( off_events.active ) 67 | EntityPublicFunction(off_events.entity, off_events.function); 68 | } 69 | switch_pressed--; 70 | 71 | } 72 | 73 | #if !defined HASINITFUNCTION 74 | #define HASINITFUNCTION 1 75 | public Init( ... ) 76 | { 77 | DungeonMapInit() 78 | } 79 | #endif 80 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/entity_graphics.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2013/04/01 [luke]: new file. 12 | ***********************************************/ 13 | 14 | 15 | 16 | 17 | stock ReplaceEntityGraphics( display_object[EntityGraphic], image{}, bool:flip, bool:force = false ) 18 | { 19 | if ( mqUpdate || force ) 20 | { 21 | ObjectReplace( display_object.obj, image, SPRITE ); 22 | ObjectEffect( display_object.obj, .mirror = (flip ? 16 : 0) ); 23 | } 24 | } 25 | 26 | stock UpdateEntityGraphics( display_object[EntityGraphic] ) 27 | { 28 | ObjectPosition( display_object.obj, mqDisplayArea.x + display_object.x, mqDisplayArea.y + display_object.y, mqDisplayZIndex + display_object.z, display_object.width, display_object.height); 29 | } 30 | 31 | 32 | stock CreateEntityGraphics( display_object[EntityGraphic], initial_sprite{} ) 33 | { 34 | display_object.obj = ObjectCreate( initial_sprite, SPRITE, mqDisplayArea.x + display_object.x, mqDisplayArea.y + display_object.y, mqDisplayZIndex + display_object.z, display_object.width, display_object.height, WHITE ); 35 | } 36 | 37 | stock DeleteEntityGraphics( display_object[EntityGraphic] ) 38 | { 39 | ObjectDelete( display_object.obj ); 40 | display_object.obj = OBJECT_NONE; 41 | } 42 | 43 | 44 | stock ColourEntityGraphics( display_object[EntityGraphic], colour ) 45 | { 46 | ObjectEffect( display_object.obj, colour ); 47 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/game_default.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2010/01/11 [luke]: new file. 12 | ***********************************************/ 13 | #include 14 | #include 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/item.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2010/01/11 [luke]: new file. 12 | ***********************************************/ 13 | 14 | forward public Pickup( player ); 15 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/language_info.inc: -------------------------------------------------------------------------------- 1 | #define DIALOG_Edit Me 0 2 | #define LANG_TITLE 0 3 | #define LANG_Enemies_Killed 1 4 | #define LANG_TeSt 2 5 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/map_default.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2010/01/11 [luke]: new file. 12 | ***********************************************/ 13 | #include 14 | 15 | 16 | #if !defined HASINITFUNCTION 17 | #define HASINITFUNCTION 1 18 | public Init( ... ) 19 | { 20 | InitMap() 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/open_zelda.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 12 | ***********************************************/ 13 | 14 | #include 15 | #include -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/scripts/routines/weapon.inc: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | * Copyright © Luke Salisbury 3 | * 4 | * You are free to share, to copy, distribute and transmit this work 5 | * You are free to adapt this work 6 | * Under the following conditions: 7 | * You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). 8 | * You may not use this work for commercial purposes. 9 | * Full terms of use: http://creativecommons.org/licenses/by-nc/3.0/ 10 | * Changes: 11 | * 2010/01/11 [luke]: new file. 12 | * 2013/04/01 [luke]: 13 | ***********************************************/ 14 | 15 | new entityId:ownerid; 16 | 17 | /* Public Function - Do not change */ 18 | forward public Use( object:player, dir ) 19 | forward public End( object:player, dir ) 20 | forward public SetOwner( owner ); 21 | 22 | public SetOwner( owner ) 23 | { 24 | ownerid = entityId:owner; 25 | } -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/sprites/__banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/sprites/__banner.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/sprites/openzelda-mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/examples/Preview/sprites/openzelda-mid.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/sprites/openzelda-mid.png.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/examples/Preview/worlds/Dungeon_One.txt: -------------------------------------------------------------------------------- 1 | # 0 64 64 2 | d1_outside 0 0 1 1 3 | d1_room1 2 4 1 1 4 | d1_room2 2 3 1 1 5 | d1_room3 2 2 1 1 6 | d1_room5 3 2 1 1 7 | d1_room4 3 3 1 1 8 | d1_room6 4 4 1 1 9 | d1_room7 3 4 1 1 10 | d1_bossroom 5 4 1 1 11 | d1_itemroom 5 3 1 1 12 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/common.css: -------------------------------------------------------------------------------- 1 | div { max-height: 100%; padding:.5em; margin:.5em; background:#fff; border:#999 dotted 1px; overflow: none; font-family: sans-serif; } 2 | .docnavbar { text-align:center; } 3 | pre { margin: 0 0 0.5em 0.5em; background:#DDD; border:#999 dotted 1px; } 4 | p, h1, h2, h3 { margin: 0 0 .7em 0; } 5 | 6 | /* 7 | highlight.js 8 | github.com style (c) Vasily Polovnyov 9 | 10 | */ 11 | 12 | pre code { 13 | display: block; padding: 0.5em; 14 | color: #333; 15 | background: #f8f8ff 16 | } 17 | 18 | pre .comment, 19 | pre .template_comment, 20 | pre .diff .header, 21 | pre .javadoc { 22 | color: #998; 23 | font-style: italic 24 | } 25 | 26 | pre .keyword, 27 | pre .css .rule .keyword, 28 | pre .winutils, 29 | pre .javascript .title, 30 | pre .nginx .title, 31 | pre .subst, 32 | pre .request, 33 | pre .status { 34 | color: #333; 35 | font-weight: bold 36 | } 37 | 38 | pre .number, 39 | pre .hexcolor, 40 | pre .ruby .constant { 41 | color: #099; 42 | } 43 | 44 | pre .string, 45 | pre .tag .value, 46 | pre .phpdoc, 47 | pre .tex .formula { 48 | color: #d14 49 | } 50 | 51 | pre .title, 52 | pre .id { 53 | color: #900; 54 | font-weight: bold 55 | } 56 | 57 | pre .javascript .title, 58 | pre .lisp .title, 59 | pre .clojure .title, 60 | pre .subst { 61 | font-weight: normal 62 | } 63 | 64 | pre .class .title, 65 | pre .haskell .type, 66 | pre .vhdl .literal, 67 | pre .tex .command { 68 | color: #458; 69 | font-weight: bold 70 | } 71 | 72 | pre .tag, 73 | pre .tag .title, 74 | pre .rules .property, 75 | pre .django .tag .keyword { 76 | color: #000080; 77 | font-weight: normal 78 | } 79 | 80 | pre .attribute, 81 | pre .variable, 82 | pre .lisp .body { 83 | color: #008080 84 | } 85 | 86 | pre .regexp { 87 | color: #009926 88 | } 89 | 90 | pre .class { 91 | color: #458; 92 | font-weight: bold 93 | } 94 | 95 | pre .symbol, 96 | pre .ruby .symbol .string, 97 | pre .lisp .keyword, 98 | pre .tex .special, 99 | pre .prompt { 100 | color: #990073 101 | } 102 | 103 | pre .built_in, 104 | pre .lisp .title, 105 | pre .clojure .built_in { 106 | color: #0086b3 107 | } 108 | 109 | pre .preprocessor, 110 | pre .pi, 111 | pre .doctype, 112 | pre .shebang, 113 | pre .cdata { 114 | color: #999; 115 | font-weight: bold 116 | } 117 | 118 | pre .deletion { 119 | background: #fdd 120 | } 121 | 122 | pre .addition { 123 | background: #dfd 124 | } 125 | 126 | pre .diff .change { 127 | background: #0086b3 128 | } 129 | 130 | pre .chunk { 131 | color: #aaa 132 | } 133 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Building.xml: -------------------------------------------------------------------------------- 1 |
2 |

How to Build

3 |

First check out the latest code from the Git

4 |
git clone git://git.code.sf.net/p/mokoi/source mokoi-source
5 |

Then you can run make to build the important parts of Mokoi.

6 |
 7 | cd mokoi-source
 8 | make all
 9 | 	
10 |

Note: If you not building for the system your on, you must set BUILDOS variable before running Make

11 |
12 | export BUILDOS=dreamcast
13 | make all
14 | 	
15 |

* note: windows users would set instead of export.

16 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Demo.xml: -------------------------------------------------------------------------------- 1 |
2 |

Demos

3 | 16 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Demo_Audio.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Audio/File System Demo

4 | 5 |

Just simple audio player that read the the contents of the game's file, directory and patches. Also show off the dialog system.

6 | 7 | 8 |

Script Functions Used

9 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |

25 | 26 | 27 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/DesignNotes.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Design Notes

4 | 9 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/DesignNotes_Controller.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

Controller

5 | 6 | 7 |

Defining Custom Controls

8 |

Control configuration are store in | separated list. They are stored in this order, Axis 1, Axis 2, Pointer, Button 0, ... , Button 15.

9 | 10 |

Axis

11 |

Each axis is three values between -255 and 255 representing x,y,z axis.

12 | 13 | Predefine Options 14 |
    15 |
  • arrows
  • 16 |
  • numpad
  • 17 |
  • keyboard-wasd
  • 18 |
  • mouse (not supported yet)
  • 19 |
  • touchscreen (not supported yet)
  • 20 |
  • controlaxis
  • 21 |
22 | 23 |

Pointer

24 |

x/y values of the mouse, touchscreen or controller stick.

25 | Predefine Options 26 |
    27 |
  • mouse
  • 28 |
  • touchscreen (not supported yet)
  • 29 |
  • controlaxis
  • 30 |
31 | 32 |

Button

33 |

Button is a off/on control. Unlike Axis and pointer, you use a prefix followed by number representing the input.

34 | 35 | Predefine Prefix 36 |
    37 |
  • k for keyboard key.
  • 38 |
  • m for mouse button.
  • 39 |
  • b for controller button.
  • 40 |
  • h for controller hat.
  • 41 |
42 | 43 |

Example

44 |
arrows|mouse|mouse|k04|k022|k07|k020|k026|k08|k040|k079|k080|k081|k082|m01|m02|m03|m04|k041|k040|k041|m01|k061
45 |

Note the A0 after controlaxis, that stands for controller A, axis 0.

46 | 47 | 48 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/DesignNotes_GUIStyling.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

GUI Styling

5 |

CSS-like styling for the GUI component.

6 |

Example gui.style setting

7 |
 8 | 	dialog { border-image: dialog-border.png; border-width:12; color:#000000FF; box-model:box; }
 9 | 	imagebutton { color: #FFFFFFFF; border-color: #1A0D27DD; background-color: #27143ADD; border-width: 1; border-color: #000000FF; border-style:solid; }
10 | 	imagebutton:hover { color: #FFFFFFFF; border-color: #000000FF; background-color: #575570DD; border-width: 1; border-color: #000000FF; border-style:solid; }
11 | 	guibackground { background-color: #007DBDFF; background-color2: #ACD2E7FF; background-style: vertical-gradient; }
12 | 	text, text:hover { background-color: #2F1648FF; background-color2: #361E50FF; background-style: vertical-gradient;}
13 | 	
14 | 15 |

Elements

16 |
    17 |
  • emptywindow
  • 18 |
  • dialogok
  • 19 |
  • dialogyesno
  • 20 |
  • dialogyesnocancel
  • 21 |
  • dialogtext
  • 22 |
  • throbber
  • 23 |
  • checkbox
  • 24 |
  • text
  • 25 |
  • inputtext
  • 26 |
  • button
  • 27 |
  • imagebutton
  • 28 |
  • image
  • 29 |
  • box
  • 30 |
31 | 32 |

Element States

33 |
    34 |
  • enabled
  • 35 |
  • pressed
  • 36 |
  • hover
  • 37 |
  • clicked
  • 38 |
  • active
  • 39 |
  • disabled
  • 40 |
  • activehover
  • 41 |
42 | 43 | 44 |

Properties

45 |

Note: Doesn't support multiple values for a property.

46 | 47 |
    48 |
  • background-color
  • 49 |
  • background-color-secondary
  • 50 |
  • background-style
  • 51 | 52 |
  • border-color
  • 53 |
  • border-image
  • 54 |
  • border-style
  • 55 |
  • border-width
  • 56 | 57 |
  • color
  • 58 |
  • color-secondary
  • 59 |
  • style
  • 60 |
61 | 62 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/DesignNotes_GameProcess.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |

Game Process

5 |

Game Objects (Display Objects/Entities) are classed as either global or local objects. Global objects are always active, while local object are only active then their map is active.

6 | 7 |

Each Frame (Basic)

8 |
 9 |   - Game World
10 |   |
11 |   |-- Global Entities
12 |   |
13 |   |-- Map
14 |        |
15 |        |-- Map Entities
16 |   - Update Display
17 | 	
18 | 19 |

Game World

20 |
21 |   - Check if View has Moved off Map
22 |   |- If Map is part of Section?
23 |   | |- Switch to neighbouring map
24 |   |- Else
25 |   | |- Stay on map
26 | 
27 | 	
28 | 29 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Editor.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Editor

4 |

5 | 6 | 15 | 16 |

Other Features

17 | 18 | 19 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Editor_Audio.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Audio Page

4 | 5 |

Audio file can be played by double clicking on the list. If it doesn't play, it's unlikely to be supported in the game itself

6 | 7 |

Adding Audio

8 |

Just remember to check the 'Treat as Music' box if you want to use the file as a music file.

9 | 10 | 11 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Editor_Entities.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Entity Scripts

4 | 5 |

Entity Scripts controls how the objects are handle within the game. These scripts are written in Pawn Language which you can read more about along with interface here.

6 | 7 |

Entity Editor

8 |

9 |
    10 |
  • Hover over the gutter (line numbers) when the line is red to see the error message.
  • 11 |
  • Highlight a function name and you can right click and select search help and the function will get display in the Help Section.
  • 12 |
  • Ctrl + space brings up function auto-complete.
  • 13 |
14 | 15 |

Insert Function

16 |

When in the Entity Editor, the Insert Function dialog window can be brought up by right clicking.

17 |

18 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Editor_Language.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Language Editor

4 |

The language editor allow you to manage the Dialog text and Code strings for your game in multiple languages.

5 |

Initial, you will have the 'lang\00.txt' and 'dialog\00.txt' loaded and these will act as the base for other languages as well.

6 |

If you wish to support more that language in your game, Set the configuration option 'language.available' to list of languages separated by |. example: en|de|fr

7 |

Support of non-english languages is very low, due the developer only knowing English, any help would be appreciated.

8 | 9 | 10 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Editor_Maps.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Map Editor

4 | 5 |

Shortcuts Keys

6 |
    7 |
  • 0-9 keys - Change the Layer.
  • 8 |
  • F - Flip Selected Object.
  • 9 |
  • Space - Rotate Selected Object 90 degrees.
  • 10 |
  • Arrow Keys - Move Selected Object.
  • 11 |
  • Shift + Arrow Keys - Tile Selected Object.
  • 12 |
  • Shift + Click - Continue adding object.
  • 13 |
14 | 15 |

Toolbar

16 | 17 |
    18 |
  • Save
  • 19 |
  • Current Layer (Also changeable with 0-9 keys)
  • 20 |
  • Current Layer Display Toggle
  • 21 |
  • Zoom In
  • 22 |
  • Zoom Original
  • 23 |
  • Zoom Out
  • 24 |
  • Align to Grid
  • 25 |
26 | 27 |

Display Object Sidebar

28 | 29 |

Display Object groups ( include Sprite sheets ) can be change by using the combo box.

30 |

Display Object can be selected by double clicking or by pressing enter.

31 | 32 | 33 |

Map Options

34 | 35 |

Wrap: Allow the map to wrap around selectable axis

36 | 37 | 38 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Editor_Spritesheet.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Sprite Sheet Editor

4 | 5 |

Sprite sheets are collection of sprites on a image file, which allows for easy management and editing via 3rd party project.

6 | 7 |

The sprite sheet editor is split in two sections, the right is visual panel use for creating sprites on the current sheet, the left is for adding and remove sheets along with sprite deletion.

8 | 9 |

Add Sheets

10 |

Add a sheet can be done by press the add button and selecting a image file or by dragging and dropping the file. All image files are converted to PNG format.

11 | 12 |

Quick Creation Dialog

13 | 14 |

When adding a new sheet the quick creation dialog will pop up. If you sheet made from tiles you set the details in the dialog and it will create sprites for the sheet automatically.

15 | 16 |

Add Sprites and Animation

17 | 18 |

New Sprites can be added by selecting it region then you are in Create Mode

19 |

Once the area is selected, the New Sprite/Animation dialog appears, allowing the fine tuning of the dimensions, mask and set a default attached entity. Spiting into Animation fields allows you to take the selected region and split it in to frames either horizontal or vertical.

20 | 21 |

Editing Sprites

22 |

Editing Sprite dialog windows allow you to fine tuning of the dimensions, mask, border and change default attached entity.

23 | 24 |

You can also set up to 7 collision rectangle for the sprite which can be use with any entity that uses that sprite with the Scripting function CollisionFromObject

25 | 26 |

Editing Animation

27 | 28 |

Frames

29 |

Each frame can be drag and drop, and can have offset for both axis.

30 | 31 |

Preview

32 |

The preview can be update by double clicking on it. Red dots show the offsets of the frames.

33 | 34 | 35 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Editor_Worlds.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

World Editor

4 |

5 | 6 |

Worlds a group of maps, which allow automatic movement between maps.

7 | 8 |

Controls

9 |
    10 |
  • Double clicking on map will open it.
  • 11 |
  • Clicking on empty grid, brings up the add map dialog.
  • 12 |
  • Right clicking will remove map from the grid.
  • 13 |
14 | 15 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Guides.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Guides

4 | 8 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Guides_CreatingGames.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Creating Games

4 |

For the time being, we recommend looking at the include demos, which is located in the 'share/mokoi-1.0/examples' directory, and the Hello World example game to get the hang of how Mokoi Games work. For a list of available functions please look at Game Scripting page.

5 | 6 |

Tutorials

7 | 14 | 15 |

Example Games

16 | 20 | 21 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Scripting.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Scripting Language Basics

4 | 5 |

Game Entities are written in the Pawn Language. Some extra documentation on using the language, you can find it at http://www.compuphase.com/pawn/.

6 | 15 | 16 | 17 | 18 | 19 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Tutorials.xml: -------------------------------------------------------------------------------- 1 |
2 |

Tutorials

3 |
    4 |
  1. Hello World
  2. 5 |
  3. Using Graphics
  4. 6 |
  5. Basic Entity
  6. 7 |
  7. Moving Entity
  8. 8 |
9 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Tutorials_1HelloWorld.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Tutorial: Hello World

4 |

Step 1

5 |

Start the Editor and Create an New Game. Make sure you give it a Title.

6 | 7 | 8 |

Step 2

9 |

Switch over to Maps, and open the existing 'empty' map.

10 | 11 |

Step 3

12 |

Open up the Script for the map by pressing the 'Edit Script' Button on the right side of Editor, under the Setting Tab.

13 |
14 |

It should bring up a script that looks like:

15 |
// To ease development, <map_default> may include a Init Function.
16 | // If You wish to use your own uncomment the next line
17 | //#define HASINITFUNCTION 1
18 | #tryinclude <map_default>
19 | #tryinclude <standard>>
20 | main()
21 | {
22 |   //Your Code
23 | }
24 |

The script should just contain the 'main' function and code inside this function will be executed each frame.

25 |

Now lets replace that script with this:

26 |
//This is a comment, any text follow the 2 / on that line will be ignored 
27 | main()
28 | {
29 |   /* Objects drawn with Draw only last that frame */
30 |   GraphicsDraw("HelloWorld", TEXT, 200, 200, 1,0,0, WHITE ); /* See Help for info on GraphicsDraw Function */
31 |   // ^ highlight Function and press F1 to open up Help 
32 | }
33 |

and click Save.

34 | 35 |

Step 4

36 |

Select 'Play' from the Project Menu. You should see HelloWorld display on the screen.

37 | 38 | 39 |

Step 5

40 |

Experiment.

41 | 42 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Tutorials_2UsingGraphics.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Tutorial: Using Graphics

4 |

Step 1 - Starting

5 |

Start the Editor and Create an New Game. Make sure you give it a Title.

6 | 7 |

Step 2 - Import Graphics

8 | 9 |

Switch to the Spritesheet Editor component, and click on the add button, as see in image to the right.

10 | 11 |

Now you can select a image file you wish to import, for this tutorial we offer a very basic image for that. Just save the following image to your computer.

12 |

http://mokoi.github.io/mokoi-docs/images/tutorial-sheet1.png

13 | 14 |

Following sheet selection, the Quick Create Dialog pops up. If the sheet you are importing is not made of uniformed sized tiles you can just skip this, but in this case we are, so you can set Tile Dimensions to 32x32. PNG can also be drag and drop on to the editor

15 | 16 | 17 |

Step 3 - Opening 'empty' map

18 |

Switch over to Map Editor and open the 'empty' map

19 | 20 |

Step 4 - Editing a map

21 |

Now you can add content to the map. Select Map Object combo box and tutorial-sheet1.png. You should have sprite list here, so double click on the red bricks then click and drag on the map to place on the map. You can toggle 'align to grid' to place sprite evenly. You can also add Text, Rectangles, lines and circle by selecting Shapes on the Map Object combo box.

22 | 23 |

Step 5 - The Result

24 |

25 | 26 | 27 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Tutorials_3BasicEntity.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Tutorial: Basic Entity

4 | 5 |

Step 1

6 |

Using the Previous Tutorial as the starting point, switch over to Entity Scripts and click the Add button

7 | 8 |

Step 2

9 |

Now you can open up firstentity.mps

10 | 11 |

Step 3

12 |
13 | /* Initialise Three Fixed valiables to hold position */
14 | new Fixed:x = 0.00;
15 | new Fixed:y = 0.00;
16 | new Fixed:z = 0.00;
17 | 
18 | /* We want to get the position on entity start up, so we use the Init function */
19 | public Init(...)
20 | {
21 |   /* We want to store, position for current entity to x, y variables. A empty sting access current entity, other wise you could use a entity ID to get it's position  */
22 |   EntityGetPosition(x, y, z);
23 |   /* You can get the Display Object store on the map by using EntityGetSetting, more on that on next tutorial */
24 | }
25 | 
26 | main()
27 | {
28 |   /* Draw object to screen each frame frame */
29 |   GraphicsDraw("tutorial-sheet1.png:2", SPRITE, fround(x)+5, fround(y)+5, z -1.0, 0, 0, BLACK ); /* See Scripting Interface for info on Draw Function */
30 |   // ^ highlight Function and press F1 to open up Help 
31 | }
32 |

This is a simple entity to get the entity position and to draw to the screen.

33 | 34 |

Step 4

35 |

Now with the Entity created, you can now attach it to a display object on the map. Open up the Object's Advance Settings and check the entity check box, then select firstentity.mps

36 | 37 | 38 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/en/Tutorials_4MovingEntity.xml: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Tutorial: Moving Entity

4 | 5 |

Entities can be attach to added to any Display Object. This allow the following example code to be attach to any Object, be Sprite, Text or a Shape, and have it move due to the player's input.

6 |

Example Code

7 |
/* Initialise Three Fixed variables to hold position */
 8 | new Fixed:x = 0.00;
 9 | new Fixed:y = 0.00;
10 | new Fixed:z = 0.00;
11 | 
12 | /* Display Object variable */
13 | new object:obj; // the obj varible is tagged as object.
14 | 
15 | /* We want to get the position on entity start up, so we use the Init function */
16 | public Init(...)
17 | {
18 |   /* We want to store, position for current entity to x, y variables. */
19 |   EntityGetPosition(x, y, z);
20 |   obj = EntityGetObject() // Get the display object the entity is attacted to.
21 | }
22 | 
23 | 
24 | main()
25 | {
26 |   /* Get Player 1 Axis Values and add them to the entity positions */
27 |   x += InputAxis(0)* GameFrameSeconds();
28 |   y += InputAxis(1)* GameFrameSeconds();
29 | 
30 |   ObjectPosition(obj, fround(x), fround(y), z, 0, 0);
31 | }
32 | 33 |
-------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/CameraScroll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/CameraScroll.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/LayerColour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/LayerColour.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/editor_spritesheet_newsprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/editor_spritesheet_newsprite.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/editor_spritesheet_quickcreate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/editor_spritesheet_quickcreate.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/editor_spritesheet_spritegrouping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/editor_spritesheet_spritegrouping.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/editor_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/editor_start.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/editor_window_game.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/editor_window_game.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/editor_window_language.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/editor_window_language.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/editor_window_spritesheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/editor_window_spritesheet.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/style_hgradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/style_hgradient.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/style_negative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/style_negative.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/style_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/style_normal.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/style_outline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/style_outline.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/style_vgradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/style_vgradient.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/help/images/toolbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/help/images/toolbar.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-ellipse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-ellipse.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-path.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-polygon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-polygon.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-rectangle.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/draw-text.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/meg-halignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/meg-halignment.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/meg-valignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/icons/hicolor/22x22/actions/meg-valignment.png -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/icons/hicolor/index.theme: -------------------------------------------------------------------------------- 1 | [Icon Theme] 2 | Name=Hicolor 3 | Comment=Fallback icon theme 4 | Hidden=true 5 | Directories=22x22/actions,scalable/mimetypes,scalable 6 | 7 | [22x22/actions] 8 | Size=22 9 | Context=Actions 10 | Type=Threshold 11 | 12 | [scalable/mimetypes] 13 | MinSize=1 14 | Size=128 15 | MaxSize=256 16 | Context=MimeTypes 17 | Type=Scalable 18 | 19 | [scalable] 20 | MinSize=1 21 | Size=128 22 | MaxSize=256 23 | Type=Scalable 24 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/console.inc: -------------------------------------------------------------------------------- 1 | #if defined _console_included 2 | #endinput 3 | #endif 4 | #define _console_included 5 | 6 | 7 | native ConsoleLog( text[], {Fixed,_}:... ); 8 | native ConsoleOutput( text[], {Fixed,_}:... ); 9 | native ConsoleInfomation(); 10 | 11 | /*** 12 | 13 | 14 | Prints formatted text to a text file. 15 | Format string.%c print a character at this position. %d print a number at this position in decimal radix. %f print a floating point number at this position. %q print a fixed point number at this position. %s print a character string at this position. %x print a number at this position in hexadecimal radix 16 | List of Arguments to used to produce the formatted text 17 | 18 | ConsoleLog("Doing Something :)"); 19 | ConsoleLog("Text: %s, Color: %x, Number: %d, Fixed: %q\n", "Hello", 0xFFBBAAFF, 42, 50.254); // Outputs Text: Hello, Color: FFBBAAFF, Number: 42, Fixed: 50.254 20 | ConsoleLog("Text: %s, Color: %d, Number: %05d, Fixed: %.1q\n", "Hello", 0xFFBBAAFF, 42, 50.254); // Outputs Text: Hello, Color: -4478209, Number: 00042, Fixed: 50.3 21 | 22 | 23 | 24 | Prints formatted text to the debug console. 25 | Format string. %c print a character at this position. %d print a number at this position in decimal radix. %f print a floating point number at this position. %q print a fixed point number at this position. %s print a character string at this position. %x print a number at this position in hexadecimal radix 26 | List of Arguments to used to produce the formatted text. 27 | 28 | ConsoleOutput("Doing Something :)"); 29 | ConsoleOutput("Text: %s, Color: %x, Number: %d, Fixed: %q\n", "Hello", 0xFFBBAAFF, 42, 50.254); // Outputs Text: Hello, Color: FFBBAAFF, Number: 42, Fixed: 50.254 30 | ConsoleOutput("Text: %s, Color: %d, Number: %05d, Fixed: %.1q\n", "Hello", 0xFFBBAAFF, 42, 50.254); // Outputs Text: Hello, Color: -4478209, Number: 00042, Fixed: 50.3 31 | 32 | 33 | 34 | ***/ -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/controller.inc: -------------------------------------------------------------------------------- 1 | /* Default Controller setup 2 | * To use your own names with your game, 3 | * create a game_controller.inc in the 4 | * the routines directory. 5 | * game_controller.inc should include 6 | * '#define _controller_included' to stop 7 | * this file taking over. 8 | * 9 | * Note: For custom layout, you need to set 10 | * control.setX and control.buttonsX (X for 11 | * player) to the values you wish to use. 12 | * http://mokoi.info/docs/Meg#CustomControls 13 | */ 14 | 15 | #tryinclude 16 | 17 | #if defined _controller_included 18 | #endinput 19 | #endif 20 | #define _controller_included 21 | 22 | #define BUTTON_ACTION1 0 23 | #define BUTTON_ACTION2 1 24 | #define BUTTON_ACTION3 2 25 | #define BUTTON_ACTION4 3 26 | #define BUTTON_ACTION5 4 27 | #define BUTTON_ACTION6 5 28 | 29 | #define BUTTON_MENU 6 30 | 31 | #define BUTTON_ARROWRIGHT 7 32 | #define BUTTON_ARROWLEFT 8 33 | #define BUTTON_ARROWDOWN 9 34 | #define BUTTON_ARROWUP 10 35 | 36 | #define BUTTON_MOUSELEFT 11 37 | #define BUTTON_MOUSEMIDDLE 12 38 | #define BUTTON_MOUSERIGHT 13 39 | #define BUTTON_MISC 14 40 | #define BUTTON_BACK 15 41 | 42 | #define BUTTON_CONFIRM 16 43 | #define BUTTON_CANCEL 17 44 | #define BUTTON_POINTER_PRESS 18 45 | 46 | #define AXIS_X1 0 47 | #define AXIS_Y1 1 48 | #define AXIS_Z1 2 49 | 50 | #define AXIS_X2 3 51 | #define AXIS_Y2 4 52 | #define AXIS_Z2 5 53 | 54 | #define ICON_ACTION1 "❶" 55 | #define ICON_ACTION2 "❷" 56 | #define ICON_ACTION3 "❸" 57 | #define ICON_ACTION4 "❹" 58 | #define ICON_ACTION5 "❺" 59 | #define ICON_ACTION6 "❻" 60 | 61 | #define ICON_MENU "❼" 62 | 63 | #define ICON_ARROWRIGHT "❽" 64 | #define ICON_ARROWLEFT "❾" 65 | #define ICON_ARROWDOWN "❿" 66 | #define ICON_ARROWUP "➀" 67 | 68 | #define ICON_MOUSELEFT "➁" 69 | #define ICON_MOUSEMIDDLE "➂" 70 | #define ICON_MOUSERIGHT "➃" 71 | #define ICON_MISC "➄" 72 | #define ICON_BACK "➅" 73 | 74 | #define ICON_CONFIRM "➆" 75 | #define ICON_CANCEL "➇" 76 | #define ICON_POINTER_PRESS "➈" 77 | 78 | #define ICON_LEFT1 ◀ 79 | #define ICON_RIGHT1 ▶ 80 | #define ICON_UP1 ▲ 81 | #define ICON_DOWN1 ▼ 82 | #define ICON_IN1 ◐ 83 | #define ICON_OUT1 ◑ 84 | 85 | #define ICON_LEFT2 ◁ 86 | #define ICON_RIGHT2 ▷ 87 | #define ICON_UP2 △ 88 | #define ICON_DOWN2 ▽ 89 | #define ICON_IN2 ◒ 90 | #define ICON_OUT2 ◓ 91 | 92 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/default.inc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #tryinclude 10 | #include 11 | 12 | forward public Init(...); 13 | forward public UpdatePosition(); 14 | forward public Close(); 15 | 16 | 17 | 18 | public internal_ident; 19 | #pragma unused internal_ident 20 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/enums.inc: -------------------------------------------------------------------------------- 1 | #if defined _enum_included 2 | #endinput 3 | #endif 4 | #define _enum_included 5 | 6 | 7 | 8 | #define SELF entity:0 9 | #define SELF_STRING "" 10 | 11 | #define OBJECT_NONE object:0 12 | #define OBJECT_GLOBAL_VALUE 0x80000000 13 | #define OBJECT_LOCAL_VALUE 0x7FFFFFFF 14 | #define XAXIS 0 15 | #define YAXIS 1 16 | #define ZAXIS 2 17 | 18 | #define POSITION_MAP 0 19 | #define POSITION_SCREEN 1 20 | 21 | const Directions: { 22 | SOUTH = 0, //0 deg 23 | SOUTHEAST, //45 deg 24 | EAST, //90 deg 25 | NORTHEAST, //135 deg 26 | NORTH, //180 deg 27 | NORTHWEST, //225 deg 28 | WEST, //270 deg 29 | SOUTHWEST //315 deg 30 | } 31 | 32 | const AudioDevice:{ 33 | SOUNDFX = 0, 34 | DIALOG, // Dialog most likely share the SOUNDFX channels 35 | MUSIC 36 | } 37 | 38 | const GraphicTypes: { 39 | SPRITE = 's', 40 | RECTANGLE = 'r', 41 | LINE = 'l', 42 | TEXT = 't', 43 | POLYGON = 'p', 44 | CIRCLE = 'c', 45 | CANVAS = 'M', 46 | } 47 | 48 | const StyleTypes: { 49 | STYLE_NORMAL = 0, 50 | STYLE_VGRADIENT, 51 | STYLE_HGRADIENT, 52 | STYLE_GLOW, 53 | STYLE_OUTLINE, 54 | STYLE_REPLACECOLOUR, 55 | STYLE_NEGATIVE 56 | } 57 | 58 | const ObjectFlags: { 59 | FLAG_SPEED = 0, 60 | FLAG_ANIMLOOP = 1, 61 | FLAG_ANIMREVERSE = 2, 62 | FLAG_ANIMRESET = 3, 63 | FLAG_HIDDEN = 6 64 | } 65 | 66 | 67 | #define WHITE 0xFFFFFFFF 68 | #define BLACK 0x000000FF 69 | #define RED 0xFF0000FF 70 | #define BLUE 0x0000FFFF 71 | #define GREEN 0x00FF00FF 72 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/player.inc: -------------------------------------------------------------------------------- 1 | #if defined _player_included 2 | #endinput 3 | #endif 4 | #define _player_included 5 | 6 | #include 7 | 8 | 9 | /// Player Functions 10 | #pragma deprecated Future Feature 11 | native PlayerAdd(); 12 | #pragma deprecated Future Feature 13 | native PlayerRemove(num); 14 | #pragma deprecated Future Feature 15 | native PlayerCount(); 16 | #pragma deprecated Future Feature 17 | native PlayerSetAI(player, entity); 18 | #pragma deprecated Future Feature 19 | native PlayerSetEntity(player, entity); 20 | 21 | 22 | native PlayerUpdateControl(player, controlset); 23 | native PlayerSetName( player, str{} ); 24 | native PlayerGetName( player, str{}, s = sizeof(str)); 25 | native PlayerSetColour(player, colour); 26 | 27 | /*** 28 | 29 | 30 | Adds new player 31 | 0 on Error. 32 | 33 | 34 | Removes a players 35 | 36 | 0 on Error. 37 | 38 | 39 | Returns the amount of active players. 40 | Returns the amount of active players. 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Set the name of player 59 | 60 | 61 | 62 | 63 | Gets the name of player 64 | 65 | 66 | 67 | 68 | ***/ 69 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/realenums.inc: -------------------------------------------------------------------------------- 1 | #if defined realenum_included 2 | #endinput 3 | #endif 4 | #define realenum_included 5 | 6 | const round_method: { 7 | round_normal = 0, 8 | round_floor, 9 | round_ceil, 10 | round_tozero, 11 | round_unbiased 12 | } 13 | 14 | const anglemode: { 15 | radian = 0, 16 | degrees, 17 | grades 18 | } 19 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/system.inc: -------------------------------------------------------------------------------- 1 | #if defined _system_included 2 | #endinput 3 | #endif 4 | 5 | #define _system_included 6 | 7 | #include 8 | #include 9 | 10 | /// System Function 11 | native SystemAudioVolume(AudioDevice:device, level = -1); 12 | native SystemCommand( command, value = 0 ); 13 | native SystemListCount( list ); 14 | native SystemListItem( list, item, content{}, maxlength=sizeof content ); 15 | 16 | /// Config Functions 17 | native ConfigSetString(key{}, value{}, maxlength=sizeof value); 18 | native ConfigGetNumber(key{}); 19 | native ConfigGetString(key{}, value{}); 20 | native ConfigSave(); 21 | 22 | ///Files 23 | native FileGetList(strings[]{}, directory{} = "map", size=sizeof strings); 24 | 25 | /*** 26 | 27 | 28 | Sets Audio device volume. 29 | The Audio device you wish to change. 30 | Requested Volume level. 31 | Current volume level 32 | 33 | 34 | Runs a command such as exit, resize display and such. 35 | Command to run 36 | 37 | 38 | 39 | Get Engine config as a string. 40 | 41 | 42 | 43 | 44 | Get Engine config as a number. 45 | 46 | A number from game settings, 0 if no value is found or not is not a number. 47 | 48 | 49 | Update Engine config. 50 | 51 | 52 | 53 | 54 | List File in a directory. 55 | Stores file name in directory. 56 | Directory name. 57 | 58 | 59 | ***/ 60 | 61 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/include/time.inc: -------------------------------------------------------------------------------- 1 | #if defined _time_included 2 | #endinput 3 | #endif 4 | #define _time_included 5 | 6 | //Time Functions 7 | native Time(&hour=0, &minute=0, &second=0); 8 | native Date(&year=0, &month=0, &day=0); 9 | 10 | native TimestampCurrent(); 11 | native TimestampDetails(seconds1970, &year=0, &month=0, &day=0, &hour=0, &minute=0, &second=0); 12 | 13 | /*** 14 | 15 | 16 | Get Current time 17 | Variable to store the infomation. 18 | Variable to store the infomation. 19 | Variable to store the infomation. 20 | 21 | 22 | Get Current Date 23 | Variable to store the infomation. 24 | Variable to store the infomation. 25 | Variable to store the infomation. 26 | 27 | 28 | Returns the seconds from 1970. Also known as Unix Time 29 | Returns the seconds from 1970 30 | 31 | 32 | Converts a Unix Timestamp to a time and date. 33 | Timestamp to use 34 | Variable to store the infomation. 35 | Variable to store the infomation. 36 | Variable to store the infomation. 37 | Variable to store the infomation. 38 | Variable to store the infomation. 39 | Variable to store the infomation. 40 | 41 | 42 | ***/ 43 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/portal.css: -------------------------------------------------------------------------------- 1 | guibackground { background-color: #007DBDFF; background-color2: #ACD2E7FF; background-style: horizontal-gradient; } 2 | text, text:hover { background-color: #2F1648FF; background-color2: #361E5000; background-style: horizontal-gradient; text-align:center; } 3 | 4 | box { border-image: button-border.png; border-width:16px; color:#000000FF; padding: 16px; } 5 | imagebutton { border-width:2; border-style:solid; background-color: #000000aa; color:#000000FF; min-height:36px; padding: 4px; } 6 | imagebutton:hover { color:#660000FF; } 7 | 8 | dialog { min-height: 40px; border-image: dialog-border.png; border-width:12; color:#000000FF; } 9 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/readme.txt: -------------------------------------------------------------------------------- 1 | Open Zelda 2 | ------------------------------------------------------------------------------- 3 | 4 | Open Zelda is a free and open source game creation software where people can 5 | create their own legends in the style of Link to the Past, while more advance 6 | users can take advantage of it's true power and create what their heart 7 | desires. 8 | ------------------------------------------------------------------------------- 9 | 10 | History 11 | 12 | Open Zelda was a project started by Greg Denness aka 'GD', originally as a 13 | freeware game base on the Zelda universe, then a Zelda Game Maker then 14 | finally as a generalize Game Maker. 15 | 16 | In late December 2002, 'GD' release the source under the GPL v2 to sourceforge. 17 | The project tried to evolve into Open Legends, which plan to supports more 18 | then just Zelda games and add new features such as networking. 19 | 20 | Open Legends failed in 2006, but one of it's members created Mokoi Gaming, 21 | which offered most of the features plan for Open Zelda. 22 | 23 | Then in 2009, after failed attempt by others to create Open Zelda 7, a 24 | modified version of Mokoi Gaming was release to serve as the next generation 25 | of Open Zelda. 26 | 27 | 28 | ------------------------------------------------------------------------------- 29 | 30 | Game Media is copyrighted by Nintendo, see license.txt for terms of other 31 | content. 32 | 33 | ------------------------------------------------------------------------------- 34 | 35 | Website: http://openzelda.net 36 | Source Code: https://github.com/openzelda/ 37 | Game Content: https://github.com/openzelda/content-package 38 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/scripts/linux-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | chmod +Xx /opt/openzelda/share/applications/OpenZelda.desktop 4 | chmod +Xx /opt/openzelda/share/applications/QuestDesigner.desktop 5 | 6 | 7 | xdg-mime install /opt/openzelda/share/mime/openzelda-quest.xml 8 | xdg-desktop-menu install --novendor /opt/openzelda/share/applications/OpenZelda.desktop 9 | xdg-desktop-menu install --novendor /opt/openzelda/share/applications/QuestDesigner.desktop 10 | 11 | 12 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/scripts/linux-remove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | xdg-mime uninstall /opt/openzelda/share/mime/openzelda-quest.xml 4 | xdg-desktop-menu uninstall --novendor /opt/openzelda/share/applications/OpenZelda.desktop 5 | xdg-desktop-menu uninstall --novendor /opt/openzelda/share/applications/QuestDesigner.desktop 6 | 7 | #echo "Do you wish to remove all user content?" 8 | #select yn in "Yes" "No"; 9 | #do 10 | # case $yn in 11 | # Yes ) rm -rI ~/openzekda-quests/; exit;; 12 | # No ) exit;; 13 | # esac; 14 | #done 15 | 16 | -------------------------------------------------------------------------------- /openzelda/share/openzelda-2.0/window_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openzelda/openzelda-source/478b6e1f1deae438b5c015bfb761691625e3015d/openzelda/share/openzelda-2.0/window_icon.png -------------------------------------------------------------------------------- /ozstandalone/README.md: -------------------------------------------------------------------------------- 1 | Lux Engine 2 | ------------------------------------------------------------------------- 3 | Lux Engine is a object based cross-platform game system. It uses a high 4 | level language to control each the of game entities. 5 | 6 | Build Requirements 7 | - Make or something compatible 8 | - SDL 2.0.3* 9 | - SDL_Mixer 2.0.0* 10 | - OpenGL/Mesa (Not required) 11 | - Pawn (Source Included) 12 | - TinyXML (Source Included) 13 | - ENet (Source Included) 14 | - Box2d (Source Included) 15 | 16 | * Not all ports use SDL 17 | 18 | How to Build 19 | - 'luxengine/' can be built by run 'make'. 20 | 21 | -------------------------------------------------------------------------------- /ozstandalone/build-standalone-env.cmd: -------------------------------------------------------------------------------- 1 | @ECHO off 2 | cls 3 | @rem Make sure these paths are correct. 4 | set MAKE=mingw32-make.exe 5 | set MINGWPATH=C:\dev\TDM-GCC-64 6 | set MSYSPATH=C:\dev\mingw\msys\1.0 7 | set SUPPORTPATH=C:\dev\supportlibs 8 | set PATH=;%MINGWPATH%\bin\;%MSYSPATH%\bin;%SUPPORTPATH%\bin;%PATH% 9 | 10 | set LDFLAGS=-L"%SUPPORTPATH%/lib" 11 | set CPPFLAGS=-I"%SUPPORTPATH%/include" -I"%SUPPORTPATH%/include/sdl" -I"%MINGWPATH%/include" -I"%MINGWPATH%/include/sdl" 12 | 13 | set BUILDDEBUG=FALSE 14 | 15 | 16 | echo Open Zelda Build Environment - Run %MAKE% 17 | echo ---------------------------------------- 18 | 19 | IF EXIST %MSYSPATH%\bin\mkdir.exe ( IF EXIST %MSYSPATH%\bin\uname.exe ( @echo - MSYS path: %MSYSPATH% ) ) ELSE ( @echo - MSYS not Installed at %MSYSPATH% ) 20 | IF EXIST %MINGWPATH%\bin\gcc.exe ( @echo - Compiler path: %MINGWPATH% ) ELSE ( @echo - Compiler not Installed at %MINGWPATH% ) 21 | IF EXIST %SUPPORTPATH%\lib\libSDL2.a ( @echo - SDL2 path: %SUPPORTPATH% ) ELSE ( @echo - SDL2 not Installed at %SUPPORTPATH% ) 22 | IF EXIST %SUPPORTPATH%\lib\gobject-2.0.lib ( @echo - GTK path: %SUPPORTPATH% ) ELSE ( @echo - GTK not Installed at %SUPPORTPATH% ) 23 | 24 | cmd /k echo ---------------------------------------- 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ozstandalone/custom/openzelda.make: -------------------------------------------------------------------------------- 1 | CUSTOMOBJECTS = TRUE 2 | CUSTOMPATH = ../custom/ozengine 3 | 4 | BIN = oz$(BINEXT) 5 | 6 | PLATFORM_FLAGS += -DPROGRAM_NAME="\"Open Zelda\"" 7 | PLATFORM_FLAGS += -DPROGRAM_DOCUMENTS="\"openzelda-quests\"" 8 | PLATFORM_FLAGS += -DPROGRAM_VERSION_STABLE="\"2.0\"" 9 | PLATFORM_FLAGS += -DDIRECTORY_FILE="\"edit.zelda\"" 10 | PLATFORM_FLAGS += -DGUI_PORTAL_URL="\"openzelda.net/games/1.9/\"" 11 | PLATFORM_FLAGS += -DPACKAGE_GET_URL="\"http://openzelda.net/get/?\"" 12 | PLATFORM_FLAGS += -DCUSTOMOBJECTS=TRUE 13 | 14 | 15 | ifeq ($(BUILDOS),windows) 16 | RES_SOURCE = $(CUSTOMPATH)/openzelda-standalone.rc 17 | endif 18 | -------------------------------------------------------------------------------- /ozstandalone/makefiles/linux-standalone.make: -------------------------------------------------------------------------------- 1 | #Settings 2 | INCLUDE_PAWN = TRUE 3 | NETWORK = TRUE 4 | DOWNLOADER_MODE = curl 5 | 6 | 7 | BIN = luxengine 8 | CPP = g++ 9 | CC = gcc 10 | ASM = 11 | ASMTYPE = elf 12 | 13 | BUILDDIR = ./bin/static 14 | OBJDIR = ./objects-static 15 | 16 | #Static Settings 17 | PLATFORM = LINUX 18 | PLATFORM_DIRECTORY = platform/sdl2 19 | 20 | PLATFORM_LIBS = `sdl2-config --static-libs` -lSDL2_mixer -lcurl -Wl,-rpath -Wl,\$$ORIGIN/lib 21 | PLATFORM_FLAGS = `sdl2-config --cflags` -DHAS_SOCKLEN_T -DHAVE_UNISTD_H -DHAVE_INTTYPES_H -DHAVE_STDINT_H -DFLOATPOINT -DNO_ZLIB -DUSE_SDL2 -DSTANDALONE 22 | PLATFORM_OBJECTS = $(OBJDIR)/enet/unix.o 23 | 24 | #Raspberry PI check 25 | ifeq (${shell grep -q BCM2708 /proc/cpuinfo && echo 1}, 1) 26 | OPENGL = FALSE 27 | PLATFORMBITS = Raspberry PI 28 | PLATFORM_FLAGS += -DRASPBERRYPI=1 -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -DDISPLAYMODE_NATIVE 29 | PLATFORM_LIBS += -L/opt/vc/lib -lEGL -lGLESv1_CM 30 | else 31 | OPENGL = TRUE 32 | PLATFORM_FLAGS += -DDISPLAYMODE_OPENGL 33 | PLATFORM_LIBS += -lGL 34 | endif 35 | 36 | ifeq ($(BUILDDEBUG), TRUE) 37 | PLATFORM_FLAGS += -ggdb 38 | endif 39 | 40 | 41 | installdeps: 42 | apt-get install libsdl2.0-dev libsdl-mixer2.0-dev 43 | -------------------------------------------------------------------------------- /ozstandalone/makefiles/windows-standalone.make: -------------------------------------------------------------------------------- 1 | ifeq ($(SUPPORTPATH), ) 2 | $(error Please set SUPPORTPATH variable before running make. ) 3 | endif 4 | 5 | LDFLAGS += -L"$(SUPPORTPATH)/lib" 6 | CPPFLAGS += -I"$(SUPPORTPATH)/include" -I"$(SUPPORTPATH)/include/SDL2" 7 | 8 | #Settings 9 | INCLUDE_PAWN = TRUE 10 | NETWORK = FALSE 11 | DOWNLOADER_MODE = none 12 | OPENGL = TRUE 13 | BUILDDEBUG = FALSE 14 | OPTIMIZE = SOME 15 | 16 | CPP = g++ 17 | CC = gcc 18 | 19 | ASMTYPE = win32 20 | ASM = 21 | 22 | BIN = windows.exe 23 | BINEXT = .exe 24 | OBJDIR = ./objects-standalone 25 | 26 | ifeq ($(PLATFORMBITS), 64) 27 | RES_OUTPUT = pe-x86-64 28 | OBJDIR += 64 29 | else 30 | RES_OUTPUT = pe-i386 31 | PLATFORM_FLAGS += -march=i586 32 | endif 33 | 34 | #Static Settings 35 | PLATFORM = __GNUWIN32__ 36 | PLATFORM_DIRECTORY = platform/sdl2 37 | 38 | PLATFORM_LIBS = -mwindows -lmingw32 -static -lSDL2main -lSDL2 -lSDL2_mixer -lSDL2 -Wl,-Bdynamic -lws2_32 -lcurldll -lssl.dll -lcrypto.dll 39 | PLATFORM_LIBS += -lopengl32 -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid 40 | PLATFORM_FLAGS = -DHAVE_UNISTD_H -DHAVE_INTTYPES_H -DHAVE_STDINT_H -DNO_ZLIB -DUSE_SDL2 -DDISPLAYMODE_OPENGL -DSTANDALONE -Dmain=SDL_main 41 | ifeq ($(NETWORK), TRUE) 42 | PLATFORM_OBJECTS += $(OBJDIR)/enet/win32.o 43 | endif 44 | 45 | -------------------------------------------------------------------------------- /ozstandalone/platform.mk: -------------------------------------------------------------------------------- 1 | COMPILER_LIBS = 2 | COMPILER_FLAGS = 3 | 4 | ifeq ($(OBJDIR), ) 5 | OBJDIR = ./objects 6 | endif 7 | 8 | ifeq ($(BUILDDIR), ) 9 | BUILDDIR = ./bin 10 | endif 11 | 12 | ifeq ($(INSTALLDIR), ) 13 | INSTALLDIR = /opt/mokoi 14 | endif 15 | 16 | #Plaform bits 17 | ifeq (${shell uname -m}, x86_64) 18 | PLATFORMBITS = 64 19 | endif 20 | ifeq (${shell uname -m}, x86) 21 | PLATFORMBITS = 32 22 | endif 23 | ifeq (${shell uname -m}, i686) 24 | PLATFORMBITS = 32 25 | endif 26 | ifeq (${shell uname -m}, i386) 27 | PLATFORMBITS = 32 28 | endif 29 | 30 | ifeq ($(PLATFORMBITS), ) 31 | PLATFORMBITS = other 32 | endif 33 | 34 | 35 | #Build platform & target 36 | ifeq ($(BUILDOS), ) 37 | BUILDOS = windows 38 | ifeq ($(BUILDPLATFORM), Linux) 39 | BUILDOS = linux 40 | endif 41 | ifeq ($(BUILDPLATFORM), Apple) 42 | BUILDOS = apple 43 | endif 44 | ifeq ($(BUILDPLATFORM), Darwin) 45 | BUILDOS = apple 46 | endif 47 | ifeq ($(BUILDPLATFORM), BeOS) 48 | BUILDOS = beos 49 | endif 50 | ifeq ($(BUILDPLATFORM), Haiku) 51 | BUILDOS = beos 52 | endif 53 | ifeq ($(BUILDPLATFORM), Syllable) 54 | BUILDOS = syllable 55 | endif 56 | endif 57 | 58 | ifeq ($(OPTIMIZE), FULL) 59 | OPTIMIZER = -O3 60 | else 61 | ifeq ($(OPTIMIZE), SOME) 62 | OPTIMIZER = -O1 63 | else 64 | ifeq ($(OPTIMIZE), NONE) 65 | OPTIMIZER = -O0 -DNDEBUG 66 | else 67 | OPTIMIZER = 68 | endif 69 | endif 70 | endif 71 | 72 | ifeq ($(BUILDDEBUG), TRUE) 73 | DEBUG = -g3 74 | OPTIMIZER = -O0 -Wall -DDEBUG -Wformat -Wno-unused-variable 75 | MESSAGE = with debugging support 76 | else 77 | ifneq ($(OPTIMIZE), NONE) 78 | OPTIMIZER += -DNDEBUG -Wformat 79 | endif 80 | endif 81 | 82 | 83 | 84 | buildall: all 85 | 86 | 87 | 88 | info: 89 | @echo -------------------------------- 90 | @echo Build Platform: $(BUILDPLATFORM) 91 | @echo Target Platform: $(BUILDOS)/$(PLATFORMBITS) 92 | @echo Debug Build? $(BUILDDEBUG) 93 | @echo Build Flags: $(COMPILER_FLAGS) 94 | @echo Build Libs: $(COMPILER_LIBS) 95 | -------------------------------------------------------------------------------- /ozstandalone/setting.mk: -------------------------------------------------------------------------------- 1 | #Base Setting, so variables aren't empty 2 | 3 | BUILDPLATFORM = ${shell uname} 4 | CPP = g++ 5 | CC = gcc 6 | MAKE=make 7 | MKDIR=mkdir -p 8 | RM = rm -f 9 | MESSAGE = 10 | PAWN=4 11 | 12 | #OBJDIR = objects 13 | #BUILDDIR = bin 14 | #INSTALLDIR = /opt/mokoi 15 | #BUILDOS = 16 | 17 | -include ../globalsettings.mk 18 | include platform.mk 19 | --------------------------------------------------------------------------------