├── GFX.frm ├── GFX.frx ├── LICENSE ├── MSSCCPRJ.SCC ├── Mario.vbp ├── Mario.vbw ├── Netplay.frm ├── README.md ├── changelog.txt ├── config.dat ├── frmAdvanced.frm ├── frmAdvanced.frx ├── frmAdvancedBlock.frm ├── frmAdvancedBlock.frx ├── frmBackgrounds.frm ├── frmBackgrounds.frx ├── frmBlocks.frm ├── frmBlocks.frx ├── frmChat.frm ├── frmChat.frx ├── frmCustom.frx ├── frmCustomNPCs.frx ├── frmEditor.frm ├── frmEditor.frx ├── frmEventTriger.frm ├── frmEventTriger.frx ├── frmEvents.frm ├── frmEvents.frx ├── frmGenerator.frm ├── frmGenerator.frx ├── frmGlobal.frm ├── frmGlobal.frx ├── frmLayers.frm ├── frmLayers.frx ├── frmLevelAdv.frm ├── frmLevelAdv.frx ├── frmLevelDebugger.frm ├── frmLevelDebugger.frx ├── frmLevelEditor.frm ├── frmLevelEditor.frx ├── frmLevelSettings.frm ├── frmLevelSettings.frx ├── frmLevelWindow.frm ├── frmLevelWindow.frx ├── frmLevels.frm ├── frmLevels.frx ├── frmLoader.frm ├── frmLoader.frx ├── frmLoading.frm ├── frmLoading.frx ├── frmLoading2.frm ├── frmLoading2.frx ├── frmMain.frm ├── frmMain.frx ├── frmMusic.frm ├── frmMusic.frx ├── frmNPCAdvanced.frm ├── frmNPCAdvanced.frx ├── frmNPCs.frm ├── frmNPCs.frx ├── frmNetStatus.frm ├── frmNetStatus.frx ├── frmNetplay.frm ├── frmNetplay.frx ├── frmOpen.frm ├── frmOpen.frx ├── frmPaths.frm ├── frmPaths.frx ├── frmSave.frm ├── frmSave.frx ├── frmScene.frm ├── frmScene.frx ├── frmSplash.frm ├── frmSplash.frx ├── frmSprites.frm ├── frmTestSettings.frm ├── frmTestSettings.frx ├── frmTiles.frm ├── frmTiles.frx ├── frmWarp.frm ├── frmWarp.frx ├── frmWater.frm ├── frmWater.frx ├── frmWorld.frm ├── frmWorld.frx ├── intro.lvl ├── modBlocks.bas ├── modBonus.bas ├── modChangeRes.bas ├── modCollision.bas ├── modCustom.bas ├── modEditor.bas ├── modEffect.bas ├── modGraphics.bas ├── modJoystick.bas ├── modLayers.bas ├── modLoadGFX.bas ├── modMain.bas ├── modNPC.bas ├── modPlayer.bas ├── modSorting.bas └── modSound.bas /GFX.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/GFX.frx -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Super Mario Bros. X 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MSSCCPRJ.SCC: -------------------------------------------------------------------------------- 1 | [SCC] 2 | SCC=This is a source code control file 3 | [Mario.vbp] 4 | SCC_Project_Name=this project is not under source code control 5 | SCC_Aux_Path= 6 | -------------------------------------------------------------------------------- /Mario.vbp: -------------------------------------------------------------------------------- 1 | Type=Exe 2 | Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\stdole2.tlb#OLE Automation 3 | Form=frmMain.frm 4 | Module=modMain; modMain.bas 5 | Module=modGraphics; modGraphics.bas 6 | Form=GFX.frm 7 | Module=modCollision; modCollision.bas 8 | Module=modPlayer; modPlayer.bas 9 | Module=modBlocks; modBlocks.bas 10 | Module=modEffect; modEffect.bas 11 | Module=modEditor; modEditor.bas 12 | Module=modNPC; modNPC.bas 13 | Module=modSound; modSound.bas 14 | Module=modJoystick; modJoystick.bas 15 | Form=frmOpen.frm 16 | Form=frmSave.frm 17 | Form=frmLevelEditor.frm 18 | Form=frmLevelWindow.frm 19 | Form=frmLevelSettings.frm 20 | Form=frmBlocks.frm 21 | Form=frmNPCs.frm 22 | Form=frmBackgrounds.frm 23 | Form=frmWarp.frm 24 | Form=frmTiles.frm 25 | Form=frmScene.frm 26 | Form=frmLevels.frm 27 | Form=frmPaths.frm 28 | Form=frmMusic.frm 29 | Module=modChangeRes; modChangeRes.bas 30 | Module=modSorting; modSorting.bas 31 | Form=frmWorld.frm 32 | Form=frmTestSettings.frm 33 | Form=frmAdvanced.frm 34 | Form=frmLayers.frm 35 | Module=modLayers; modLayers.bas 36 | Form=frmEvents.frm 37 | Form=frmAdvancedBlock.frm 38 | Form=frmSplash.frm 39 | Module=modLoadGFX; modLoadGFX.bas 40 | Form=frmLevelDebugger.frm 41 | Form=frmGenerator.frm 42 | Form=frmNPCAdvanced.frm 43 | Form=frmWater.frm 44 | Form=frmSprites.frm 45 | Object={248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0; mswinsck.ocx 46 | Form=Netplay.frm 47 | Form=frmNetplay.frm 48 | Form=frmChat.frm 49 | Form=frmLoading.frm 50 | Form=frmLoader.frm 51 | Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; ieframe.dll 52 | Module=modCustom; modCustom.bas 53 | Form=frmLevelAdv.frm 54 | Form=frmGlobal.frm 55 | IconForm="frmMain" 56 | Startup="Sub Main" 57 | HelpFile="" 58 | Title="Super Mario Bros. X" 59 | ExeName32="smbx.exe" 60 | Command32="" 61 | Name="Mario" 62 | HelpContextID="0" 63 | CompatibleMode="0" 64 | MajorVer=1 65 | MinorVer=3 66 | RevisionVer=0 67 | AutoIncrementVer=0 68 | ServerSupportFiles=0 69 | VersionComments="www.SuperMarioBrothers.org" 70 | VersionCompanyName="www.SuperMarioBrothers.org" 71 | VersionFileDescription="www.SuperMarioBrothers.org" 72 | VersionLegalCopyright="Not affiliated with Nintendo." 73 | VersionLegalTrademarks="Not affiliated with Nintendo." 74 | VersionProductName="Super Mario Bros. X" 75 | CompilationType=0 76 | OptimizationType=0 77 | FavorPentiumPro(tm)=0 78 | CodeViewDebugInfo=0 79 | NoAliasing=0 80 | BoundsCheck=0 81 | OverflowCheck=0 82 | FlPointCheck=0 83 | FDIVCheck=0 84 | UnroundedFP=0 85 | StartMode=0 86 | Unattended=0 87 | Retained=0 88 | ThreadPerObject=0 89 | MaxNumberOfThreads=1 90 | 91 | [MS Transaction Server] 92 | AutoRefresh=1 93 | -------------------------------------------------------------------------------- /Mario.vbw: -------------------------------------------------------------------------------- 1 | frmMain = -512, 189, 647, 637, , 225, 225, 1267, 898, C 2 | modMain = -478, 175, 681, 706, 3 | modGraphics = 100, 100, 1259, 631, 4 | GFX = 0, 0, 0, 0, C, 150, 150, 1192, 823, C 5 | modCollision = 100, 100, 1259, 631, Z 6 | modPlayer = 225, 225, 1384, 756, 7 | modBlocks = 125, 125, 1284, 656, 8 | modEffect = 50, 50, 809, 555, 9 | modEditor = 100, 100, 742, 747, 10 | modNPC = 175, 175, 934, 680, 11 | modSound = -202, 93, 957, 624, 12 | modJoystick = 125, 125, 1284, 656, 13 | frmOpen = 0, 0, 0, 0, C, 225, 225, 867, 872, C 14 | frmSave = 0, 0, 0, 0, C, 250, 250, 892, 897, C 15 | frmLevelEditor = 25, 25, 784, 530, , 275, 275, 917, 922, C 16 | frmLevelWindow = 250, 250, 1009, 755, , 300, 300, 942, 947, C 17 | frmLevelSettings = 0, 0, 1042, 673, , 0, 0, 642, 647, C 18 | frmBlocks = 225, 225, 1384, 756, , 25, 25, 667, 672, C 19 | frmNPCs = 50, 50, 1092, 723, , 25, 25, 1067, 698, C 20 | frmBackgrounds = 0, 0, 0, 0, C, 50, 50, 692, 697, C 21 | frmWarp = 0, 0, 0, 0, C, 75, 75, 717, 722, C 22 | frmTiles = 0, 0, 0, 0, C, 100, 100, 742, 747, C 23 | frmScene = 0, 0, 0, 0, C, 125, 125, 767, 772, C 24 | frmLevels = 0, 0, 0, 0, C, 150, 150, 792, 797, C 25 | frmPaths = 0, 0, 0, 0, C, 175, 175, 817, 822, C 26 | frmMusic = 0, 0, 0, 0, C, 200, 200, 842, 847, C 27 | modChangeRes = 0, 0, 0, 0, C 28 | modSorting = 150, 150, 909, 655, 29 | frmWorld = 0, 0, 0, 0, C, 225, 225, 867, 872, C 30 | frmTestSettings = 225, 225, 1267, 898, , 250, 250, 892, 897, C 31 | frmAdvanced = 0, 0, 0, 0, C, 275, 275, 917, 922, C 32 | frmLayers = 200, 200, 1359, 731, , 300, 300, 942, 947, C 33 | modLayers = 275, 275, 1317, 948, 34 | frmEvents = 150, 150, 792, 797, , 0, 0, 642, 647, C 35 | frmAdvancedBlock = 50, 50, 1209, 581, , 25, 25, 667, 672, C 36 | frmSplash = 0, 0, 0, 0, C, 50, 50, 692, 697, C 37 | modLoadGFX = 75, 75, 1234, 606, 38 | frmLevelDebugger = 150, 150, 1309, 681, , 75, 75, 717, 722, C 39 | frmGenerator = 0, 0, 0, 0, C, 100, 100, 742, 747, C 40 | frmNPCAdvanced = 200, 200, 1359, 731, , 125, 125, 767, 772, C 41 | frmWater = 0, 0, 0, 0, C, 150, 150, 792, 797, C 42 | frmSprites = 0, 0, 0, 0, C, 175, 175, 817, 822, C 43 | Netplay = 75, 75, 1117, 748, , 200, 200, 842, 847, C 44 | frmNetplay = 0, 0, 0, 0, C, 225, 225, 867, 872, C 45 | frmChat = 0, 0, 0, 0, C, 250, 250, 892, 897, C 46 | frmLoading = 0, 0, 0, 0, C, 275, 275, 917, 922, C 47 | frmLoader = 0, 0, 0, 0, C, 300, 300, 942, 947, C 48 | modCustom = 100, 100, 1142, 773, 49 | frmLevelAdv = 50, 50, 1209, 582, , 0, 0, 642, 647, C 50 | frmGlobal = 75, 75, 1117, 748, , 50, 50, 1092, 723, C 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # smbx-legacy-source 2 | Source Code for SMBX 1.3 3 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Super Mario Bros. X Changelog. 2 | 3 | 4 | Changes for 1.3: 5 | 6 | Players 7 | -Peach, Toad, and Link can now make use of the Leaf, Tanooki Suit, and Hammer Suit power-ups. 8 | -Toad can spin jump. 9 | -Link now moves a little bit quicker. 10 | 11 | Misc. 12 | -Quicksand 13 | -Attach Layers to NPCs 14 | -Fleet Glide Galaxy Music 15 | -SMW Desert Night Background 16 | -Block Fill Tool 17 | -NPC Text Preview 18 | -Custumizable NPCs 19 | -Screen Shot capturing (F12) 20 | -Slippery Blocks 21 | -Battle Mode 22 | -NPC generators can now be up to 60 second delay 23 | 24 | New Items 25 | -Ice Flower 26 | -Bubbles 27 | -SMB2 Door Potion 28 | -Propeller Block 29 | -Flame Thrower 30 | -Dragon Coins 31 | -? Mushroom 32 | -Random Power-ups 33 | -Toad's Boomerang 34 | -Peach's Heart Bombs. 35 | 36 | New Enemies 37 | -Roto-Disc 38 | -Firebar 39 | -Nipper 40 | -Mouser 41 | -Larry Koopa 42 | -Ludwig Koopa 43 | -Swooper 44 | -Hoopster 45 | -Volcano Lotus 46 | -SMW Lakitu (with the ability to choose what he throws) 47 | -SMW Spineys 48 | 49 | 50 | 51 | Changes for 1.2.2: 52 | 53 | Players 54 | -Link has been added as a playable character. 55 | -Toad has been added as a playable character. 56 | -Peach has been added as a playable character. 57 | -Mario and Luigi no longer automatically drop their reserve item when hurt. 58 | 59 | NPCs 60 | -The Silver SMW P-Switch has been replaced with a Green SMB3 P-Switch 61 | -All times stop effects play the SMB3 switch song 62 | -Added green, blue, and red rupees. 63 | -Added the heart piece. 64 | -Added the fairy pendant that turns the user into a fairy. 65 | -Added the SMB2 mushroom. 66 | -Added a Zelda 2 style lock. 67 | -Turtle shells now have a 'spark' effect when kicked/hit. 68 | -Red Yoshi fireballs no longer die when they hit an enemy. 69 | -Added a blue SMW coin that is worth 5 coins. 70 | -Fireballs have a different smoke effect when they 'die.' 71 | -Added a giant Piranha Plant that takes multiple hits to kill. 72 | -Max time for NPC generators has been raised to 60 seconds. 73 | -NPCs in the level editor are now animated. 74 | 75 | Blocks 76 | -Added blocks that change the player's character when hit. 77 | -Added blocks that only allows specific characters through them. 78 | -The SMB2 cracked block now has it's own smash graphic. 79 | 80 | Misc 81 | -The game window is now resizable. 82 | -Playable characters can be blocked in the world editor. 83 | -The player can switch characters on the world map by pressing pause and then tapping left or right. 84 | -The editor now shows what is inside blocks. 85 | -The debugger displays information about what NPCs are in the level. 86 | -You can now use PageUp and PageDown to change your current section in the editor. 87 | -There is now a menu option that brings up the help file. 88 | -The Level Settings tab no longer defaults to the level size cursor. 89 | -When using custom graphics, the icons in the editor now show the correct picture. 90 | -Added an option to play the game without sound. 91 | -Added an option to turn of the frame skip. 92 | -The editor now shows the contents of Eggs and Burried Items. 93 | 94 | Bug Fixes 95 | -Fixed a bug that would cause sound/music not to load in the game. 96 | -Fixed the bug that caused NPCs to get 'smashed' when they shouldn't have. 97 | -The level background is now drawn correctly when the screen splits horizontally. 98 | -Several small bug fixes. 99 | 100 | Cheat Codes 101 | -Added 'anothercastle' 102 | -Added 'ibakedacakeforyou' 103 | -Added 'iamerror' 104 | -Added 'fairymagic' 105 | 106 | 107 | 108 | Changes for 1.2.1: 109 | 110 | Engine Updates 111 | -NPCs can now be crushed by moving blocks. 112 | -Added SMB2 throw sound for SMB2 enemies that are thrown. 113 | -You are now given the option to chose between Mario and Luigi in 1 player mode. 114 | -Cheat codes are now back in the main game, but you can no longer save after using them. 115 | -You can no longer save the game while playing a level. 116 | -Added the cheat code wetwater. 117 | -Added the cheat code istillplaywithlegos. 118 | -The cheat sonicstoslow has become sonicstooslow. 119 | -Added the cheat code itsrainingmen. 120 | -Added the cheat code donttypethis. 121 | -Several cheat codes have been fixed. 122 | -The test settings window has been updated to include the new power ups. 123 | -The hot box for lava tiles has been pushed down by 6 pixels. 124 | -Now you can use the mouse to select the options on the menu screen. 125 | -Hit detection is now a little bit more lenient when deciding if a player should be hurt by an NPC. 126 | -Added the cheat code needaclock. 127 | -Added the cheat code powhammer. 128 | -Revived the cheat code imtiredofallthiswalking. 129 | 130 | Player 131 | -The player now sticks to downward slopes instead of falling over them. This should make it easier to jump over cliffs when running down a slope. 132 | -There is now a brief animation and delay when picking things up SMB2 style. 133 | -The player now spins while shell surfing. 134 | -The player no longer falls off a shell when it bounces off a wall. 135 | -The player can now grab shells from above. 136 | -The player now has walking animations when using a warp pipe. 137 | -The player can now swim upward fast by holding up while swimming. 138 | -The distance needed to fly was shortened very slightly. 139 | -Luigi's fireballs now go up steep slopes. 140 | -Luigi's controls have been tightened slightly. 141 | -When the first player is Luigi, he appears instead of Mario on the world map. 142 | -The player gets a slight speed boost when running down a slope. 143 | -Yoshi will be returned to you after you complete a level that takes him away. 144 | -Dead players no longer spawn from blocks containing the Hammer Suit or Tanooki Suit. 145 | -Luigi now causes all the coins to pop out of coin blocks after he hits them. 146 | 147 | NPCs 148 | -The SMW Goomba and SMB3 Bob-omb have been updated to more accurately reflect the games they're from. SMB3 Bob-ombs go farther when kicked. 149 | -Boom Boom now has a brief period of immunity when hit by objects. This stops him from being insta-killed. 150 | -After a veggie has been thrown up it will change speed if it hits an enemy. This prevents a single veggie from killing bosses. 151 | -The smashed Rex and Mega Mole now move faster. The SMB1 and SMW 1-ups now move the correct speed. 152 | -The Ice Block now melts 7 seconds after being picked up, unless thrown. 153 | -Only bosses now give points when falling into lava. 154 | -Wart now gives the correct amount of points when killed. 155 | -SMB1 Bowser now has a more predictable hammer throwing pattern. 156 | -NPCs now have walking animations and will walk out of a pipe when spawned with a warp generator. 157 | -Grass and turnips now have a higher pitched grab sound. 158 | -SMW saws now make the 'ticking' sound when on screen, are drawn behind blocks, and only stick out of the ground halfway. 159 | -Thwomps now create 'smoke effect' after hitting the ground. 160 | -The Ice Block now breaks bricks when thrown up. 161 | -Switch goombas and platforms have been recolored to match the SMW switch blocks. 162 | -Paratroopas set to hover left/right now flutter up and down. 163 | -Yoshi, Kuribo's shoe, and several other power-ups can now be off screen for 60 seconds before being reset. 164 | -The off screen timer of shells now resets after they break a block. Now you don't have to supervise them to make sure they are doing there job. 165 | -Sonic rings have been changed to a graphic style that fits the game better. 166 | -Mr. Saturn is now indestructible. 167 | -Blaarg's hit box has been fixed. 168 | -The Clown car now checks for collisions against blocks. 169 | -Added a silver P Switch that stops time for a short while when hit. 170 | -Added a red switch used for triggering events. 171 | -Added the stop watch from SMB2. 172 | -Added the POW block from SMB2. 173 | -Added the brown Paragoomba from SMB3 with Paratroopa AI. 174 | -Added the Paragoomba from SML2 with Paratroopa AI. 175 | -Added the goomba from SML2. 176 | -Added the venus fire trap from SMB3 177 | -Added pokey from SMB2. 178 | -Added the stop watch power-up. 179 | 180 | Blocks 181 | -Digable dirt now behaves correctly. 182 | -Munchers hurt from all sides. 183 | -SMW switch blocks have been recolored to look like they did in SMW. 184 | 185 | Backgrounds 186 | -SMW Ghost House background is now animated. 187 | -SMW Castle background is now properly animated. 188 | 189 | Bug Fixes 190 | -Fixed a bug that stopped the game from actually skipping frames when it was supposed to. 191 | -The yellow Yoshi now correctly ground pounds enemies on slopes. 192 | -The world map no longer unloads custom graphics after playing a level. 193 | -The Billy Gun and Hammer Bros. no longer keep shooting when the player loses control of himself. 194 | -The game more accurately decides which block the player should stand on while on multiple blocks. This mainly affects note blocks. 195 | -Fixed a bug that would push the player through blocks when standing on a falling block. (As seen in the last fight of The Invasion 2) 196 | -The game no longer freezes when using events to takeover the players controls and opening a message window. 197 | -The player can no longer climb vines while in Tanooki form. 198 | -NPC speed is now calculated correctly when walking on another NPC while underwater. 199 | -Checkpoints now work on episodes that use a hub world. 200 | 201 | 202 | 203 | Changes for 1.2: 204 | 205 | Engine Updates 206 | -Sloped tiles have been fully implemented, including the ability to slide down slopes. 207 | -New "projectile" spawn point that allows NPCs to be shot out of pipes. 208 | -Updated the graphics engine, allowing for custom graphics. 209 | -Spikes only hurt when hit from the correct angle 210 | -Keys can be used to unlock doors. 211 | -Swimmable water has been implemented. 212 | -The title screen now plays a level. 213 | -You can now use events to move layers. 214 | -Added online level edit mode. 215 | -Cheat codes now only work in the level editor. 216 | -Added auto frame skip. 217 | 218 | Players 219 | -Added the Tanooki Suit. 220 | -Added the Hammer Suit. 221 | -Added Fire Shoe Power-up that turns stomped enemies into fireballs and allows the wearer to walk on lava. 222 | -Added Blue Shoe Power-up that allows the wearer infinite flight. 223 | -There is a longer delay between eating enemies with Yoshi. 224 | -You can no longer spit and eat a shell in midair to fly indefinitely. 225 | -The player now needs to run longer before he can fly. 226 | -Players now "slide" when spit out of Yoshi. 227 | -Players can use lives to come back to life instantly in 2 player mode. 228 | 229 | Tiles/Backgrounds 230 | -Added cave tiles and two backgrounds (SMB3) 231 | -Added Mystic Cave Zone background (Sonic 2). 232 | -Added the underwater block (SMB1). 233 | -Added sloped grass (SMW, SMB3, SMB2) and cave (SMW, SMB3 & SMB1) tiles. 234 | -Added castle tiles and background (SMB1). 235 | -Added several tiles (SMB1) (SMB2). 236 | -Added coral block (SMB1). 237 | -Added fence and tree backgrounds (SMB1). 238 | -Added several castle tiles and backgrounds (SMW). 239 | -Added various blocks (SMW). 240 | -Added multiple lava tiles (SMW). 241 | -Added Ghost House background (SMW). 242 | -Added Wart's Throne Room tileset (SMB2). 243 | -Added several new Super Metroid tilesets. 244 | -Added 2 Super Metroid backgrounds. 245 | -Added clouds background (SMB2). 246 | -Added several new blocks. (Multiple) 247 | -Added six backgrounds. (SMB1 & SMB2) 248 | -Add table and chair background objects. (SMA4) 249 | -Added underwater backgrounds. (SMB3, SMW) 250 | -Added water dirt blocks (SMB3) 251 | -Added giant wood blocks (SMB3) 252 | -Added giant coral (SMB3) 253 | -Added water backgrounds objects (SMB1, SMB3) 254 | -Added bubble background. 255 | -Added the frozen coin and chomper blocks. 256 | 257 | NPCs 258 | -Added Goomba and Paragoomba (SMW). 259 | -Added Rex (SMW). 260 | -Added Mega Mole (SMW). 261 | -Added Poison Mushroom (SMB). 262 | -Added rings that act like coins (Sonic the Hedgehog) 263 | -Added Mushroom Blocks (SMB2). 264 | -Added Digable Dirt (SMB2). 265 | -Added flying Airship part (SMB3). 266 | -Added Mister Saturn (Earthbound). 267 | -Changed the Cheep Cheep (SMB1) to die when jumped on. 268 | -Blue Beach Koopas (SMW) can now kick Ice Blocks (SMB3). 269 | -Added Bullies (SM64). Sprites by LuigiFan. 270 | -Thwomp and the Boos can now be killed. 271 | -Added both normal Koopas and Parakoopas (SMB1) 272 | -Added Axe, which dies on contact with the player, that can be used to start events. (SMB1) 273 | -Added Thwomp (SMW) 274 | -Added Grinder (SMW) 275 | -Added Dry Bones. (SMW) 276 | -Added Mushroom, Fire Flower, 1-Up, and 3-Up Moon (SMW) (SMB1). 277 | -Added skull ride. (SMW) 278 | -Added the Rainbow shell, which when hit by a tail becomes a powerful item and allows Mario to ride it. (SMW) 279 | -Added Princess Peach. (SMB3) 280 | -Added collectible stars that don't end the level. (SMW) 281 | -Add the King Koopa. (SMB1) 282 | -Added Wart (SMB2) 283 | -Added Spark (SMB2). 284 | -Added 3 Super Metroid monsters. 285 | -Added Spike Top (SMW). 286 | -Added Mother Brain 287 | -Added Green Cheep Cheeps (SMB1, SMB3) 288 | -Added Red Cheep Cheeps that jump out of the water at the player (SMB3) 289 | -Added Bloopers (SMB1, SMB3) 290 | -Added some misc. Sushi from SMW 291 | -SMB2 enemies are now immune to fireballs 292 | -Podoboos are immune to fire and no longer kill enemy NPCs 293 | -Yoshi now run away faster when the player is hit. 294 | -The Billy Gun now shoots roughly twice as fast. 295 | 296 | World Map 297 | -Added several tiles and scenery objects (SMW). 298 | -Ability to choose start point. 299 | -Added level path background options. 300 | -Added several level icons. (SMBA4) (SMB3) (SMW 301 | -Instant warp zones. 302 | -Player faces the direction he is walking. 303 | -Added new levels and path graphics. 304 | 305 | Music 306 | -Added Meta Knight's Revenge (SSBB). 307 | -Added Castle music (SMW). 308 | -Added Castle music (SMB1). 309 | -Added Wart battle music (SMB2). 310 | -Added Item Room music (Super Metroid). 311 | -Added Underwater music (SMB1, SMB3, SMW, SM64) 312 | -Added Waluigi Pinball and SSBB Underground themes. 313 | -Added SM64 cave theme. 314 | -Added SMB3 hammer bros. theme. 315 | 316 | Bug Fixes 317 | -The player now correctly changes sections when he enters a door while standing on a NPC. 318 | -Fixed a bug that would cause the map to scroll to a location other then 0, 0 when changing modes to the world editor. 319 | -Added an auto-align toggle to the world editor. 320 | -Fixed several bugs with the conveyor belts. 321 | -Exits no longer despawn when they go off-screen. 322 | -World editor now plays sounds when the user saves and erases the map. 323 | -Player stops ducking when leaving a vertical pipe warp. 324 | -Spin Jump has been toned down. 325 | -Platform now properly pass through cross sections. 326 | -Fixed a bug that prevented music from playing in the 'intro.lvl" 327 | -P switch is no longer linked to music. -------------------------------------------------------------------------------- /config.dat: -------------------------------------------------------------------------------- 1 | 61 2 | #FALSE# 3 | 1 4 | 38 5 | 40 6 | 37 7 | 39 8 | 88 9 | 90 10 | 16 11 | 27 12 | 65 13 | 83 14 | 2 15 | 0 16 | 6 17 | 7 18 | 1 19 | 3 20 | 2 21 | 38 22 | 40 23 | 37 24 | 39 25 | 88 26 | 90 27 | 16 28 | 27 29 | 65 30 | 83 31 | 2 32 | 0 33 | 6 34 | 7 35 | 1 36 | 3 37 | -------------------------------------------------------------------------------- /frmAdvanced.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmAdvanced 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "NPC Event Triggers" 5 | ClientHeight = 3930 6 | ClientLeft = -15 7 | ClientTop = 375 8 | ClientWidth = 4350 9 | Icon = "frmAdvanced.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 3930 15 | ScaleWidth = 4350 16 | Begin VB.Frame Frame4 17 | Caption = "Attach to Layer" 18 | Height = 735 19 | Left = 120 20 | TabIndex = 10 21 | Top = 3120 22 | Width = 4095 23 | Begin VB.ComboBox AttLayer 24 | Height = 315 25 | Left = 240 26 | TabIndex = 11 27 | Top = 240 28 | Width = 3615 29 | End 30 | End 31 | Begin VB.Frame Frame1 32 | Caption = "Event Triggers" 33 | Height = 3135 34 | Left = 120 35 | TabIndex = 1 36 | Top = 0 37 | Width = 4095 38 | Begin VB.Frame Frame3 39 | Caption = "No More Objects in Layer" 40 | Height = 660 41 | Index = 2 42 | Left = 120 43 | TabIndex = 8 44 | Top = 2400 45 | Width = 3855 46 | Begin VB.ComboBox TriggerLast 47 | Height = 315 48 | Left = 120 49 | TabIndex = 9 50 | Text = "TriggerLast" 51 | Top = 240 52 | Width = 3615 53 | End 54 | End 55 | Begin VB.Frame Frame3 56 | Caption = "Activate" 57 | Height = 660 58 | Index = 1 59 | Left = 120 60 | TabIndex = 6 61 | Top = 1680 62 | Width = 3855 63 | Begin VB.ComboBox TriggerActivate 64 | Height = 315 65 | Left = 120 66 | TabIndex = 7 67 | Text = "TriggerActivate" 68 | Top = 240 69 | Width = 3615 70 | End 71 | End 72 | Begin VB.Frame Frame3 73 | Caption = "Talk" 74 | Height = 660 75 | Index = 0 76 | Left = 120 77 | TabIndex = 3 78 | Top = 960 79 | Width = 3855 80 | Begin VB.ComboBox TriggerTalk 81 | Height = 315 82 | Left = 120 83 | TabIndex = 5 84 | Text = "TriggerTalk" 85 | Top = 240 86 | Width = 3615 87 | End 88 | End 89 | Begin VB.Frame Frame2 90 | Caption = "Death" 91 | Height = 660 92 | Left = 120 93 | TabIndex = 2 94 | Top = 240 95 | Width = 3855 96 | Begin VB.ComboBox TriggerDeath 97 | Height = 315 98 | Left = 120 99 | TabIndex = 4 100 | Text = "TriggerDeath" 101 | Top = 240 102 | Width = 3615 103 | End 104 | End 105 | End 106 | Begin VB.PictureBox FocusNinja 107 | Height = 375 108 | Left = 8640 109 | ScaleHeight = 315 110 | ScaleWidth = 315 111 | TabIndex = 0 112 | Top = 7560 113 | Width = 375 114 | End 115 | End 116 | Attribute VB_Name = "frmAdvanced" 117 | Attribute VB_GlobalNameSpace = False 118 | Attribute VB_Creatable = False 119 | Attribute VB_PredeclaredId = True 120 | Attribute VB_Exposed = False 121 | Private Sub cmbPara_Click() 122 | If cmbPara.ListIndex = 3 Then 123 | frmNPCs.frmDirection.Caption = "Direction" 124 | frmNPCs.optNPCDirection(0).Caption = "Up" 125 | frmNPCs.optNPCDirection(2).Caption = "Down" 126 | Else 127 | frmNPCs.frmDirection.Caption = "Direction" 128 | frmNPCs.optNPCDirection(0).Caption = "Left" 129 | frmNPCs.optNPCDirection(2).Caption = "Right" 130 | End If 131 | End Sub 132 | 133 | Private Sub Form_Load() 134 | frmNPCAdvanced.cmbPara.ListIndex = 1 135 | frmNPCAdvanced.cmbCheep.ListIndex = 0 136 | End Sub 137 | 138 | Private Sub Form_Unload(Cancel As Integer) 139 | Cancel = 1 140 | Me.Hide 141 | End Sub 142 | 143 | -------------------------------------------------------------------------------- /frmAdvanced.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmAdvanced.frx -------------------------------------------------------------------------------- /frmAdvancedBlock.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmAdvancedBlock 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Block Event Settings" 5 | ClientHeight = 3030 6 | ClientLeft = 45 7 | ClientTop = 435 8 | ClientWidth = 4335 9 | Icon = "frmAdvancedBlock.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 3030 15 | ScaleWidth = 4335 16 | Begin VB.Frame Frame1 17 | Caption = "Event Triggers" 18 | Height = 2775 19 | Left = 120 20 | TabIndex = 0 21 | Top = 120 22 | Width = 4095 23 | Begin VB.Frame Frame2 24 | Caption = "Death" 25 | Height = 735 26 | Left = 120 27 | TabIndex = 5 28 | Top = 240 29 | Width = 3855 30 | Begin VB.ComboBox TriggerDeath 31 | Height = 315 32 | Left = 120 33 | TabIndex = 6 34 | Text = "TriggerDeath" 35 | Top = 240 36 | Width = 3615 37 | End 38 | End 39 | Begin VB.Frame Frame3 40 | Caption = "Hit" 41 | Height = 735 42 | Index = 0 43 | Left = 120 44 | TabIndex = 3 45 | Top = 1080 46 | Width = 3855 47 | Begin VB.ComboBox TriggerHit 48 | Height = 315 49 | Left = 120 50 | TabIndex = 4 51 | Text = "TriggerHit" 52 | Top = 240 53 | Width = 3615 54 | End 55 | End 56 | Begin VB.Frame Frame3 57 | Caption = "No More Objects in Layer" 58 | Height = 735 59 | Index = 2 60 | Left = 120 61 | TabIndex = 1 62 | Top = 1920 63 | Width = 3855 64 | Begin VB.ComboBox TriggerLast 65 | Height = 315 66 | Left = 120 67 | TabIndex = 2 68 | Text = "TriggerLast" 69 | Top = 240 70 | Width = 3615 71 | End 72 | End 73 | End 74 | End 75 | Attribute VB_Name = "frmAdvancedBlock" 76 | Attribute VB_GlobalNameSpace = False 77 | Attribute VB_Creatable = False 78 | Attribute VB_PredeclaredId = True 79 | Attribute VB_Exposed = False 80 | Private Sub Form_Unload(Cancel As Integer) 81 | Cancel = 1 82 | Me.Hide 83 | End Sub 84 | -------------------------------------------------------------------------------- /frmAdvancedBlock.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmAdvancedBlock.frx -------------------------------------------------------------------------------- /frmBackgrounds.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmBackgrounds.frx -------------------------------------------------------------------------------- /frmBlocks.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmBlocks.frx -------------------------------------------------------------------------------- /frmChat.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmChat 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Chat" 5 | ClientHeight = 2760 6 | ClientLeft = 45 7 | ClientTop = 375 8 | ClientWidth = 6750 9 | Icon = "frmChat.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 2760 15 | ScaleWidth = 6750 16 | Begin VB.TextBox txtSay 17 | Height = 375 18 | Left = 0 19 | TabIndex = 2 20 | Top = 2400 21 | Width = 5295 22 | End 23 | Begin VB.TextBox txtChat 24 | Height = 2415 25 | Left = 0 26 | MultiLine = -1 'True 27 | ScrollBars = 2 'Vertical 28 | TabIndex = 1 29 | Top = 0 30 | Width = 5295 31 | End 32 | Begin VB.ListBox lstUsers 33 | Height = 2790 34 | ItemData = "frmChat.frx":628A 35 | Left = 5280 36 | List = "frmChat.frx":628C 37 | TabIndex = 0 38 | Top = 0 39 | Width = 1455 40 | End 41 | End 42 | Attribute VB_Name = "frmChat" 43 | Attribute VB_GlobalNameSpace = False 44 | Attribute VB_Creatable = False 45 | Attribute VB_PredeclaredId = True 46 | Attribute VB_Exposed = False 47 | Private Sub Form_Unload(Cancel As Integer) 48 | Cancel = 1 49 | Me.Hide 50 | End Sub 51 | 52 | Private Sub txtSay_KeyPress(KeyAscii As Integer) 53 | Dim A As Integer 54 | Dim tempStr As String 55 | If KeyAscii = vbKeyReturn Then 56 | If txtSay.Text = "" Then Exit Sub 57 | If nPlay.Online = True Then 58 | KeyAscii = 0 59 | If nPlay.Mode = 0 Then 'Client 60 | If LocalNick = "Redigit" Then 61 | If LCase(Left(txtSay.Text, 6)) = "/kick " Then 62 | Netplay.sendData "71" & LCase(Mid(txtSay.Text, 7)) 63 | ElseIf LCase(Left(txtSay.Text, 5)) = "/kill" Then 64 | Netplay.sendData "72" 65 | ElseIf LCase(Left(txtSay.Text, 10)) = "/password " Then 66 | Netplay.sendData "73" & Mid(txtSay.Text, 11) 67 | Else 68 | Netplay.sendData "c" & txtSay & LB 69 | End If 70 | Else 71 | Netplay.sendData "c" & txtSay & LB 72 | End If 73 | Else 'Server 74 | If LCase(Left(txtSay.Text, 6)) = "/kick " Then 75 | tempStr = LCase(Mid(txtSay.Text, 7)) 76 | If Not tempStr = "redigit" Then 77 | For A = 1 To 15 78 | If LCase(nPlay.ClientName(A)) = tempStr Then 79 | Netplay.sendData "d" & nPlay.ClientName(A) & " was kicked from the server." & LB, A 80 | frmChat.txtChat = frmChat.txtChat & nPlay.ClientName(A) & " was kicked from the server." & LB 81 | frmChat.txtChat.SelStart = Len(frmChat.txtChat.Text) 82 | PlaySound 47 83 | SoundPause(47) = 2 84 | Netplay.DropClient A 85 | End If 86 | Next A 87 | End If 88 | Else 89 | Netplay.sendData "d<" & LocalNick & "> " & txtSay.Text & LB 90 | frmChat.txtChat = frmChat.txtChat & "<" & LocalNick & "> " & txtSay.Text & LB 91 | frmChat.txtChat.SelStart = Len(frmChat.txtChat.Text) 92 | PlaySound 47 93 | SoundPause(47) = 2 94 | End If 95 | End If 96 | End If 97 | txtSay.Text = "" 98 | End If 99 | End Sub 100 | -------------------------------------------------------------------------------- /frmChat.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmChat.frx -------------------------------------------------------------------------------- /frmCustom.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmCustom.frx -------------------------------------------------------------------------------- /frmCustomNPCs.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmCustomNPCs.frx -------------------------------------------------------------------------------- /frmEditor.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmEditor 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Super Mario Bros. Revolution - Level Editor" 5 | ClientHeight = 13785 6 | ClientLeft = 150 7 | ClientTop = 720 8 | ClientWidth = 25110 9 | Icon = "frmEditor.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | ScaleHeight = 13785 13 | ScaleWidth = 25110 14 | StartUpPosition = 3 'Windows Default 15 | Begin VB.OptionButton optCursor 16 | Caption = "Non-Player Characters" 17 | Height = 375 18 | Index = 4 19 | Left = 9120 20 | Style = 1 'Graphical 21 | TabIndex = 6 22 | Top = 0 23 | Width = 2175 24 | End 25 | Begin VB.OptionButton optCursor 26 | Caption = "Background Objects" 27 | Height = 375 28 | Index = 3 29 | Left = 6840 30 | Style = 1 'Graphical 31 | TabIndex = 5 32 | Top = 0 33 | Width = 2175 34 | End 35 | Begin VB.OptionButton optCursor 36 | Caption = "Level Settings" 37 | Height = 375 38 | Index = 2 39 | Left = 2280 40 | Style = 1 'Graphical 41 | TabIndex = 4 42 | Top = 0 43 | Width = 2175 44 | End 45 | Begin VB.OptionButton optCursor 46 | Caption = "Eraser" 47 | Height = 375 48 | Index = 0 49 | Left = 0 50 | Style = 1 'Graphical 51 | TabIndex = 3 52 | Top = 0 53 | Value = -1 'True 54 | Width = 2175 55 | End 56 | Begin VB.OptionButton optCursor 57 | Caption = "Blocks and Tiles" 58 | Height = 375 59 | Index = 1 60 | Left = 4560 61 | Style = 1 'Graphical 62 | TabIndex = 2 63 | Top = 0 64 | Width = 2175 65 | End 66 | Begin VB.Frame Options 67 | Caption = "NPC Settings" 68 | Height = 6015 69 | Index = 4 70 | Left = 120 71 | TabIndex = 1 72 | Top = 480 73 | Visible = 0 'False 74 | Width = 14895 75 | End 76 | Begin VB.Frame Options 77 | Caption = "Background Settings" 78 | Height = 5655 79 | Index = 3 80 | Left = 1440 81 | TabIndex = 0 82 | Top = 6720 83 | Visible = 0 'False 84 | Width = 14175 85 | Begin VB.OptionButton optBackground 86 | Caption = "Page #1" 87 | Height = 375 88 | Index = 0 89 | Left = 0 90 | Style = 1 'Graphical 91 | TabIndex = 25 92 | Top = 0 93 | Value = -1 'True 94 | Width = 1455 95 | End 96 | Begin VB.OptionButton optBackground 97 | Caption = "Page #2" 98 | Height = 375 99 | Index = 1 100 | Left = 1560 101 | Style = 1 'Graphical 102 | TabIndex = 24 103 | Top = 0 104 | Width = 1455 105 | End 106 | Begin VB.Frame optBackgroundPage 107 | Caption = "Page #1" 108 | Height = 2415 109 | Index = 0 110 | Left = 0 111 | TabIndex = 18 112 | Top = 480 113 | Width = 11775 114 | Begin VB.OptionButton Background 115 | Height = 1500 116 | Index = 2 117 | Left = 9000 118 | Picture = "frmEditor.frx":628A 119 | Style = 1 'Graphical 120 | TabIndex = 23 121 | Top = 240 122 | Width = 1905 123 | End 124 | Begin VB.OptionButton Background 125 | Height = 540 126 | Index = 1 127 | Left = 11040 128 | Picture = "frmEditor.frx":F14C 129 | Style = 1 'Graphical 130 | TabIndex = 22 131 | Top = 240 132 | Width = 540 133 | End 134 | Begin VB.OptionButton Background 135 | Height = 1980 136 | Index = 3 137 | Left = 120 138 | Picture = "frmEditor.frx":FD8E 139 | Style = 1 'Graphical 140 | TabIndex = 21 141 | Top = 240 142 | Value = -1 'True 143 | Width = 2940 144 | End 145 | Begin VB.OptionButton Background 146 | Height = 1980 147 | Index = 7 148 | Left = 3120 149 | Picture = "frmEditor.frx":27BD0 150 | Style = 1 'Graphical 151 | TabIndex = 20 152 | Top = 240 153 | Width = 2895 154 | End 155 | Begin VB.OptionButton Background 156 | Height = 1980 157 | Index = 8 158 | Left = 6120 159 | Picture = "frmEditor.frx":3FC12 160 | Style = 1 'Graphical 161 | TabIndex = 19 162 | Top = 240 163 | Width = 2835 164 | End 165 | End 166 | Begin VB.Frame optBackgroundPage 167 | Caption = "Page #2" 168 | Height = 2415 169 | Index = 1 170 | Left = 600 171 | TabIndex = 14 172 | Top = 1320 173 | Width = 11775 174 | Begin VB.OptionButton Background 175 | Height = 1980 176 | Index = 6 177 | Left = 120 178 | Picture = "frmEditor.frx":63C54 179 | Style = 1 'Graphical 180 | TabIndex = 17 181 | Top = 240 182 | Value = -1 'True 183 | Width = 2955 184 | End 185 | Begin VB.OptionButton Background 186 | Height = 540 187 | Index = 5 188 | Left = 3240 189 | Picture = "frmEditor.frx":76116 190 | Style = 1 'Graphical 191 | TabIndex = 16 192 | Top = 240 193 | Width = 2025 194 | End 195 | Begin VB.OptionButton Background 196 | Height = 585 197 | Index = 4 198 | Left = 5400 199 | Picture = "frmEditor.frx":79458 200 | Style = 1 'Graphical 201 | TabIndex = 15 202 | Top = 240 203 | Width = 1035 204 | End 205 | End 206 | Begin VB.OptionButton optBackground 207 | Caption = "Page #3" 208 | Height = 375 209 | Index = 2 210 | Left = 3120 211 | Style = 1 'Graphical 212 | TabIndex = 13 213 | Top = 0 214 | Width = 1455 215 | End 216 | Begin VB.Frame optBackgroundPage 217 | Caption = "Page #3" 218 | Height = 2415 219 | Index = 2 220 | Left = 1080 221 | TabIndex = 7 222 | Top = 1800 223 | Width = 11775 224 | Begin VB.OptionButton Background 225 | Height = 1065 226 | Index = 12 227 | Left = 5880 228 | Picture = "frmEditor.frx":7AE1A 229 | Style = 1 'Graphical 230 | TabIndex = 12 231 | Top = 240 232 | Width = 1155 233 | End 234 | Begin VB.OptionButton Background 235 | Height = 1065 236 | Index = 11 237 | Left = 4560 238 | Picture = "frmEditor.frx":7DE5C 239 | Style = 1 'Graphical 240 | TabIndex = 11 241 | Top = 240 242 | Width = 1155 243 | End 244 | Begin VB.OptionButton Background 245 | Height = 1620 246 | Index = 10 247 | Left = 2760 248 | Picture = "frmEditor.frx":80E9E 249 | Style = 1 'Graphical 250 | TabIndex = 10 251 | Top = 240 252 | Width = 1635 253 | End 254 | Begin VB.OptionButton Background 255 | Height = 2100 256 | Index = 9 257 | Left = 120 258 | Picture = "frmEditor.frx":88030 259 | Style = 1 'Graphical 260 | TabIndex = 9 261 | Top = 240 262 | Value = -1 'True 263 | Width = 2475 264 | End 265 | Begin VB.OptionButton Background 266 | Height = 1065 267 | Index = 13 268 | Left = 7200 269 | Picture = "frmEditor.frx":9F242 270 | Style = 1 'Graphical 271 | TabIndex = 8 272 | Top = 240 273 | Width = 1155 274 | End 275 | End 276 | End 277 | Begin VB.Menu menuFile 278 | Caption = "&File" 279 | Begin VB.Menu menuFileNew 280 | Caption = "&New" 281 | End 282 | Begin VB.Menu menuFile2 283 | Caption = "-" 284 | End 285 | Begin VB.Menu menuFileSave 286 | Caption = "&Save" 287 | End 288 | Begin VB.Menu menuFileOpen 289 | Caption = "&Open" 290 | End 291 | Begin VB.Menu menuFile1 292 | Caption = "-" 293 | End 294 | Begin VB.Menu mnuFileExit 295 | Caption = "E&xit" 296 | End 297 | End 298 | End 299 | Attribute VB_Name = "frmEditor" 300 | Attribute VB_GlobalNameSpace = False 301 | Attribute VB_Creatable = False 302 | Attribute VB_PredeclaredId = True 303 | Attribute VB_Exposed = False 304 | Option Explicit 305 | 306 | Private Sub Block_Click(Index As Integer) 307 | If Index = 5 Then 308 | optBlockSpecial(1).Value = True 309 | Else 310 | optBlockSpecial(0).Value = True 311 | End If 312 | End Sub 313 | 314 | Private Sub BlockR_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 315 | BlockH.Value = 2 316 | BlockW.Value = 2 317 | End Sub 318 | 319 | Private Sub chkBackground_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) 320 | If chkBackground(Index).Value = 1 Then 321 | chkBackground(Index).Value = 0 322 | Else 323 | chkBackground(Index).Value = 1 324 | End If 325 | 326 | End Sub 327 | 328 | Private Sub CursorSelection_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 329 | HideCursor 330 | End Sub 331 | 332 | Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 333 | HideCursor 334 | End Sub 335 | 336 | Private Sub Form_Unload(Cancel As Integer) 337 | KillIt 338 | End Sub 339 | 340 | Private Sub menuFileNew_Click() 341 | ClearLevel 342 | End Sub 343 | 344 | Private Sub menuFileOpen_Click() 345 | Me.Enabled = False 346 | frmOpen.Show 347 | End Sub 348 | 349 | Private Sub menuFileSave_Click() 350 | Me.Enabled = False 351 | frmSave.Show 352 | End Sub 353 | 354 | Private Sub mnuFileExit_Click() 355 | KillIt 356 | End Sub 357 | 358 | 359 | Private Sub optBackground_Click(Index As Integer) 360 | Dim A As Integer 361 | For A = 0 To optBackgroundPage.Count - 1 362 | optBackgroundPage(A).Visible = False 363 | Next A 364 | optBackgroundPage(Index).Visible = True 365 | End Sub 366 | 367 | Private Sub optBackgroundColor_Click(Index As Integer) 368 | 369 | End Sub 370 | 371 | Private Sub optBlock_Click(Index As Integer) 372 | Dim A As Integer 373 | optBlockSpecial(0).Value = True 374 | For A = 0 To optBlockPage.Count - 1 375 | optBlockPage(A).Visible = False 376 | Next A 377 | optBlockPage(Index).Visible = True 378 | If Index = 0 Then 379 | optSpecialBlock.Visible = True 380 | Else 381 | optSpecialBlock.Visible = False 382 | End If 383 | End Sub 384 | 385 | Private Sub optCursor_Click(Index As Integer) 386 | Dim A As Integer 387 | For A = 0 To optCursor.Count - 1 388 | Options(A).Visible = False 389 | Next A 390 | If Index > 0 Then Options(Index).Visible = True 391 | End Sub 392 | 393 | Private Sub Options_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) 394 | HideCursor 395 | End Sub 396 | 397 | Private Sub optLevel_Click(Index As Integer) 398 | 399 | End Sub 400 | 401 | 402 | 403 | -------------------------------------------------------------------------------- /frmEditor.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmEditor.frx -------------------------------------------------------------------------------- /frmEventTriger.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmEventTrigger 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Event Triggers" 5 | ClientHeight = 1830 6 | ClientLeft = 45 7 | ClientTop = 375 8 | ClientWidth = 3870 9 | Icon = "frmEventTriger.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 1830 15 | ScaleWidth = 3870 16 | Begin VB.PictureBox FocusNinja 17 | Height = 375 18 | Left = 8040 19 | ScaleHeight = 315 20 | ScaleWidth = 315 21 | TabIndex = 5 22 | Top = 3000 23 | Width = 375 24 | End 25 | Begin VB.Frame Frame 26 | Caption = "Event Size" 27 | Height = 1095 28 | Index = 33 29 | Left = 120 30 | TabIndex = 1 31 | Top = 600 32 | Width = 1095 33 | Begin VB.CommandButton EventR 34 | Height = 255 35 | Left = 360 36 | TabIndex = 4 37 | Top = 480 38 | Width = 255 39 | End 40 | Begin VB.HScrollBar EventW 41 | Height = 255 42 | Left = 120 43 | Max = 99 44 | Min = 2 45 | TabIndex = 3 46 | Top = 480 47 | Value = 2 48 | Width = 735 49 | End 50 | Begin VB.VScrollBar EventH 51 | Height = 735 52 | Left = 360 53 | Max = 99 54 | Min = 2 55 | TabIndex = 2 56 | Top = 240 57 | Value = 2 58 | Width = 255 59 | End 60 | End 61 | Begin VB.ComboBox TriggerEvent 62 | Height = 315 63 | Left = 120 64 | TabIndex = 0 65 | Text = "TriggerEvent" 66 | Top = 120 67 | Width = 3615 68 | End 69 | End 70 | Attribute VB_Name = "frmEventTrigger" 71 | Attribute VB_GlobalNameSpace = False 72 | Attribute VB_Creatable = False 73 | Attribute VB_PredeclaredId = True 74 | Attribute VB_Exposed = False 75 | Private Sub eventH_Change() 76 | On Error Resume Next 77 | If Me.Visible = True Then FocusNinja.SetFocus 78 | End Sub 79 | 80 | Private Sub eventR_Click() 81 | On Error Resume Next 82 | If Me.Visible = True Then FocusNinja.SetFocus 83 | EventH.Value = 2 84 | EventW.Value = 2 85 | End Sub 86 | 87 | Private Sub eventW_Change() 88 | On Error Resume Next 89 | If Me.Visible = True Then FocusNinja.SetFocus 90 | End Sub 91 | 92 | -------------------------------------------------------------------------------- /frmEventTriger.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmEventTriger.frx -------------------------------------------------------------------------------- /frmEvents.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmEvents.frx -------------------------------------------------------------------------------- /frmGenerator.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmGenerator 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "NPC Generator" 5 | ClientHeight = 2220 6 | ClientLeft = 45 7 | ClientTop = 435 8 | ClientWidth = 2940 9 | Icon = "frmGenerator.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 2220 15 | ScaleWidth = 2940 16 | Begin VB.PictureBox FocusNinja 17 | Height = 375 18 | Left = 5760 19 | ScaleHeight = 315 20 | ScaleWidth = 315 21 | TabIndex = 13 22 | Top = 120 23 | Width = 375 24 | End 25 | Begin VB.Frame Frame2 26 | Caption = "Effect" 27 | Height = 1095 28 | Left = 1440 29 | TabIndex = 9 30 | Top = 1080 31 | Width = 1335 32 | Begin VB.OptionButton optEffect 33 | Caption = "Projectile" 34 | Height = 375 35 | Index = 2 36 | Left = 120 37 | Style = 1 'Graphical 38 | TabIndex = 11 39 | Top = 600 40 | Width = 1095 41 | End 42 | Begin VB.OptionButton optEffect 43 | Caption = "Warp" 44 | Height = 375 45 | Index = 1 46 | Left = 120 47 | Style = 1 'Graphical 48 | TabIndex = 10 49 | Top = 240 50 | Value = -1 'True 51 | Width = 1095 52 | End 53 | End 54 | Begin VB.Frame Frame3 55 | Caption = "Direction" 56 | Height = 1335 57 | Left = 120 58 | TabIndex = 4 59 | Top = 840 60 | Width = 1215 61 | Begin VB.OptionButton optSpawnDirection 62 | Caption = "Right" 63 | Height = 255 64 | Index = 4 65 | Left = 120 66 | Style = 1 'Graphical 67 | TabIndex = 8 68 | Top = 960 69 | Width = 975 70 | End 71 | Begin VB.OptionButton optSpawnDirection 72 | Caption = "Left" 73 | Height = 255 74 | Index = 2 75 | Left = 120 76 | Style = 1 'Graphical 77 | TabIndex = 7 78 | Top = 720 79 | Width = 975 80 | End 81 | Begin VB.OptionButton optSpawnDirection 82 | Caption = "Down" 83 | Height = 255 84 | Index = 3 85 | Left = 120 86 | Style = 1 'Graphical 87 | TabIndex = 6 88 | Top = 480 89 | Width = 975 90 | End 91 | Begin VB.OptionButton optSpawnDirection 92 | Caption = "Up" 93 | Height = 255 94 | Index = 1 95 | Left = 120 96 | Style = 1 'Graphical 97 | TabIndex = 5 98 | Top = 240 99 | Value = -1 'True 100 | Width = 975 101 | End 102 | End 103 | Begin VB.Frame Frame1 104 | Caption = "Delay" 105 | Height = 855 106 | Left = 1440 107 | TabIndex = 1 108 | Top = 120 109 | Width = 1335 110 | Begin VB.HScrollBar scrDelay 111 | Height = 255 112 | Left = 120 113 | Max = 600 114 | Min = 1 115 | TabIndex = 2 116 | Top = 480 117 | Value = 10 118 | Width = 1095 119 | End 120 | Begin VB.Label lblDelay 121 | Caption = "1 Second" 122 | Height = 255 123 | Left = 45 124 | TabIndex = 3 125 | Top = 240 126 | Width = 1170 127 | End 128 | End 129 | Begin VB.Frame Frame 130 | Caption = "Generator" 131 | Height = 615 132 | Index = 1 133 | Left = 120 134 | TabIndex = 0 135 | Top = 120 136 | Width = 1215 137 | Begin VB.CommandButton Spawn 138 | Caption = "No" 139 | Height = 255 140 | Left = 120 141 | TabIndex = 12 142 | Top = 240 143 | Width = 975 144 | End 145 | End 146 | End 147 | Attribute VB_Name = "frmGenerator" 148 | Attribute VB_GlobalNameSpace = False 149 | Attribute VB_Creatable = False 150 | Attribute VB_PredeclaredId = True 151 | Attribute VB_Exposed = False 152 | 153 | Private Sub Form_Load() 154 | CheckSpawn 155 | End Sub 156 | 157 | Private Sub Form_Unload(Cancel As Integer) 158 | Cancel = 1 159 | Me.Hide 160 | Spawn.Caption = "No" 161 | End Sub 162 | 163 | Private Sub optEffect_Click(Index As Integer) 164 | On Error Resume Next 165 | If Me.Visible = True Then FocusNinja.SetFocus 166 | End Sub 167 | 168 | Private Sub Spawn_Click() 169 | On Error Resume Next 170 | If Me.Visible = True Then FocusNinja.SetFocus 171 | If Spawn.Caption = "Yes" Then 172 | Spawn.Caption = "No" 173 | Else 174 | Spawn.Caption = "Yes" 175 | End If 176 | CheckSpawn 177 | End Sub 178 | 179 | Public Sub CheckSpawn() 180 | If Spawn.Caption = "Yes" Then 181 | Frame1.Enabled = True 182 | Frame2.Enabled = True 183 | Frame3.Enabled = True 184 | optSpawnDirection(1).Enabled = True 185 | optSpawnDirection(2).Enabled = True 186 | optSpawnDirection(3).Enabled = True 187 | optSpawnDirection(4).Enabled = True 188 | lblDelay.Enabled = True 189 | scrDelay.Enabled = True 190 | optEffect(1).Enabled = True 191 | optEffect(2).Enabled = True 192 | Else 193 | Frame1.Enabled = False 194 | Frame2.Enabled = False 195 | Frame3.Enabled = False 196 | optSpawnDirection(1).Enabled = False 197 | optSpawnDirection(2).Enabled = False 198 | optSpawnDirection(3).Enabled = False 199 | optSpawnDirection(4).Enabled = False 200 | lblDelay.Enabled = False 201 | scrDelay.Enabled = False 202 | optEffect(1).Enabled = False 203 | optEffect(2).Enabled = False 204 | End If 205 | End Sub 206 | 207 | Private Sub optSpawnDirection_Click(Index As Integer) 208 | On Error Resume Next 209 | If Me.Visible = True Then FocusNinja.SetFocus 210 | End Sub 211 | 212 | Private Sub scrDelay_Change() 213 | On Error Resume Next 214 | If Me.Visible = True Then FocusNinja.SetFocus 215 | If scrDelay.Value = 10 Then 216 | lblDelay.Caption = scrDelay.Value / 10 & " Second" 217 | Else 218 | lblDelay.Caption = scrDelay.Value / 10 & " Seconds" 219 | End If 220 | End Sub 221 | -------------------------------------------------------------------------------- /frmGenerator.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmGenerator.frx -------------------------------------------------------------------------------- /frmGlobal.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmGlobal 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Global Variables" 5 | ClientHeight = 6315 6 | ClientLeft = 45 7 | ClientTop = 375 8 | ClientWidth = 4230 9 | Icon = "frmGlobal.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MinButton = 0 'False 13 | ScaleHeight = 6315 14 | ScaleWidth = 4230 15 | StartUpPosition = 3 'Windows Default 16 | Begin VB.Frame Frame2 17 | Caption = "Switch Blocks" 18 | Height = 1455 19 | Left = 2760 20 | TabIndex = 5 21 | Top = 120 22 | Width = 1335 23 | Begin VB.CheckBox SwitchBlock 24 | Caption = "Red" 25 | Height = 255 26 | Index = 3 27 | Left = 120 28 | TabIndex = 9 29 | Top = 1080 30 | Width = 975 31 | End 32 | Begin VB.CheckBox SwitchBlock 33 | Caption = "Green" 34 | Height = 255 35 | Index = 2 36 | Left = 120 37 | TabIndex = 8 38 | Top = 840 39 | Width = 975 40 | End 41 | Begin VB.CheckBox SwitchBlock 42 | Caption = "Blue" 43 | Height = 255 44 | Index = 1 45 | Left = 120 46 | TabIndex = 7 47 | Top = 600 48 | Width = 975 49 | End 50 | Begin VB.CheckBox SwitchBlock 51 | Caption = "Yellow" 52 | Height = 255 53 | Index = 0 54 | Left = 120 55 | TabIndex = 6 56 | Top = 360 57 | Width = 975 58 | End 59 | End 60 | Begin VB.Frame Frame1 61 | Caption = "Saved Events" 62 | Height = 4095 63 | Left = 120 64 | TabIndex = 0 65 | Top = 120 66 | Width = 2535 67 | Begin VB.CommandButton cmdRemove 68 | Caption = "Remove" 69 | Height = 375 70 | Left = 1320 71 | TabIndex = 4 72 | Top = 3600 73 | Width = 1095 74 | End 75 | Begin VB.CommandButton cmdAdd 76 | Caption = "Add" 77 | Height = 375 78 | Left = 120 79 | TabIndex = 3 80 | Top = 3600 81 | Width = 1095 82 | End 83 | Begin VB.TextBox txtSavedEvent 84 | Height = 375 85 | Left = 120 86 | TabIndex = 2 87 | Top = 3120 88 | Width = 2295 89 | End 90 | Begin VB.ListBox lstSavedEvent 91 | Height = 2790 92 | ItemData = "frmGlobal.frx":628A 93 | Left = 120 94 | List = "frmGlobal.frx":628C 95 | TabIndex = 1 96 | Top = 240 97 | Width = 2295 98 | End 99 | End 100 | End 101 | Attribute VB_Name = "frmGlobal" 102 | Attribute VB_GlobalNameSpace = False 103 | Attribute VB_Creatable = False 104 | Attribute VB_PredeclaredId = True 105 | Attribute VB_Exposed = False 106 | Option Explicit 107 | 108 | Private Sub cmdAdd_Click() 109 | Dim dontAdd As Boolean 110 | Dim A As Integer 111 | If txtSavedEvent.Text <> "" Then 112 | For A = 1 To numSavedEvents 113 | If LCase(txtSavedEvent.Text) = LCase(SavedEvents(A)) Then 114 | dontAdd = True 115 | Exit For 116 | End If 117 | Next A 118 | If dontAdd = False Then 119 | numSavedEvents = numSavedEvents + 1 120 | SavedEvents (numSavedEvents) 121 | RefreshSavedEvents 122 | End If 123 | txtSavedEvent.Text = "" 124 | End If 125 | End Sub 126 | 127 | Private Sub cmdRemove_Click() 128 | Dim A As Integer 129 | A = lstSavedEvent.ListCount 130 | If A >= 0 Then 131 | SavedEvents(A) = SavedEvents(numSavedEvents) 132 | SavedEvents(numSavedEvents) = "" 133 | numSavedEvents = numSavedEvents - 1 134 | RefreshSavedEvents 135 | End If 136 | End Sub 137 | 138 | Private Sub Form_Load() 139 | RefreshSavedEvents 140 | End Sub 141 | 142 | Public Sub RefreshSavedEvents() 143 | Dim A As Integer 144 | lstSavedEvent.Clear 145 | For A = 1 To numSavedEvents 146 | lstSavedEvent.List(A) = SavedEvents(A) 147 | Next A 148 | End Sub 149 | 150 | Private Sub SwitchBlock_Click(Index As Integer) 151 | If SwitchBlock(Index).Value = 0 Then 152 | BlockSwitch(Index) = False 153 | Else 154 | BlockSwitch(Index) = True 155 | End If 156 | End Sub 157 | 158 | Public Sub RefreshSwitchBlocks() 159 | Dim A As Integer 160 | For A = 1 To 4 161 | If BlockSwitch(A) = True Then 162 | SwitchBlock(A).Value = 1 163 | Else 164 | SwitchBlock(A).Value = 0 165 | End If 166 | Next A 167 | End Sub 168 | -------------------------------------------------------------------------------- /frmGlobal.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmGlobal.frx -------------------------------------------------------------------------------- /frmLayers.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmLayers 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Layers" 5 | ClientHeight = 3510 6 | ClientLeft = 45 7 | ClientTop = 345 8 | ClientWidth = 3375 9 | Icon = "frmLayers.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 3510 15 | ScaleWidth = 3375 16 | Begin VB.CommandButton cmdDelete 17 | Caption = "Delete" 18 | Height = 375 19 | Left = 1800 20 | TabIndex = 3 21 | Top = 3000 22 | Width = 1335 23 | End 24 | Begin VB.CommandButton cmdAdd 25 | Caption = "Add" 26 | Height = 375 27 | Left = 240 28 | TabIndex = 2 29 | Top = 3000 30 | Width = 1335 31 | End 32 | Begin VB.ListBox lstLayer 33 | Height = 2310 34 | ItemData = "frmLayers.frx":628A 35 | Left = 120 36 | List = "frmLayers.frx":6297 37 | Style = 1 'Checkbox 38 | TabIndex = 1 39 | Top = 600 40 | Width = 3135 41 | End 42 | Begin VB.TextBox txtLayer 43 | Height = 375 44 | Left = 120 45 | TabIndex = 0 46 | Top = 120 47 | Width = 3135 48 | End 49 | End 50 | Attribute VB_Name = "frmLayers" 51 | Attribute VB_GlobalNameSpace = False 52 | Attribute VB_Creatable = False 53 | Attribute VB_PredeclaredId = True 54 | Attribute VB_Exposed = False 55 | Private LayerToggle As Boolean 56 | 57 | Private Sub cmdAdd_Click() 58 | On Error Resume Next 59 | Dim A As Integer 60 | Dim B As Integer 61 | Dim tempBool As Boolean 62 | Dim newLayer As String 63 | newLayer = "New Layer" 64 | B = 1 65 | Do 66 | tempBool = False 67 | For A = 0 To lstLayer.ListCount - 1 68 | If LCase(newLayer) = LCase(lstLayer.List(A)) Then 69 | tempBool = True 70 | Exit For 71 | End If 72 | Next A 73 | If tempBool = True Then 74 | B = B + 1 75 | newLayer = "New Layer " & B 76 | End If 77 | Loop While tempBool = True 78 | lstLayer.AddItem newLayer 79 | lstLayer.Selected(lstLayer.ListCount - 1) = True 80 | noUpdate = True 81 | frmEvents.RefreshEvents 82 | noUpdate = False 83 | UpdateLayers 84 | txtLayer.SelStart = 0 85 | txtLayer.SelLength = Len(txtLayer.Text) 86 | txtLayer.SetFocus 87 | End Sub 88 | 89 | Private Sub cmdDelete_Click() 90 | Dim LayerName As String 91 | Dim A As Integer 92 | Dim B As Integer 93 | If MsgBox("Are you sure you want to delete this layer?", vbYesNo, "Delete Layer") = 6 Then 94 | LayerName = LCase(lstLayer.List(lstLayer.ListIndex)) 95 | For A = numNPCs To 1 Step -1 96 | If LCase(NPC(A).Layer) = LayerName Then KillNPC A, 9 97 | Next A 98 | For A = numBlock To 1 Step -1 99 | If LCase(Block(A).Layer) = LayerName Then KillBlock A, False 100 | Next A 101 | For A = numWarps To 1 Step -1 102 | If LCase(Warp(A).Layer) = LayerName Then KillWarp A 103 | Next A 104 | For A = numBackground To 1 Step -1 105 | If LCase(Background(A).Layer) = LayerName Then 106 | Background(A) = Background(numBackground) 107 | numBackground = numBackground - 1 108 | End If 109 | Next A 110 | For A = 0 To 100 111 | If Events(A).Name = "" Then 112 | Exit For 113 | Else 114 | For B = 0 To 20 115 | If LCase(Events(A).HideLayer(B)) = LayerName Then 116 | For C = B To 19 117 | Events(A).HideLayer(C) = Events(A).HideLayer(C + 1) 118 | Next C 119 | Events(A).HideLayer(20) = "" 120 | Exit Sub 121 | End If 122 | Next B 123 | End If 124 | Next A 125 | lstLayer.RemoveItem lstLayer.ListIndex 126 | If lstLayer.ListIndex = 0 Then 127 | cmdDelete.Enabled = False 128 | txtLayer.Enabled = False 129 | End If 130 | If lstLayer.ListIndex >= 0 Then txtLayer.Text = lstLayer.List(lstLayer.ListIndex) 131 | noUpdate = True 132 | frmEvents.RefreshEvents 133 | noUpdate = False 134 | End If 135 | UpdateLayers 136 | End Sub 137 | 138 | Private Sub Form_Load() 139 | lstLayer.ListIndex = 0 140 | lstLayer.Selected(0) = True 141 | End Sub 142 | 143 | Private Sub Form_Unload(Cancel As Integer) 144 | Cancel = 1 145 | Me.Hide 146 | End Sub 147 | 148 | Private Sub lstLayer_Click() 149 | On Error Resume Next 150 | If LayerToggle = True Or noUpdate = True Then 151 | Exit Sub 152 | End If 153 | txtLayer.Text = lstLayer.List(lstLayer.ListIndex) 154 | If lstLayer.List(lstLayer.ListIndex) = "Default" Or lstLayer.List(lstLayer.ListIndex) = "Destroyed Blocks" Or lstLayer.List(lstLayer.ListIndex) = "Spawned NPCs" Then 155 | txtLayer.Enabled = False 156 | cmdDelete.Enabled = False 157 | Else 158 | txtLayer.Enabled = True 159 | cmdDelete.Enabled = True 160 | End If 161 | If lstLayer.Selected(lstLayer.ListIndex) = True Then 162 | ShowLayer lstLayer.List(lstLayer.ListIndex) 163 | Else 164 | HideLayer lstLayer.List(lstLayer.ListIndex) 165 | End If 166 | If lstLayer.List(lstLayer.ListIndex) = "Spawned NPCs" Then 167 | LayerToggle = True 168 | lstLayer.Selected(lstLayer.ListIndex) = True 169 | LayerToggle = False 170 | End If 171 | If lstLayer.List(lstLayer.ListIndex) = "Destroyed Blocks" Then 172 | LayerToggle = True 173 | lstLayer.Selected(lstLayer.ListIndex) = False 174 | LayerToggle = False 175 | End If 176 | txtLayer.SetFocus 177 | UpdateLayers 178 | End Sub 179 | 180 | Private Sub lstLayer_DblClick() 181 | If lstLayer.List(lstLayer.ListIndex) = "Spawned NPCs" Then 182 | LayerToggle = True 183 | lstLayer.Selected(lstLayer.ListIndex) = True 184 | LayerToggle = False 185 | End If 186 | If lstLayer.List(lstLayer.ListIndex) = "Destroyed Blocks" Then 187 | LayerToggle = True 188 | lstLayer.Selected(lstLayer.ListIndex) = False 189 | LayerToggle = False 190 | End If 191 | End Sub 192 | 193 | Private Sub txtLayer_KeyPress(KeyAscii As Integer) 194 | Dim A As Integer 195 | Dim B As Integer 196 | Dim oldLayer As String 197 | Dim newLayer As String 198 | If noUpdate = True Then Exit Sub 199 | If KeyAscii = vbKeyReturn Then 200 | Do While Right(txtLayer.Text, 1) = " " 201 | txtLayer.Text = Left(txtLayer.Text, Len(txtLayer.Text) - 1) 202 | Loop 203 | If txtLayer.Text = "" Then 204 | txtLayer.Text = lstLayer.List(lstLayer.ListIndex) 205 | Exit Sub 206 | End If 207 | For A = 0 To lstLayer.ListCount - 1 208 | If LCase(txtLayer.Text) = LCase(lstLayer.List(A)) Then 209 | txtLayer.Text = lstLayer.List(lstLayer.ListIndex) 210 | Exit For 211 | End If 212 | Next A 213 | newLayer = txtLayer.Text 214 | oldLayer = lstLayer.List(lstLayer.ListIndex) 215 | For A = numNPCs To 1 Step -1 216 | If LCase(NPC(A).Layer) = LCase(oldLayer) Then NPC(A).Layer = newLayer 217 | Next A 218 | For A = numBlock To 1 Step -1 219 | If LCase(Block(A).Layer) = LCase(oldLayer) Then Block(A).Layer = newLayer 220 | Next A 221 | For A = numWarps To 1 Step -1 222 | If LCase(Warp(A).Layer) = LCase(oldLayer) Then Warp(A).Layer = newLayer 223 | Next A 224 | For A = numBackground To 1 Step -1 225 | If LCase(Background(A).Layer) = LCase(oldLayer) Then Background(A).Layer = newLayer 226 | Next A 227 | lstLayer.List(lstLayer.ListIndex) = txtLayer.Text 228 | For A = 0 To 100 229 | For B = 0 To 20 230 | If LCase(Events(A).HideLayer(B)) = LCase(oldLayer) Then Events(A).HideLayer(B) = newLayer 231 | If LCase(Events(A).ShowLayer(B)) = LCase(oldLayer) Then Events(A).ShowLayer(B) = newLayer 232 | Next B 233 | Next A 234 | noUpdate = True 235 | frmEvents.RefreshEvents 236 | noUpdate = False 237 | UpdateLayers 238 | End If 239 | End Sub 240 | 241 | Public Sub UpdateLayers() 242 | Dim tempStr As String 243 | Dim lyrStr As String 244 | Dim A As Integer 245 | If noUpdate = True Then Exit Sub 246 | lyrStr = frmAdvanced.AttLayer.Text 247 | frmAdvanced.AttLayer.Clear 248 | For A = 0 To 100 249 | If A <= lstLayer.ListCount - 1 Then 250 | Layer(A).Name = lstLayer.List(A) 251 | frmAdvanced.AttLayer.List(A) = lstLayer.List(A) 252 | If lstLayer.Selected(A) = True Then 253 | Layer(A).Hidden = False 254 | Else 255 | Layer(A).Hidden = True 256 | End If 257 | Else 258 | Layer(A).Name = lstLayer.List(A) 259 | Layer(A).Hidden = False 260 | End If 261 | Next A 262 | frmAdvanced.AttLayer.Text = lyrStr 263 | If noUpdate = False And nPlay.Online = True Then 264 | For A = 0 To 100 265 | tempStr = tempStr & Netplay.ModLayer(A) 266 | If Layer(A).Name = "" Then Exit For 267 | Next A 268 | Netplay.sendData tempStr 269 | End If 270 | End Sub 271 | 272 | -------------------------------------------------------------------------------- /frmLayers.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLayers.frx -------------------------------------------------------------------------------- /frmLevelAdv.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmLevelAdv 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Advanced Level Settings" 5 | ClientHeight = 2070 6 | ClientLeft = 45 7 | ClientTop = 375 8 | ClientWidth = 4485 9 | Icon = "frmLevelAdv.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 2070 15 | ScaleWidth = 4485 16 | Begin VB.Frame Frame2 17 | Caption = "Clone Section" 18 | Height = 1095 19 | Left = 120 20 | TabIndex = 2 21 | Top = 840 22 | Width = 4215 23 | Begin VB.CommandButton cmdClone 24 | Caption = "Clone" 25 | Height = 375 26 | Left = 2640 27 | TabIndex = 7 28 | Top = 240 29 | Width = 735 30 | End 31 | Begin VB.ComboBox CloneT 32 | Height = 315 33 | ItemData = "frmLevelAdv.frx":628A 34 | Left = 840 35 | List = "frmLevelAdv.frx":628C 36 | TabIndex = 4 37 | Top = 600 38 | Width = 1695 39 | End 40 | Begin VB.ComboBox CloneS 41 | Height = 315 42 | Left = 840 43 | TabIndex = 3 44 | Top = 240 45 | Width = 1695 46 | End 47 | Begin VB.Label Label2 48 | AutoSize = -1 'True 49 | Caption = "Target:" 50 | Height = 195 51 | Left = 240 52 | TabIndex = 6 53 | Top = 600 54 | Width = 510 55 | End 56 | Begin VB.Label Label1 57 | AutoSize = -1 'True 58 | Caption = "Source:" 59 | Height = 195 60 | Left = 120 61 | TabIndex = 5 62 | Top = 240 63 | Width = 555 64 | End 65 | End 66 | Begin VB.Frame Frame1 67 | Caption = "Level Name" 68 | Height = 615 69 | Left = 120 70 | TabIndex = 0 71 | Top = 120 72 | Width = 4215 73 | Begin VB.TextBox txtLevelName 74 | Height = 285 75 | Left = 120 76 | TabIndex = 1 77 | Top = 240 78 | Width = 3975 79 | End 80 | End 81 | End 82 | Attribute VB_Name = "frmLevelAdv" 83 | Attribute VB_GlobalNameSpace = False 84 | Attribute VB_Creatable = False 85 | Attribute VB_PredeclaredId = True 86 | Attribute VB_Exposed = False 87 | Option Explicit 88 | 89 | Public Sub RefreshFields() 90 | txtLevelName.Text = LevelName 91 | End Sub 92 | 93 | Private Sub cmdClone_Click() 94 | CloneSection CloneS.ListIndex, CloneT.ListIndex 95 | End Sub 96 | 97 | Private Sub Form_Load() 98 | Dim A As Integer 99 | CloneS.Clear 100 | CloneT.Clear 101 | For A = 1 To 21 102 | CloneS.AddItem "Section " & A 103 | CloneT.AddItem "Section " & A 104 | Next A 105 | End Sub 106 | 107 | Private Sub txtLevelName_Change() 108 | LevelName = txtLevelName.Text 109 | End Sub 110 | 111 | Public Sub CloneSection(SectionS As Integer, SectionT As Integer) 112 | Dim A As Integer 113 | Dim B As Integer 114 | Dim C As Integer 115 | frmLevelSettings.optSection(SectionT).Value = True 116 | frmLevelSettings.optBackground(Background2(SectionS)).Value = True 117 | frmLevelSettings.optMusic(bgMusic(SectionS)).Value = True 118 | If UnderWater(SectionS) = True Then 119 | frmLevelSettings.cmdWater.Caption = "On" 120 | Else 121 | frmLevelSettings.cmdWater.Caption = "Off" 122 | End If 123 | If OffScreenExit(SectionS) = True Then 124 | frmLevelSettings.cmdExit.Caption = "On" 125 | Else 126 | frmLevelSettings.cmdExit.Caption = "Off" 127 | End If 128 | If LevelWrap(SectionS) = True Then 129 | frmLevelSettings.cmdWrap.Caption = "On" 130 | Else 131 | frmLevelSettings.cmdWrap.Caption = "Off" 132 | End If 133 | If NoTurnBack(SectionS) = True Then 134 | frmLevelSettings.cmdNoTurnBack.Caption = "On" 135 | Else 136 | frmLevelSettings.cmdNoTurnBack.Caption = "Off" 137 | End If 138 | UnderWater(SectionT) = UnderWater(SectionS) 139 | NoTurnBack(SectionT) = NoTurnBack(SectionS) 140 | LevelWrap(SectionT) = LevelWrap(SectionS) 141 | OffScreenExit(SectionT) = OffScreenExit(SectionS) 142 | level(SectionT).Width = level(SectionS).Width - level(SectionS).X + level(SectionT).X 143 | level(SectionT).Height = level(SectionS).Height - level(SectionS).Y + level(SectionT).Y 144 | For A = 1 To numBlock 145 | If CloneLoc(Block(A).Location, level(SectionS)) = True Then 146 | numBlock = numBlock + 1 147 | Block(numBlock) = Block(A) 148 | Block(numBlock).Location.X = Block(A).Location.X - level(SectionS).X + level(SectionT).X 149 | Block(numBlock).Location.Y = Block(A).Location.Y - level(SectionS).Y + level(SectionT).Y 150 | End If 151 | Next A 152 | For A = 1 To numNPCs 153 | If CloneLoc(NPC(A).Location, level(SectionS)) = True Then 154 | numNPCs = numNPCs + 1 155 | NPC(numNPCs) = NPC(A) 156 | NPC(numNPCs).Location.X = NPC(A).Location.X - level(SectionS).X + level(SectionT).X 157 | NPC(numNPCs).Location.Y = NPC(A).Location.Y - level(SectionS).Y + level(SectionT).Y 158 | NPC(numNPCs).DefaultLocation = NPC(A).Location 159 | End If 160 | Next A 161 | For A = 1 To numBackground 162 | If CloneLoc(Background(A).Location, level(SectionS)) = True Then 163 | numBackground = numBackground + 1 164 | Background(numBackground) = Background(A) 165 | Background(numBackground).Location.X = Background(A).Location.X - level(SectionS).X + level(SectionT).X 166 | Background(numBackground).Location.Y = Background(A).Location.Y - level(SectionS).Y + level(SectionT).Y 167 | End If 168 | Next A 169 | For A = 1 To numWater 170 | If CloneLoc(Water(A).Location, level(SectionS)) = True Then 171 | numWater = numWater + 1 172 | Water(numWater) = Water(A) 173 | Water(numWater).Location.X = Water(A).Location.X - level(SectionS).X + level(SectionT).X 174 | Water(numWater).Location.Y = Water(A).Location.Y - level(SectionS).Y + level(SectionT).Y 175 | End If 176 | Next A 177 | qSortNPCsY 1, C 178 | qSortNPCsY C + 1, numNPCs 179 | qSortBlocksX 1, numBlock 180 | B = 1 181 | For A = 2 To numBlock 182 | If Block(A).Location.X > Block(B).Location.X Then 183 | qSortBlocksY B, A - 1 184 | B = A 185 | End If 186 | Next A 187 | qSortBlocksY B, A - 1 188 | qSortBackgrounds 1, numBackground 189 | FindSBlocks 190 | End Sub 191 | 192 | Private Function CloneLoc(Loc1 As Location, Loc2 As Location) As Boolean 193 | Dim Dist As Integer 194 | Dist = 128 195 | If Loc1.X + Loc1.Width + Dist >= Loc2.X Then 196 | If Loc1.X <= Loc2.Width + Dist Then 197 | If Loc1.Y + Loc1.Height + Dist >= Loc2.Y Then 198 | If Loc1.Y <= Loc2.Height + Dist Then 199 | CloneLoc = True 200 | End If 201 | End If 202 | End If 203 | End If 204 | End Function 205 | -------------------------------------------------------------------------------- /frmLevelAdv.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLevelAdv.frx -------------------------------------------------------------------------------- /frmLevelDebugger.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLevelDebugger.frx -------------------------------------------------------------------------------- /frmLevelEditor.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLevelEditor.frx -------------------------------------------------------------------------------- /frmLevelSettings.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLevelSettings.frx -------------------------------------------------------------------------------- /frmLevelWindow.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmLevelWindow 3 | BackColor = &H00000000& 4 | Caption = "Level Window" 5 | ClientHeight = 9060 6 | ClientLeft = 120 7 | ClientTop = 405 8 | ClientWidth = 12060 9 | Icon = "frmLevelWindow.frx":0000 10 | LinkTopic = "Form1" 11 | MDIChild = -1 'True 12 | ScaleHeight = 9060 13 | ScaleWidth = 12060 14 | Begin VB.PictureBox vScreen 15 | BackColor = &H00000000& 16 | Height = 9060 17 | Index = 1 18 | Left = 0 19 | MouseIcon = "frmLevelWindow.frx":628A 20 | MousePointer = 99 'Custom 21 | ScaleHeight = 600 22 | ScaleMode = 3 'Pixel 23 | ScaleWidth = 800 24 | TabIndex = 0 25 | Top = 0 26 | Width = 12059 27 | End 28 | End 29 | Attribute VB_Name = "frmLevelWindow" 30 | Attribute VB_GlobalNameSpace = False 31 | Attribute VB_Creatable = False 32 | Attribute VB_PredeclaredId = True 33 | Attribute VB_Exposed = False 34 | 35 | Private Sub Form_KeyPress(KeyAscii As Integer) 36 | Stop 37 | End Sub 38 | 39 | Private Sub Form_Load() 40 | GFX.Split(1).Width = vScreen(1).Width 41 | GFX.Split(1).Height = vScreen(1).Height 42 | level(0).Height = 600 43 | level(0).Width = 800 44 | Me.Width = 12240 45 | Me.Height = 9570 46 | Do While vScreen(1).ScaleWidth > 800 47 | Me.Width = Me.Width - 5 48 | vScreen(1).Width = Me.ScaleWidth 49 | DoEvents 50 | Loop 51 | Do While vScreen(1).ScaleHeight > 600 52 | Me.Height = Me.Height - 5 53 | vScreen(1).Height = Me.ScaleHeight 54 | DoEvents 55 | Loop 56 | Do While vScreen(1).ScaleWidth < 800 57 | Me.Width = Me.Width + 5 58 | vScreen(1).Width = Me.ScaleWidth 59 | DoEvents 60 | Loop 61 | Do While vScreen(1).ScaleHeight < 600 62 | Me.Height = Me.Height + 5 63 | vScreen(1).Height = Me.ScaleHeight 64 | DoEvents 65 | Loop 66 | End Sub 67 | 68 | Private Sub Form_LostFocus() 69 | HideCursor 70 | End Sub 71 | 72 | Private Sub Form_Resize() 73 | vScreen(1).Width = Me.ScaleWidth 74 | vScreen(1).Height = Me.ScaleHeight 75 | End Sub 76 | 77 | Private Sub Form_Unload(Cancel As Integer) 78 | Cancel = 1 79 | End Sub 80 | 81 | Private Sub vScreen_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) 82 | If KeyCode = vbKeyF12 Then 83 | TakeScreen = True 84 | End If 85 | End Sub 86 | 87 | Private Sub vScreen_KeyPress(Index As Integer, KeyAscii As Integer) 88 | CheatCode Chr(KeyAscii) 89 | End Sub 90 | 91 | Private Sub vScreen_LostFocus(Index As Integer) 92 | HideCursor 93 | End Sub 94 | 95 | Private Sub vScreen_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) 96 | If Button = 1 Then 97 | EditorControls.Mouse1 = True 98 | ElseIf Button = 2 Then 99 | If WorldEditor = True Then 100 | frmLevelEditor.optCursor(14).Value = True 101 | Else 102 | frmLevelEditor.optCursor(13).Value = True 103 | End If 104 | frmLayers.lstLayer.ListIndex = 0 105 | MouseMove X, Y 106 | SetCursor 107 | End If 108 | End Sub 109 | 110 | Private Sub vScreen_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) 111 | On Error Resume Next 112 | With EditorCursor 113 | .X = Int(X * ScreenW / vScreen(Index).ScaleWidth) 114 | .Y = Int(Y * ScreenH / vScreen(Index).ScaleHeight) 115 | End With 116 | MouseMove Int(X * ScreenW / vScreen(Index).ScaleWidth), Int(Y * ScreenH / vScreen(Index).ScaleHeight), True 117 | MouseRelease = True 118 | End Sub 119 | 120 | Private Sub vScreen_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) 121 | If Index = 1 Then 122 | EditorControls.Mouse1 = False 123 | End If 124 | End Sub 125 | 126 | -------------------------------------------------------------------------------- /frmLevelWindow.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLevelWindow.frx -------------------------------------------------------------------------------- /frmLevels.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLevels.frx -------------------------------------------------------------------------------- /frmLoader.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "ieframe.dll" 3 | Begin VB.Form frmLoader 4 | BorderStyle = 1 'Fixed Single 5 | Caption = "Super Mario Bros. X - Version 1.3 - www.SuperMarioBrothers.org" 6 | ClientHeight = 6855 7 | ClientLeft = 45 8 | ClientTop = 375 9 | ClientWidth = 9405 10 | Icon = "frmLoader.frx":0000 11 | LinkTopic = "Form1" 12 | MaxButton = 0 'False 13 | MinButton = 0 'False 14 | ScaleHeight = 6855 15 | ScaleWidth = 9405 16 | StartUpPosition = 2 'CenterScreen 17 | Begin VB.CheckBox chkFrameskip 18 | Caption = "Disable Frameskip" 19 | Height = 255 20 | Left = 4560 21 | TabIndex = 5 22 | Top = 6480 23 | Width = 1695 24 | End 25 | Begin VB.CheckBox chkSound 26 | Caption = "Disable Sound" 27 | Height = 255 28 | Left = 6360 29 | TabIndex = 4 30 | Top = 6480 31 | Width = 1455 32 | End 33 | Begin SHDocVwCtl.WebBrowser Splash 34 | Height = 6135 35 | Left = 120 36 | TabIndex = 3 37 | Top = 120 38 | Width = 9135 39 | ExtentX = 16113 40 | ExtentY = 10821 41 | ViewMode = 0 42 | Offline = 0 43 | Silent = 0 44 | RegisterAsBrowser= 0 45 | RegisterAsDropTarget= 1 46 | AutoArrange = 0 'False 47 | NoClientEdge = 0 'False 48 | AlignLeft = 0 'False 49 | NoWebView = 0 'False 50 | HideFileNames = 0 'False 51 | SingleClick = 0 'False 52 | SingleSelection = 0 'False 53 | NoFolders = 0 'False 54 | Transparent = 0 'False 55 | ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}" 56 | Location = "http:///" 57 | End 58 | Begin VB.CommandButton cmdExit 59 | Caption = "Exit" 60 | Height = 375 61 | Left = 7920 62 | TabIndex = 2 63 | Top = 6360 64 | Width = 1335 65 | End 66 | Begin VB.CommandButton cmdEditor 67 | Caption = "Level Editor" 68 | Height = 375 69 | Left = 1560 70 | TabIndex = 1 71 | Top = 6360 72 | Width = 1335 73 | End 74 | Begin VB.CommandButton cmdGame 75 | Caption = "Start Game" 76 | Height = 375 77 | Left = 120 78 | TabIndex = 0 79 | Top = 6360 80 | Width = 1335 81 | End 82 | End 83 | Attribute VB_Name = "frmLoader" 84 | Attribute VB_GlobalNameSpace = False 85 | Attribute VB_Creatable = False 86 | Attribute VB_PredeclaredId = True 87 | Attribute VB_Exposed = False 88 | Private Sub cmdEditor_Click() 89 | LevelEditor = True 90 | StartMenu = True 91 | End Sub 92 | 93 | Private Sub cmdExit_Click() 94 | KillIt 95 | End Sub 96 | 97 | Private Sub cmdGame_Click() 98 | StartMenu = True 99 | End Sub 100 | 101 | Private Sub Form_Load() 102 | Splash.Navigate "http://www.supermariobrothers.org/splash/" 103 | End Sub 104 | 105 | Private Sub Form_Unload(Cancel As Integer) 106 | If StartMenu = False Then KillIt 107 | End Sub 108 | -------------------------------------------------------------------------------- /frmLoader.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLoader.frx -------------------------------------------------------------------------------- /frmLoading.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmLoading 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Loading" 5 | ClientHeight = 1350 6 | ClientLeft = 45 7 | ClientTop = 375 8 | ClientWidth = 3165 9 | Icon = "frmLoading.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MinButton = 0 'False 13 | ScaleHeight = 1350 14 | ScaleWidth = 3165 15 | StartUpPosition = 2 'CenterScreen 16 | Begin VB.CommandButton cmdGo 17 | Caption = "Disconnect" 18 | Height = 375 19 | Left = 840 20 | TabIndex = 3 21 | Top = 840 22 | Width = 1455 23 | End 24 | Begin VB.PictureBox maxLoad 25 | Height = 375 26 | Left = 120 27 | ScaleHeight = 315 28 | ScaleWidth = 2835 29 | TabIndex = 1 30 | Top = 360 31 | Width = 2895 32 | Begin VB.PictureBox curLoad 33 | BackColor = &H00FF8080& 34 | BorderStyle = 0 'None 35 | Height = 375 36 | Left = 0 37 | ScaleHeight = 375 38 | ScaleWidth = 2895 39 | TabIndex = 2 40 | Top = 0 41 | Width = 2895 42 | End 43 | End 44 | Begin VB.Timer tmrLoad 45 | Interval = 1000 46 | Left = 120 47 | Top = 4440 48 | End 49 | Begin VB.Label Label1 50 | AutoSize = -1 'True 51 | Caption = "Loading data from server, please wait..." 52 | Height = 195 53 | Left = 120 54 | TabIndex = 0 55 | Top = 120 56 | Width = 2775 57 | End 58 | End 59 | Attribute VB_Name = "frmLoading" 60 | Attribute VB_GlobalNameSpace = False 61 | Attribute VB_Creatable = False 62 | Attribute VB_PredeclaredId = True 63 | Attribute VB_Exposed = False 64 | Private Sub cmdGo_Click() 65 | frmChat.txtChat = frmChat.txtChat & "You have disconnected." & LB 66 | frmChat.txtChat.SelStart = Len(frmChat.txtChat.Text) 67 | PlaySound 47 68 | SoundPause(47) = 2 69 | Netplay.DropServer 70 | Me.Enabled = False 71 | Unload Me 72 | End Sub 73 | 74 | Private Sub Form_Unload(Cancel As Integer) 75 | If Me.Enabled = True Then 76 | frmChat.txtChat = frmChat.txtChat & "You have disconnected." & LB 77 | frmChat.txtChat.SelStart = Len(frmChat.txtChat.Text) 78 | PlaySound 47 79 | SoundPause(47) = 2 80 | Netplay.DropServer 81 | End If 82 | End Sub 83 | 84 | Private Sub tmrLoad_Timer() 85 | If Me.Caption = "Loading" Then 86 | Me.Caption = "Loading." 87 | ElseIf Me.Caption = "Loading." Then 88 | Me.Caption = "Loading.." 89 | ElseIf Me.Caption = "Loading.." Then 90 | Me.Caption = "Loading..." 91 | ElseIf Me.Caption = "Loading..." Then 92 | Me.Caption = "Loading...." 93 | Else 94 | Me.Caption = "Loading" 95 | End If 96 | End Sub 97 | -------------------------------------------------------------------------------- /frmLoading.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLoading.frx -------------------------------------------------------------------------------- /frmLoading2.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmLoading2.frx -------------------------------------------------------------------------------- /frmMain.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmMain 3 | Appearance = 0 'Flat 4 | AutoRedraw = -1 'True 5 | BackColor = &H00000000& 6 | Caption = "Super Mario Bros. X - Version 1.2.2 - www.SuperMarioBrothers.org" 7 | ClientHeight = 9000 8 | ClientLeft = 120 9 | ClientTop = 510 10 | ClientWidth = 12000 11 | Icon = "frmMain.frx":0000 12 | LinkTopic = "Form1" 13 | MouseIcon = "frmMain.frx":628A 14 | Picture = "frmMain.frx":6594 15 | ScaleHeight = 600 16 | ScaleMode = 3 'Pixel 17 | ScaleWidth = 800 18 | StartUpPosition = 2 'CenterScreen 19 | Begin VB.PictureBox LoadCoin 20 | AutoRedraw = -1 'True 21 | AutoSize = -1 'True 22 | BackColor = &H00000000& 23 | BorderStyle = 0 'None 24 | Height = 480 25 | Left = 11400 26 | Picture = "frmMain.frx":EFBF 27 | ScaleHeight = 32 28 | ScaleMode = 3 'Pixel 29 | ScaleWidth = 28 30 | TabIndex = 0 31 | Top = 8400 32 | Width = 420 33 | End 34 | Begin VB.Image Loader 35 | Height = 240 36 | Left = 9480 37 | Picture = "frmMain.frx":F3D3 38 | Top = 8640 39 | Width = 1770 40 | End 41 | End 42 | Attribute VB_Name = "frmMain" 43 | Attribute VB_GlobalNameSpace = False 44 | Attribute VB_Creatable = False 45 | Attribute VB_PredeclaredId = True 46 | Attribute VB_Exposed = False 47 | Public LockSize As Boolean 48 | 49 | Private Sub Form_DblClick() 50 | If Me.WindowState = 0 Then Exit Sub 51 | LockSize = True 52 | If resChanged = False Then 53 | If Me.WindowState = 2 Then 54 | Me.WindowState = 0 55 | Me.BorderStyle = 2 56 | Me.Caption = "Super Mario Bros. X - Version 1.3 - www.SuperMarioBrothers.org" 57 | Else 58 | Me.BorderStyle = 0 59 | Me.Caption = "" 60 | DoEvents 61 | Me.WindowState = 2 62 | End If 63 | End If 64 | LockSize = False 65 | End Sub 66 | 67 | Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) 68 | inputKey = KeyCode 69 | If KeyCode = 13 Then 70 | keyDownEnter = True 71 | ElseIf KeyCode = 18 Then 72 | keyDownAlt = True 73 | End If 74 | If keyDownEnter = True And keyDownAlt = True And TestLevel = False Then 75 | keyDownAlt = False 76 | keyDownEnter = False 77 | ChangeScreen 78 | End If 79 | If KeyCode = vbKeyF12 Then TakeScreen = True 80 | End Sub 81 | 82 | Private Sub Form_KeyPress(KeyAscii As Integer) 83 | CheatCode Chr(KeyAscii) 84 | End Sub 85 | 86 | Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) 87 | If KeyCode = 13 Then 88 | keyDownEnter = False 89 | ElseIf KeyCode = 18 Then 90 | keyDownAlt = False 91 | End If 92 | End Sub 93 | 94 | Private Sub Form_Load() 95 | LockSize = True 96 | Do While frmMain.ScaleWidth > 800 97 | Me.Width = Me.Width - 5 98 | Loop 99 | Do While frmMain.ScaleHeight > 600 100 | Me.Height = Me.Height - 5 101 | Loop 102 | Do While frmMain.ScaleWidth < 800 103 | Me.Width = Me.Width + 5 104 | Loop 105 | Do While frmMain.ScaleHeight < 600 106 | Me.Height = Me.Height + 5 107 | Loop 108 | LockSize = False 109 | End Sub 110 | 111 | Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 112 | If Button = 1 Then 113 | MenuMouseDown = True 114 | MenuMouseMove = True 115 | Else 116 | MenuMouseBack = True 117 | End If 118 | End Sub 119 | 120 | Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 121 | MenuMouseX = Int(X * ScreenW / frmMain.ScaleWidth) 122 | MenuMouseY = Int(Y * ScreenH / frmMain.ScaleHeight) 123 | MenuMouseMove = True 124 | End Sub 125 | 126 | Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 127 | MenuMouseDown = False 128 | MenuMouseRelease = True 129 | End Sub 130 | 131 | Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) 132 | ShowCursor True 133 | ShowCursor True 134 | ShowCursor True 135 | ShowCursor True 136 | ShowCursor True 137 | End Sub 138 | 139 | Private Sub Form_Resize() 140 | If LockSize = True Or resChanged = True Then Exit Sub 141 | LockSize = True 142 | If Me.WindowState = 0 Then 143 | Me.BorderStyle = 2 144 | Me.Caption = "Super Mario Bros. X - Version 1.3 - www.SuperMarioBrothers.org" 145 | ElseIf Me.WindowState = 2 Then 146 | Me.WindowState = 0 147 | Me.BorderStyle = 0 148 | Me.Caption = "" 149 | DoEvents 150 | DoEvents 151 | Me.WindowState = 2 152 | DoEvents 153 | End If 154 | SetupScreens 155 | LockSize = False 156 | End Sub 157 | 158 | Private Sub Form_Unload(Cancel As Integer) 159 | Cancel = 1 160 | ShowCursor True 161 | ShowCursor True 162 | ShowCursor True 163 | ShowCursor True 164 | ShowCursor True 165 | KillIt 166 | End Sub 167 | -------------------------------------------------------------------------------- /frmMain.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmMain.frx -------------------------------------------------------------------------------- /frmMusic.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmMusic 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "World Music" 5 | ClientHeight = 2085 6 | ClientLeft = 1.00050e5 7 | ClientTop = 330 8 | ClientWidth = 7935 9 | Icon = "frmMusic.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 2085 15 | ScaleWidth = 7935 16 | Visible = 0 'False 17 | Begin VB.OptionButton optMusic 18 | Caption = "SMW Cave" 19 | Height = 375 20 | Index = 16 21 | Left = 1680 22 | Style = 1 'Graphical 23 | TabIndex = 17 24 | Top = 1080 25 | Width = 1455 26 | End 27 | Begin VB.OptionButton optMusic 28 | Caption = "SMW Island" 29 | Height = 375 30 | Index = 15 31 | Left = 6360 32 | Style = 1 'Graphical 33 | TabIndex = 16 34 | Top = 600 35 | Width = 1455 36 | End 37 | Begin VB.OptionButton optMusic 38 | Caption = "SMW Star Road" 39 | Height = 375 40 | Index = 14 41 | Left = 6360 42 | Style = 1 'Graphical 43 | TabIndex = 15 44 | Top = 1080 45 | Width = 1455 46 | End 47 | Begin VB.OptionButton optMusic 48 | Caption = "SMW Bowser" 49 | Height = 375 50 | Index = 13 51 | Left = 4800 52 | Style = 1 'Graphical 53 | TabIndex = 14 54 | Top = 1080 55 | Width = 1455 56 | End 57 | Begin VB.OptionButton optMusic 58 | Caption = "SMW Special" 59 | Height = 375 60 | Index = 12 61 | Left = 120 62 | Style = 1 'Graphical 63 | TabIndex = 13 64 | Top = 1560 65 | Width = 1455 66 | End 67 | Begin VB.OptionButton optMusic 68 | Caption = "SMB3 World 5" 69 | Height = 375 70 | Index = 11 71 | Left = 120 72 | Style = 1 'Graphical 73 | TabIndex = 12 74 | Top = 600 75 | Width = 1455 76 | End 77 | Begin VB.OptionButton optMusic 78 | Caption = "SMB3 World 6" 79 | Height = 375 80 | Index = 10 81 | Left = 1680 82 | Style = 1 'Graphical 83 | TabIndex = 11 84 | Top = 600 85 | Width = 1455 86 | End 87 | Begin VB.PictureBox FocusNinja 88 | Height = 375 89 | Left = 11160 90 | ScaleHeight = 315 91 | ScaleWidth = 315 92 | TabIndex = 0 93 | Top = 360 94 | Width = 375 95 | End 96 | Begin VB.OptionButton optMusic 97 | Caption = "SMB3 World 8" 98 | Height = 375 99 | Index = 9 100 | Left = 4800 101 | Style = 1 'Graphical 102 | TabIndex = 10 103 | Top = 600 104 | Width = 1455 105 | End 106 | Begin VB.OptionButton optMusic 107 | Caption = "SMB3 World 3" 108 | Height = 375 109 | Index = 8 110 | Left = 4800 111 | Style = 1 'Graphical 112 | TabIndex = 9 113 | Top = 120 114 | Width = 1455 115 | End 116 | Begin VB.OptionButton optMusic 117 | Caption = "SMW Forest" 118 | Height = 375 119 | Index = 7 120 | Left = 3240 121 | Style = 1 'Graphical 122 | TabIndex = 8 123 | Top = 1080 124 | Width = 1455 125 | End 126 | Begin VB.OptionButton optMusic 127 | Caption = "SMB3 World 2" 128 | Height = 375 129 | Index = 6 130 | Left = 3240 131 | Style = 1 'Graphical 132 | TabIndex = 7 133 | Top = 120 134 | Width = 1455 135 | End 136 | Begin VB.OptionButton optMusic 137 | Caption = "NSMB Theme" 138 | Height = 375 139 | Index = 5 140 | Left = 1680 141 | Style = 1 'Graphical 142 | TabIndex = 6 143 | Top = 1560 144 | Width = 1455 145 | End 146 | Begin VB.OptionButton optMusic 147 | Caption = "SMW Theme" 148 | Height = 375 149 | Index = 4 150 | Left = 120 151 | Style = 1 'Graphical 152 | TabIndex = 5 153 | Top = 1080 154 | Width = 1455 155 | End 156 | Begin VB.OptionButton optMusic 157 | Caption = "SMB3 World 7" 158 | Height = 375 159 | Index = 3 160 | Left = 3240 161 | Style = 1 'Graphical 162 | TabIndex = 4 163 | Top = 600 164 | Width = 1455 165 | End 166 | Begin VB.OptionButton optMusic 167 | Caption = "None" 168 | Height = 375 169 | Index = 0 170 | Left = 120 171 | Style = 1 'Graphical 172 | TabIndex = 3 173 | Top = 120 174 | Value = -1 'True 175 | Width = 1455 176 | End 177 | Begin VB.OptionButton optMusic 178 | Caption = "SMB3 World 1" 179 | Height = 375 180 | Index = 1 181 | Left = 1680 182 | Style = 1 'Graphical 183 | TabIndex = 2 184 | Top = 120 185 | Width = 1455 186 | End 187 | Begin VB.OptionButton optMusic 188 | Caption = "SMB3 World 4" 189 | Height = 375 190 | Index = 2 191 | Left = 6360 192 | Style = 1 'Graphical 193 | TabIndex = 1 194 | Top = 120 195 | Width = 1455 196 | End 197 | End 198 | Attribute VB_Name = "frmMusic" 199 | Attribute VB_GlobalNameSpace = False 200 | Attribute VB_Creatable = False 201 | Attribute VB_PredeclaredId = True 202 | Attribute VB_Exposed = False 203 | 204 | Private Sub optMusic_Click(Index As Integer) 205 | On Error Resume Next 206 | If Me.Visible = True Then FocusNinja.SetFocus 207 | End Sub 208 | -------------------------------------------------------------------------------- /frmMusic.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmMusic.frx -------------------------------------------------------------------------------- /frmNPCAdvanced.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmNPCAdvanced 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Advanced NPC Settings" 5 | ClientHeight = 1950 6 | ClientLeft = 45 7 | ClientTop = 435 8 | ClientWidth = 4305 9 | Icon = "frmNPCAdvanced.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 1950 15 | ScaleWidth = 4305 16 | Begin VB.Frame WarpFrame 17 | Caption = "Warp to Section" 18 | Height = 615 19 | Left = 120 20 | TabIndex = 10 21 | Top = 1320 22 | Width = 2535 23 | Begin VB.ComboBox WarpSection 24 | Height = 315 25 | Left = 120 26 | TabIndex = 11 27 | Top = 240 28 | Width = 2175 29 | End 30 | End 31 | Begin VB.Frame FireFrame 32 | Caption = "Firebar" 33 | Height = 975 34 | Left = 2760 35 | TabIndex = 7 36 | Top = 960 37 | Width = 1455 38 | Begin VB.HScrollBar scrFire 39 | Height = 255 40 | Left = 120 41 | Max = 32 42 | TabIndex = 8 43 | Top = 480 44 | Value = 1 45 | Width = 1095 46 | End 47 | Begin VB.Label lbFire 48 | Caption = "Position: 1" 49 | Height = 255 50 | Left = 120 51 | TabIndex = 9 52 | Top = 240 53 | Width = 1170 54 | End 55 | End 56 | Begin VB.Frame CheepFrame 57 | Caption = "Cheep Cheep AI" 58 | Enabled = 0 'False 59 | Height = 615 60 | Left = 120 61 | TabIndex = 5 62 | Top = 720 63 | Width = 2535 64 | Begin VB.ComboBox cmbCheep 65 | Enabled = 0 'False 66 | Height = 315 67 | ItemData = "frmNPCAdvanced.frx":628A 68 | Left = 120 69 | List = "frmNPCAdvanced.frx":629D 70 | Style = 2 'Dropdown List 71 | TabIndex = 6 72 | Top = 240 73 | Width = 2175 74 | End 75 | End 76 | Begin VB.PictureBox FocusNinja 77 | Height = 375 78 | Left = 9000 79 | ScaleHeight = 315 80 | ScaleWidth = 315 81 | TabIndex = 4 82 | Top = 3960 83 | Width = 375 84 | End 85 | Begin VB.Frame LegacyFrame 86 | Caption = "Legacy Boss" 87 | Enabled = 0 'False 88 | Height = 735 89 | Left = 2760 90 | TabIndex = 2 91 | Top = 120 92 | Width = 1455 93 | Begin VB.CommandButton Legacy 94 | Caption = "No" 95 | Enabled = 0 'False 96 | Height = 375 97 | Left = 120 98 | TabIndex = 3 99 | Top = 240 100 | Width = 1215 101 | End 102 | End 103 | Begin VB.Frame ParaFrame 104 | Caption = "Koopa Para-Troopa AI" 105 | Enabled = 0 'False 106 | Height = 615 107 | Left = 120 108 | TabIndex = 0 109 | Top = 120 110 | Width = 2535 111 | Begin VB.ComboBox cmbPara 112 | Enabled = 0 'False 113 | Height = 315 114 | ItemData = "frmNPCAdvanced.frx":62D8 115 | Left = 120 116 | List = "frmNPCAdvanced.frx":62E8 117 | Style = 2 'Dropdown List 118 | TabIndex = 1 119 | Top = 240 120 | Width = 2175 121 | End 122 | End 123 | End 124 | Attribute VB_Name = "frmNPCAdvanced" 125 | Attribute VB_GlobalNameSpace = False 126 | Attribute VB_Creatable = False 127 | Attribute VB_PredeclaredId = True 128 | Attribute VB_Exposed = False 129 | 130 | Private Sub Form_Load() 131 | Dim A As Integer 132 | WarpSection.Clear 133 | For A = 1 To 21 134 | WarpSection.AddItem "Section " & A 135 | Next A 136 | End Sub 137 | 138 | Private Sub Form_Unload(Cancel As Integer) 139 | Cancel = 1 140 | Me.Hide 141 | End Sub 142 | 143 | Private Sub Legacy_Click() 144 | On Error Resume Next 145 | If Me.Visible = True Then FocusNinja.SetFocus 146 | If Legacy.Caption = "No" Then 147 | Legacy.Caption = "Yes" 148 | Else 149 | Legacy.Caption = "No" 150 | End If 151 | End Sub 152 | 153 | 154 | Private Sub scrFire_Change() 155 | 156 | lbFire.Caption = "Position: " & scrFire.Value 157 | End Sub 158 | -------------------------------------------------------------------------------- /frmNPCAdvanced.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmNPCAdvanced.frx -------------------------------------------------------------------------------- /frmNPCs.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmNPCs.frx -------------------------------------------------------------------------------- /frmNetStatus.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmNetStatus 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Netplay Status" 5 | ClientHeight = 3990 6 | ClientLeft = 45 7 | ClientTop = 375 8 | ClientWidth = 6165 9 | Icon = "frmNetStatus.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 3990 15 | ScaleWidth = 6165 16 | Begin VB.TextBox txtStatus 17 | Height = 3975 18 | Left = 0 19 | MultiLine = -1 'True 20 | ScrollBars = 2 'Vertical 21 | TabIndex = 0 22 | Top = 0 23 | Width = 6135 24 | End 25 | End 26 | Attribute VB_Name = "frmNetStatus" 27 | Attribute VB_GlobalNameSpace = False 28 | Attribute VB_Creatable = False 29 | Attribute VB_PredeclaredId = True 30 | Attribute VB_Exposed = False 31 | -------------------------------------------------------------------------------- /frmNetStatus.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmNetStatus.frx -------------------------------------------------------------------------------- /frmNetplay.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmNetplay.frx -------------------------------------------------------------------------------- /frmOpen.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmOpen 3 | BorderStyle = 3 'Fixed Dialog 4 | Caption = "Super Mario Bros. X - Open Level" 5 | ClientHeight = 4155 6 | ClientLeft = 45 7 | ClientTop = 330 8 | ClientWidth = 6960 9 | Icon = "frmOpen.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MinButton = 0 'False 13 | ScaleHeight = 4155 14 | ScaleWidth = 6960 15 | ShowInTaskbar = 0 'False 16 | StartUpPosition = 2 'CenterScreen 17 | Begin VB.CommandButton cmdCancel 18 | Caption = "Cancel" 19 | Height = 495 20 | Left = 5040 21 | TabIndex = 2 22 | Top = 3600 23 | Width = 1815 24 | End 25 | Begin VB.CommandButton cmdOpen 26 | Caption = "Open" 27 | Height = 495 28 | Left = 3120 29 | TabIndex = 1 30 | Top = 3600 31 | Width = 1815 32 | End 33 | Begin VB.DriveListBox Drive1 34 | Height = 315 35 | Left = 120 36 | TabIndex = 3 37 | Top = 120 38 | Width = 2895 39 | End 40 | Begin VB.DirListBox Dir1 41 | Height = 3465 42 | Left = 120 43 | TabIndex = 4 44 | Top = 480 45 | Width = 2895 46 | End 47 | Begin VB.FileListBox File1 48 | Height = 3405 49 | Left = 3120 50 | Pattern = "*.lvl" 51 | TabIndex = 0 52 | Top = 120 53 | Width = 3735 54 | End 55 | End 56 | Attribute VB_Name = "frmOpen" 57 | Attribute VB_GlobalNameSpace = False 58 | Attribute VB_Creatable = False 59 | Attribute VB_PredeclaredId = True 60 | Attribute VB_Exposed = False 61 | Option Explicit 62 | 63 | Private Sub cmdCancel_Click() 64 | Unload Me 65 | End Sub 66 | 67 | Private Sub cmdOpen_Click() 68 | OpenIt 69 | End Sub 70 | 71 | Private Sub Dir1_Change() 72 | File1.Path = Dir1.Path 73 | End Sub 74 | 75 | Private Sub Drive1_Change() 76 | Dir1.Path = Drive1.Drive 77 | End Sub 78 | 79 | Private Sub File1_DblClick() 80 | OpenIt 81 | End Sub 82 | 83 | Private Sub File1_KeyPress(KeyAscii As Integer) 84 | If KeyAscii = vbKeyReturn Then OpenIt 85 | End Sub 86 | 87 | Private Sub Form_Load() 88 | On Error GoTo Handler 89 | If WorldEditor = True Then 90 | File1.Pattern = "*.wld" 91 | End If 92 | Dir1.Path = Dir1.Path & "\worlds" 93 | If FileNamePath <> "" Then Dir1.Path = FileNamePath 94 | Exit Sub 95 | Handler: 96 | Dir1.Path = Dir1.Path 97 | If FileNamePath <> "" Then Dir1.Path = FileNamePath 98 | Exit Sub 99 | End Sub 100 | 101 | Private Sub Form_Unload(Cancel As Integer) 102 | frmLevelEditor.Enabled = True 103 | End Sub 104 | 105 | Private Sub OpenIt() 106 | If File1.ListIndex > 0 Then 107 | If WorldEditor = True Then 108 | frmLevelEditor.optCursor(14).Value = True 109 | OpenWorld File1.Path & "\" & File1.List(File1.ListIndex) 110 | Else 111 | frmLevelEditor.optCursor(13).Value = True 112 | ClearLevel 113 | OpenLevel File1.Path & "\" & File1.List(File1.ListIndex) 114 | End If 115 | Unload Me 116 | ElseIf File1.ListCount > 0 Then 117 | If WorldEditor = True Then 118 | frmLevelEditor.optCursor(6).Value = True 119 | OpenWorld File1.Path & "\" & File1.List(0) 120 | Else 121 | frmLevelEditor.optCursor(0).Value = True 122 | ClearLevel 123 | OpenLevel File1.Path & "\" & File1.List(0) 124 | End If 125 | Unload Me 126 | Else 127 | MsgBox "No level file was found in that directory.", vbOKOnly, "Sorry.", 0, 0 128 | End If 129 | End Sub 130 | -------------------------------------------------------------------------------- /frmOpen.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmOpen.frx -------------------------------------------------------------------------------- /frmPaths.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmPaths 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Paths" 5 | ClientHeight = 1350 6 | ClientLeft = 1.00050e5 7 | ClientTop = 330 8 | ClientWidth = 8580 9 | Icon = "frmPaths.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | ScaleHeight = 1350 14 | ScaleWidth = 8580 15 | Visible = 0 'False 16 | Begin VB.OptionButton WorldPath 17 | Height = 540 18 | Index = 32 19 | Left = 7920 20 | Picture = "frmPaths.frx":628A 21 | Style = 1 'Graphical 22 | TabIndex = 32 23 | Top = 120 24 | Width = 540 25 | End 26 | Begin VB.OptionButton WorldPath 27 | Height = 540 28 | Index = 31 29 | Left = 7920 30 | Picture = "frmPaths.frx":65F7 31 | Style = 1 'Graphical 32 | TabIndex = 31 33 | Top = 720 34 | Width = 540 35 | End 36 | Begin VB.OptionButton WorldPath 37 | Height = 540 38 | Index = 30 39 | Left = 6720 40 | Picture = "frmPaths.frx":696D 41 | Style = 1 'Graphical 42 | TabIndex = 30 43 | Top = 120 44 | Width = 540 45 | End 46 | Begin VB.OptionButton WorldPath 47 | Height = 540 48 | Index = 29 49 | Left = 6720 50 | Picture = "frmPaths.frx":6D05 51 | Style = 1 'Graphical 52 | TabIndex = 29 53 | Top = 720 54 | Width = 540 55 | End 56 | Begin VB.OptionButton WorldPath 57 | Height = 540 58 | Index = 28 59 | Left = 7320 60 | Picture = "frmPaths.frx":70A4 61 | Style = 1 'Graphical 62 | TabIndex = 28 63 | Top = 720 64 | Width = 540 65 | End 66 | Begin VB.OptionButton WorldPath 67 | Height = 540 68 | Index = 27 69 | Left = 7320 70 | Picture = "frmPaths.frx":7443 71 | Style = 1 'Graphical 72 | TabIndex = 27 73 | Top = 120 74 | Width = 540 75 | End 76 | Begin VB.OptionButton WorldPath 77 | Height = 540 78 | Index = 26 79 | Left = 6120 80 | Picture = "frmPaths.frx":77DB 81 | Style = 1 'Graphical 82 | TabIndex = 26 83 | Top = 720 84 | Width = 540 85 | End 86 | Begin VB.OptionButton WorldPath 87 | Height = 540 88 | Index = 25 89 | Left = 5520 90 | Picture = "frmPaths.frx":7BA9 91 | Style = 1 'Graphical 92 | TabIndex = 25 93 | Top = 120 94 | Width = 540 95 | End 96 | Begin VB.OptionButton WorldPath 97 | Height = 540 98 | Index = 24 99 | Left = 5520 100 | Picture = "frmPaths.frx":7F34 101 | Style = 1 'Graphical 102 | TabIndex = 24 103 | Top = 720 104 | Width = 540 105 | End 106 | Begin VB.OptionButton WorldPath 107 | Height = 540 108 | Index = 23 109 | Left = 4920 110 | Picture = "frmPaths.frx":82C3 111 | Style = 1 'Graphical 112 | TabIndex = 23 113 | Top = 120 114 | Width = 540 115 | End 116 | Begin VB.PictureBox FocusNinja 117 | Height = 375 118 | Left = 10080 119 | ScaleHeight = 315 120 | ScaleWidth = 315 121 | TabIndex = 0 122 | Top = 240 123 | Width = 375 124 | End 125 | Begin VB.OptionButton WorldPath 126 | Height = 540 127 | Index = 22 128 | Left = 6120 129 | Picture = "frmPaths.frx":8639 130 | Style = 1 'Graphical 131 | TabIndex = 22 132 | Top = 120 133 | Width = 540 134 | End 135 | Begin VB.OptionButton WorldPath 136 | Height = 540 137 | Index = 21 138 | Left = 4320 139 | Picture = "frmPaths.frx":89AB 140 | Style = 1 'Graphical 141 | TabIndex = 21 142 | Top = 720 143 | Width = 540 144 | End 145 | Begin VB.OptionButton WorldPath 146 | Height = 540 147 | Index = 20 148 | Left = 4920 149 | Picture = "frmPaths.frx":8D36 150 | Style = 1 'Graphical 151 | TabIndex = 20 152 | Top = 720 153 | Width = 540 154 | End 155 | Begin VB.OptionButton WorldPath 156 | Height = 540 157 | Index = 19 158 | Left = 3720 159 | Picture = "frmPaths.frx":90BF 160 | Style = 1 'Graphical 161 | TabIndex = 19 162 | Top = 720 163 | Width = 540 164 | End 165 | Begin VB.OptionButton WorldPath 166 | Height = 540 167 | Index = 18 168 | Left = 3720 169 | Picture = "frmPaths.frx":9D01 170 | Style = 1 'Graphical 171 | TabIndex = 18 172 | Top = 120 173 | Width = 540 174 | End 175 | Begin VB.OptionButton WorldPath 176 | Height = 540 177 | Index = 16 178 | Left = 720 179 | Picture = "frmPaths.frx":A943 180 | Style = 1 'Graphical 181 | TabIndex = 17 182 | Top = 6600 183 | Visible = 0 'False 184 | Width = 540 185 | End 186 | Begin VB.OptionButton WorldPath 187 | Height = 540 188 | Index = 15 189 | Left = 1320 190 | Picture = "frmPaths.frx":B585 191 | Style = 1 'Graphical 192 | TabIndex = 16 193 | Top = 6600 194 | Visible = 0 'False 195 | Width = 540 196 | End 197 | Begin VB.OptionButton WorldPath 198 | Height = 540 199 | Index = 14 200 | Left = 120 201 | Picture = "frmPaths.frx":C1C7 202 | Style = 1 'Graphical 203 | TabIndex = 15 204 | Top = 6600 205 | Visible = 0 'False 206 | Width = 540 207 | End 208 | Begin VB.OptionButton WorldPath 209 | Height = 540 210 | Index = 13 211 | Left = 120 212 | Picture = "frmPaths.frx":CE09 213 | Style = 1 'Graphical 214 | TabIndex = 14 215 | Top = 720 216 | Width = 540 217 | End 218 | Begin VB.OptionButton WorldPath 219 | Height = 540 220 | Index = 12 221 | Left = 720 222 | Picture = "frmPaths.frx":DA4B 223 | Style = 1 'Graphical 224 | TabIndex = 13 225 | Top = 720 226 | Width = 540 227 | End 228 | Begin VB.OptionButton WorldPath 229 | Height = 540 230 | Index = 11 231 | Left = 120 232 | Picture = "frmPaths.frx":E68D 233 | Style = 1 'Graphical 234 | TabIndex = 12 235 | Top = 120 236 | Width = 540 237 | End 238 | Begin VB.OptionButton WorldPath 239 | Height = 540 240 | Index = 10 241 | Left = 720 242 | Picture = "frmPaths.frx":F2CF 243 | Style = 1 'Graphical 244 | TabIndex = 11 245 | Top = 120 246 | Width = 540 247 | End 248 | Begin VB.OptionButton WorldPath 249 | Height = 540 250 | Index = 9 251 | Left = 1920 252 | Picture = "frmPaths.frx":FF11 253 | Style = 1 'Graphical 254 | TabIndex = 10 255 | Top = 120 256 | Width = 540 257 | End 258 | Begin VB.OptionButton WorldPath 259 | Height = 540 260 | Index = 8 261 | Left = 1320 262 | Picture = "frmPaths.frx":10B53 263 | Style = 1 'Graphical 264 | TabIndex = 9 265 | Top = 720 266 | Width = 540 267 | End 268 | Begin VB.OptionButton WorldPath 269 | Height = 540 270 | Index = 7 271 | Left = 1920 272 | Picture = "frmPaths.frx":11795 273 | Style = 1 'Graphical 274 | TabIndex = 8 275 | Top = 720 276 | Width = 540 277 | End 278 | Begin VB.OptionButton WorldPath 279 | Height = 540 280 | Index = 6 281 | Left = 1320 282 | Picture = "frmPaths.frx":123D7 283 | Style = 1 'Graphical 284 | TabIndex = 7 285 | Top = 120 286 | Width = 540 287 | End 288 | Begin VB.OptionButton WorldPath 289 | Height = 540 290 | Index = 5 291 | Left = 3120 292 | Picture = "frmPaths.frx":13019 293 | Style = 1 'Graphical 294 | TabIndex = 6 295 | Top = 120 296 | Width = 540 297 | End 298 | Begin VB.OptionButton WorldPath 299 | Height = 540 300 | Index = 17 301 | Left = 1920 302 | Picture = "frmPaths.frx":13C5B 303 | Style = 1 'Graphical 304 | TabIndex = 5 305 | Top = 6600 306 | Visible = 0 'False 307 | Width = 540 308 | End 309 | Begin VB.OptionButton WorldPath 310 | Height = 540 311 | Index = 4 312 | Left = 4320 313 | Picture = "frmPaths.frx":1489D 314 | Style = 1 'Graphical 315 | TabIndex = 4 316 | Top = 120 317 | Width = 540 318 | End 319 | Begin VB.OptionButton WorldPath 320 | Height = 540 321 | Index = 2 322 | Left = 2520 323 | Picture = "frmPaths.frx":154DF 324 | Style = 1 'Graphical 325 | TabIndex = 3 326 | Top = 720 327 | Value = -1 'True 328 | Width = 540 329 | End 330 | Begin VB.OptionButton WorldPath 331 | Height = 540 332 | Index = 3 333 | Left = 3120 334 | Picture = "frmPaths.frx":16121 335 | Style = 1 'Graphical 336 | TabIndex = 2 337 | Top = 720 338 | Width = 540 339 | End 340 | Begin VB.OptionButton WorldPath 341 | Height = 540 342 | Index = 1 343 | Left = 2520 344 | Picture = "frmPaths.frx":16D63 345 | Style = 1 'Graphical 346 | TabIndex = 1 347 | Top = 120 348 | Width = 540 349 | End 350 | End 351 | Attribute VB_Name = "frmPaths" 352 | Attribute VB_GlobalNameSpace = False 353 | Attribute VB_Creatable = False 354 | Attribute VB_PredeclaredId = True 355 | Attribute VB_Exposed = False 356 | Private Sub WorldPath_Click(Index As Integer) 357 | On Error Resume Next 358 | If Me.Visible = True Then FocusNinja.SetFocus 359 | End Sub 360 | -------------------------------------------------------------------------------- /frmPaths.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmPaths.frx -------------------------------------------------------------------------------- /frmSave.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmSave 3 | Caption = "Super Mario Bros. X - Save Level" 4 | ClientHeight = 4275 5 | ClientLeft = 60 6 | ClientTop = 345 7 | ClientWidth = 6975 8 | Icon = "frmSave.frx":0000 9 | LinkTopic = "Form1" 10 | ScaleHeight = 4275 11 | ScaleWidth = 6975 12 | StartUpPosition = 2 'CenterScreen 13 | Begin VB.TextBox txtFileName 14 | Height = 375 15 | Left = 3120 16 | TabIndex = 0 17 | Top = 3240 18 | Width = 3735 19 | End 20 | Begin VB.FileListBox File1 21 | Height = 3015 22 | Left = 3120 23 | Pattern = "*.lvl" 24 | TabIndex = 3 25 | Top = 120 26 | Width = 3735 27 | End 28 | Begin VB.DirListBox Dir1 29 | Height = 3690 30 | Left = 120 31 | TabIndex = 5 32 | Top = 480 33 | Width = 2895 34 | End 35 | Begin VB.DriveListBox Drive1 36 | Height = 315 37 | Left = 120 38 | TabIndex = 4 39 | Top = 120 40 | Width = 2895 41 | End 42 | Begin VB.CommandButton cmdSave 43 | Caption = "Save" 44 | Height = 495 45 | Left = 3120 46 | TabIndex = 1 47 | Top = 3720 48 | Width = 1815 49 | End 50 | Begin VB.CommandButton cmdCancel 51 | Caption = "Cancel" 52 | Height = 495 53 | Left = 5040 54 | TabIndex = 2 55 | Top = 3720 56 | Width = 1815 57 | End 58 | End 59 | Attribute VB_Name = "frmSave" 60 | Attribute VB_GlobalNameSpace = False 61 | Attribute VB_Creatable = False 62 | Attribute VB_PredeclaredId = True 63 | Attribute VB_Exposed = False 64 | Option Explicit 65 | 66 | Private Sub cmdCancel_Click() 67 | Unload Me 68 | End Sub 69 | 70 | Private Sub cmdSave_Click() 71 | SaveIt 72 | End Sub 73 | 74 | Private Sub Dir1_Change() 75 | File1.Path = Dir1.Path 76 | End Sub 77 | 78 | Private Sub Drive1_Change() 79 | On Error Resume Next 80 | Dir1.Path = Drive1.Drive 81 | End Sub 82 | 83 | Private Sub File1_Click() 84 | If File1.ListIndex >= 0 Then 85 | txtFilename.Text = File1.List(File1.ListIndex) 86 | Else 87 | End If 88 | End Sub 89 | 90 | Private Sub Form_Load() 91 | On Error Resume Next 92 | If WorldEditor = True Then 93 | File1.Pattern = "*.wld" 94 | End If 95 | If FileName <> "" Then txtFilename.Text = FileName 96 | Dir1.Path = Dir1.Path & "\worlds" 97 | If FileNamePath <> "" Then Dir1.Path = FileNamePath 98 | End Sub 99 | 100 | Private Sub Form_Unload(Cancel As Integer) 101 | frmLevelEditor.Enabled = True 102 | End Sub 103 | 104 | Private Sub txtFileName_KeyDown(KeyCode As Integer, Shift As Integer) 105 | If KeyCode = vbKeyReturn Then SaveIt 106 | End Sub 107 | 108 | Private Sub SaveIt() 109 | Dim tempName As String 110 | Dim A As Integer 111 | Dim tempChr As String 112 | Dim badChr As Boolean 113 | If txtFilename.Text = "" Then 114 | MsgBox "File name cannot be blank.", vbOKOnly, "Sorry.", 0, 0 115 | ElseIf Left(txtFilename.Text, 1) = " " Then 116 | MsgBox "No spaces in the front of the file name.", vbOKOnly, "Sorry.", 0, 0 117 | Else 118 | badChr = False 119 | For A = 1 To Len(txtFilename.Text) 120 | tempChr = Mid(txtFilename.Text, A, 1) 121 | If tempChr = "?" Or tempChr = "[" Or tempChr = "]" Or tempChr = "/" Or tempChr = "\" Or tempChr = "=" Or tempChr = "+" Or tempChr = "<" Or tempChr = ">" Or tempChr = ":" Or tempChr = ";" Or tempChr = "," Or tempChr = "*" Or tempChr = Chr(34) Then 122 | badChr = True 123 | Exit For 124 | End If 125 | Next A 126 | If badChr = True Then 127 | MsgBox "Illegal characters in file name.", vbOKOnly, "Sorry.", 0, 0 128 | Else 129 | If WorldEditor = True Then 130 | If Right(txtFilename.Text, 4) = ".wld" Then 131 | tempName = txtFilename.Text 132 | Else 133 | tempName = txtFilename.Text & ".wld" 134 | End If 135 | SaveWorld File1.Path & "\" & tempName 136 | Else 137 | If Right(txtFilename.Text, 4) = ".lvl" Then 138 | tempName = txtFilename.Text 139 | Else 140 | tempName = txtFilename.Text & ".lvl" 141 | End If 142 | SaveLevel File1.Path & "\" & tempName 143 | End If 144 | Unload Me 145 | End If 146 | End If 147 | End Sub 148 | -------------------------------------------------------------------------------- /frmSave.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmSave.frx -------------------------------------------------------------------------------- /frmScene.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmScene.frx -------------------------------------------------------------------------------- /frmSplash.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmSplash 3 | BackColor = &H80000007& 4 | BorderStyle = 0 'None 5 | Caption = "Super Mario Bros. X" 6 | ClientHeight = 4215 7 | ClientLeft = 0 8 | ClientTop = 0 9 | ClientWidth = 6840 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MinButton = 0 'False 13 | Picture = "frmSplash.frx":0000 14 | ScaleHeight = 281 15 | ScaleMode = 3 'Pixel 16 | ScaleWidth = 456 17 | ShowInTaskbar = 0 'False 18 | StartUpPosition = 2 'CenterScreen 19 | Begin VB.PictureBox LoadCoin 20 | AutoRedraw = -1 'True 21 | AutoSize = -1 'True 22 | BackColor = &H00000000& 23 | BorderStyle = 0 'None 24 | Height = 480 25 | Left = 6240 26 | Picture = "frmSplash.frx":2A7A 27 | ScaleHeight = 32 28 | ScaleMode = 3 'Pixel 29 | ScaleWidth = 28 30 | TabIndex = 0 31 | Top = 3600 32 | Visible = 0 'False 33 | Width = 420 34 | End 35 | Begin VB.Image Image1 36 | Height = 240 37 | Left = 4320 38 | Picture = "frmSplash.frx":2E8E 39 | Top = 3840 40 | Width = 1770 41 | End 42 | End 43 | Attribute VB_Name = "frmSplash" 44 | Attribute VB_GlobalNameSpace = False 45 | Attribute VB_Creatable = False 46 | Attribute VB_PredeclaredId = True 47 | Attribute VB_Exposed = False 48 | Private Sub Form_Load() 49 | Me.Refresh 50 | Me.Show 51 | DoEvents 52 | BitBlt GFX.BgHolder.hdc, 0, 0, LoadCoin.Width, LoadCoin.Height, Me.hdc, LoadCoin.Left, LoadCoin.Top, vbSrcCopy 53 | GFX.BgHolder.Refresh 54 | BitBlt LoadCoin.hdc, 0, 0, LoadCoin.Width, LoadCoin.Height, GFX.BgHolder.hdc, 0, 0, vbSrcCopy 55 | BitBlt frmSplash.LoadCoin.hdc, 0, 0, GFX.LoadCoin.ScaleWidth, 32, GFX.LoadCoinMask.hdc, 0, 32 * LoadCoins, vbSrcAnd 56 | BitBlt frmSplash.LoadCoin.hdc, 0, 0, GFX.LoadCoin.ScaleWidth, 32, GFX.LoadCoin.hdc, 0, 32 * LoadCoins, vbSrcPaint 57 | frmSplash.LoadCoin.Refresh 58 | LoadCoin.Visible = True 59 | LoadCoin.Refresh 60 | End Sub 61 | -------------------------------------------------------------------------------- /frmSplash.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmSplash.frx -------------------------------------------------------------------------------- /frmSprites.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmSprites 3 | Caption = "Sprites" 4 | ClientHeight = 13185 5 | ClientLeft = 120 6 | ClientTop = 450 7 | ClientWidth = 18525 8 | LinkTopic = "Form1" 9 | ScaleHeight = 13185 10 | ScaleWidth = 18525 11 | StartUpPosition = 3 'Windows Default 12 | Begin VB.PictureBox pic 13 | AutoRedraw = -1 'True 14 | BackColor = &H00000000& 15 | BorderStyle = 0 'None 16 | Height = 12975 17 | Left = 120 18 | ScaleHeight = 12975 19 | ScaleWidth = 18255 20 | TabIndex = 0 21 | Top = 120 22 | Width = 18255 23 | End 24 | End 25 | Attribute VB_Name = "frmSprites" 26 | Attribute VB_GlobalNameSpace = False 27 | Attribute VB_Creatable = False 28 | Attribute VB_PredeclaredId = True 29 | Attribute VB_Exposed = False 30 | Private Sub Form_Resize() 31 | pic.Top = 0 32 | pic.Left = 0 33 | pic.Width = Me.Width 34 | pic.Height = Me.Height 35 | End Sub 36 | -------------------------------------------------------------------------------- /frmTestSettings.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmTestSettings.frx -------------------------------------------------------------------------------- /frmTiles.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmTiles.frx -------------------------------------------------------------------------------- /frmWarp.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmWarp.frx -------------------------------------------------------------------------------- /frmWater.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmWater 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "Water" 5 | ClientHeight = 2055 6 | ClientLeft = 45 7 | ClientTop = 375 8 | ClientWidth = 1350 9 | Icon = "frmWater.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | MinButton = 0 'False 14 | ScaleHeight = 2055 15 | ScaleWidth = 1350 16 | Begin VB.Frame Frame2 17 | Caption = "Quicksand" 18 | Height = 615 19 | Left = 120 20 | TabIndex = 8 21 | Top = 1320 22 | Width = 1095 23 | Begin VB.CommandButton Quicksand 24 | Caption = "No" 25 | Height = 255 26 | Left = 120 27 | TabIndex = 9 28 | Top = 240 29 | Width = 855 30 | End 31 | End 32 | Begin VB.Frame Frame1 33 | Caption = "Buoyancy" 34 | Height = 855 35 | Left = 5520 36 | TabIndex = 4 37 | Top = 120 38 | Width = 1215 39 | Begin VB.HScrollBar scrBuoy 40 | Height = 255 41 | Left = 120 42 | Max = 200 43 | Min = 1 44 | TabIndex = 6 45 | Top = 480 46 | Value = 100 47 | Width = 975 48 | End 49 | Begin VB.Label lblBuoy 50 | Caption = "100%" 51 | Height = 255 52 | Left = 120 53 | TabIndex = 7 54 | Top = 240 55 | Width = 930 56 | End 57 | End 58 | Begin VB.Frame Frame 59 | Caption = "Water Size" 60 | Height = 1095 61 | Index = 33 62 | Left = 120 63 | TabIndex = 1 64 | Top = 120 65 | Width = 1095 66 | Begin VB.CommandButton WaterR 67 | Height = 255 68 | Left = 360 69 | TabIndex = 5 70 | Top = 480 71 | Width = 255 72 | End 73 | Begin VB.VScrollBar WaterH 74 | Height = 735 75 | Left = 360 76 | Max = 99 77 | Min = 1 78 | TabIndex = 3 79 | Top = 240 80 | Value = 1 81 | Width = 255 82 | End 83 | Begin VB.HScrollBar WaterW 84 | Height = 255 85 | Left = 120 86 | Max = 99 87 | Min = 1 88 | TabIndex = 2 89 | Top = 480 90 | Value = 1 91 | Width = 735 92 | End 93 | End 94 | Begin VB.PictureBox FocusNinja 95 | Height = 375 96 | Left = 3480 97 | ScaleHeight = 315 98 | ScaleWidth = 315 99 | TabIndex = 0 100 | Top = 1440 101 | Width = 375 102 | End 103 | End 104 | Attribute VB_Name = "frmWater" 105 | Attribute VB_GlobalNameSpace = False 106 | Attribute VB_Creatable = False 107 | Attribute VB_PredeclaredId = True 108 | Attribute VB_Exposed = False 109 | 110 | Private Sub Quicksand_Click() 111 | On Error Resume Next 112 | If Me.Visible = True Then FocusNinja.SetFocus 113 | If QuickSand.Caption = "No" Then 114 | QuickSand.Caption = "Yes" 115 | Else 116 | QuickSand.Caption = "No" 117 | End If 118 | End Sub 119 | 120 | Private Sub WaterH_Change() 121 | On Error Resume Next 122 | If Me.Visible = True Then FocusNinja.SetFocus 123 | End Sub 124 | 125 | Private Sub WaterR_Click() 126 | On Error Resume Next 127 | If Me.Visible = True Then FocusNinja.SetFocus 128 | WaterH.Value = 2 129 | WaterW.Value = 2 130 | End Sub 131 | 132 | Private Sub WaterW_Change() 133 | On Error Resume Next 134 | If Me.Visible = True Then FocusNinja.SetFocus 135 | End Sub 136 | -------------------------------------------------------------------------------- /frmWater.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmWater.frx -------------------------------------------------------------------------------- /frmWorld.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form frmWorld 3 | BorderStyle = 1 'Fixed Single 4 | Caption = "World Options" 5 | ClientHeight = 3225 6 | ClientLeft = 45 7 | ClientTop = 330 8 | ClientWidth = 6225 9 | Icon = "frmWorld.frx":0000 10 | LinkTopic = "Form1" 11 | MaxButton = 0 'False 12 | MDIChild = -1 'True 13 | ScaleHeight = 3225 14 | ScaleWidth = 6225 15 | Begin VB.Frame Frame3 16 | Caption = "Block Characters" 17 | Height = 855 18 | Left = 1800 19 | TabIndex = 15 20 | Top = 2280 21 | Width = 2655 22 | Begin VB.CheckBox chkChar 23 | Caption = "Link" 24 | Height = 255 25 | Index = 5 26 | Left = 1920 27 | TabIndex = 20 28 | Top = 240 29 | Width = 615 30 | End 31 | Begin VB.CheckBox chkChar 32 | Caption = "Toad" 33 | Height = 255 34 | Index = 4 35 | Left = 1080 36 | TabIndex = 19 37 | Top = 480 38 | Width = 735 39 | End 40 | Begin VB.CheckBox chkChar 41 | Caption = "Peach" 42 | Height = 255 43 | Index = 3 44 | Left = 1080 45 | TabIndex = 18 46 | Top = 240 47 | Width = 855 48 | End 49 | Begin VB.CheckBox chkChar 50 | Caption = "Luigi" 51 | Height = 255 52 | Index = 2 53 | Left = 120 54 | TabIndex = 17 55 | Top = 480 56 | Width = 735 57 | End 58 | Begin VB.CheckBox chkChar 59 | Caption = "Mario" 60 | Height = 255 61 | Index = 1 62 | Left = 120 63 | TabIndex = 16 64 | Top = 240 65 | Width = 735 66 | End 67 | End 68 | Begin VB.Frame Frame2 69 | Caption = "Number of Stars" 70 | Height = 615 71 | Left = 120 72 | TabIndex = 13 73 | Top = 2280 74 | Width = 1575 75 | Begin VB.TextBox txtStars 76 | Height = 285 77 | Left = 120 78 | TabIndex = 14 79 | Top = 240 80 | Width = 1335 81 | End 82 | End 83 | Begin VB.Frame Frame1 84 | Caption = "Credits" 85 | Height = 2055 86 | Left = 3480 87 | TabIndex = 7 88 | Top = 120 89 | Width = 2655 90 | Begin VB.TextBox txtCredits 91 | Height = 285 92 | Index = 5 93 | Left = 120 94 | TabIndex = 12 95 | Top = 1680 96 | Width = 2415 97 | End 98 | Begin VB.TextBox txtCredits 99 | Height = 285 100 | Index = 4 101 | Left = 120 102 | TabIndex = 11 103 | Top = 1320 104 | Width = 2415 105 | End 106 | Begin VB.TextBox txtCredits 107 | Height = 285 108 | Index = 3 109 | Left = 120 110 | TabIndex = 10 111 | Top = 960 112 | Width = 2415 113 | End 114 | Begin VB.TextBox txtCredits 115 | Height = 285 116 | Index = 2 117 | Left = 120 118 | TabIndex = 9 119 | Top = 600 120 | Width = 2415 121 | End 122 | Begin VB.TextBox txtCredits 123 | Height = 285 124 | Index = 1 125 | Left = 120 126 | TabIndex = 8 127 | Top = 240 128 | Width = 2415 129 | End 130 | End 131 | Begin VB.PictureBox FocusNinja 132 | Height = 375 133 | Left = 3240 134 | ScaleHeight = 315 135 | ScaleWidth = 315 136 | TabIndex = 6 137 | Top = 4080 138 | Width = 375 139 | End 140 | Begin VB.Frame Frame 141 | Caption = "Auto Start Level" 142 | Height = 1335 143 | Index = 1 144 | Left = 120 145 | TabIndex = 2 146 | Top = 840 147 | Width = 3255 148 | Begin VB.CheckBox chkRestartLevel 149 | Caption = "Restart Last Level on Death" 150 | Height = 255 151 | Left = 120 152 | TabIndex = 5 153 | Top = 960 154 | Width = 2295 155 | End 156 | Begin VB.CheckBox chkNoMap 157 | Caption = "No World Map" 158 | Height = 255 159 | Left = 120 160 | TabIndex = 4 161 | Top = 600 162 | Width = 1455 163 | End 164 | Begin VB.TextBox txtStartLevel 165 | Height = 285 166 | Left = 120 167 | TabIndex = 3 168 | Top = 240 169 | Width = 3015 170 | End 171 | End 172 | Begin VB.Frame Frame 173 | Caption = "World Name" 174 | Height = 615 175 | Index = 0 176 | Left = 120 177 | TabIndex = 0 178 | Top = 120 179 | Width = 3255 180 | Begin VB.TextBox txtWorldName 181 | Height = 285 182 | Left = 120 183 | TabIndex = 1 184 | Top = 240 185 | Width = 3015 186 | End 187 | End 188 | End 189 | Attribute VB_Name = "frmWorld" 190 | Attribute VB_GlobalNameSpace = False 191 | Attribute VB_Creatable = False 192 | Attribute VB_PredeclaredId = True 193 | Attribute VB_Exposed = False 194 | Private Sub chkChar_Click(Index As Integer) 195 | Dim A As Integer 196 | Dim B As Integer 197 | If chkChar(Index).Value = 1 Then 198 | blockCharacter(Index) = True 199 | Else 200 | blockCharacter(Index) = False 201 | End If 202 | For A = 1 To numCharacters 203 | If blockCharacter(A) = False Then B = B + 1 204 | Next A 205 | If B <= 0 Then 206 | blockCharacter(Index) = False 207 | chkChar(Index).Value = 0 208 | End If 209 | End Sub 210 | 211 | Private Sub Form_Unload(Cancel As Integer) 212 | Cancel = 1 213 | Me.Hide 214 | End Sub 215 | 216 | Private Sub txtStars_Change() 217 | txtStars.Text = Int(Val(txtStars.Text)) 218 | MaxWorldStars = Int(Val(txtStars.Text)) 219 | End Sub 220 | -------------------------------------------------------------------------------- /frmWorld.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smbx/smbx-legacy-source/4a7ff946da8924d2268f6ee8d824034f3a7d7658/frmWorld.frx -------------------------------------------------------------------------------- /modBonus.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "modBonus" 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /modChangeRes.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "modChangeRes" 2 | Option Explicit 3 | 'Thanks to KPD-Team 4 | 'For the API and variables in this module 5 | 'Visit them at http://www.allapi.net/ 6 | '=========================================================== 7 | 'I take no responsibilty if this code wrecks your computer. 8 | 'Use this code at your own risk! 9 | '=========================================================== 10 | 'Version 1.3 11 | 'By Brendon Pilt 12 | '=========================================================== 13 | 'Note: 14 | 'Form should be maximised so that it fills the whole screen 15 | 'when loaded 16 | '=========================================================== 17 | 'Note: 18 | 'Color quality and screen resolution can only be changed 19 | 'if it is supported by the Graphics Card\Operating System. 20 | '=========================================================== 21 | Const ENUM_CURRENT_SETTINGS As Long = -1& 'Get current settings 22 | Const DM_PELSWIDTH = &H80000 'Pixels in width 23 | Const DM_PELSHEIGHT = &H100000 'Pixels in height 24 | Const DM_BITSPERPEL = &H40000 'Color Depth 25 | Const DM_DISPFREQ = &H400000 'Display Frequency 26 | Const CDS_TEST = &H4 27 | Private Type DEVMODE 28 | dmDeviceName As String * 32 'Name of graphics card????? 29 | dmSpecVersion As Integer 30 | dmDriverVersion As Integer 'graphics card driver version????? 31 | dmSize As Integer 32 | dmDriverExtra As Integer 33 | dmFields As Long 34 | dmOrientation As Integer 35 | dmPaperSize As Integer 36 | dmPaperLength As Integer 37 | dmPaperWidth As Integer 38 | dmScale As Integer 39 | dmCopies As Integer 40 | dmDefaultSource As Integer 41 | dmPrintQuality As Integer 42 | dmColor As Integer 43 | dmDuplex As Integer 44 | dmYResolution As Integer 45 | dmTTOption As Integer 46 | dmCollate As Integer 47 | dmFormName As String * 32 'Name of form????? 48 | dmUnusedPadding As Integer 49 | dmBitsPerPel As Integer 'Color Quality (can be 8, 16, 24, 32 or even 4) 50 | dmPelsWidth As Long 'Display Width in pixels 51 | dmPelsHeight As Long 'Display height in pixels 52 | dmDisplayFlags As Long 53 | dmDisplayFrequency As Long 'Display frequency 54 | dmICMMethod As Long 'NT 4.0 55 | dmICMIntent As Long 'NT 4.0 56 | dmMediaType As Long 'NT 4.0 57 | dmDitherType As Long 'NT 4.0 58 | dmReserved1 As Long 'NT 4.0 59 | dmReserved2 As Long 'NT 4.0 60 | dmPanningWidth As Long 'Win2000 61 | dmPanningHeight As Long 'Win2000 62 | End Type 63 | 64 | Private Declare Function ChangeDisplaySettingsEx Lib "user32" Alias "ChangeDisplaySettingsExA" (lpszDeviceName As Any, lpDevMode As Any, ByVal hWnd As Long, ByVal dwFlags As Long, lParam As Any) As Long 65 | Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" (ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As Boolean 66 | 67 | Dim DevM As DEVMODE 68 | Dim OldX As Integer, OldY As Integer, OldColor As Integer, OldFreq As Integer 69 | Dim SetX As Integer, SetY As Integer, SetColor As Integer, SetFreq As Integer 70 | 71 | Public Sub GetCurrentRes() 72 | '======================================================= 73 | 'Call this sub in Form_Load 74 | '======================================================= 75 | 76 | 'Save original (current) resolution 77 | EnumDisplaySettings 0&, ENUM_CURRENT_SETTINGS, DevM 'Get current setting 78 | OldX = DevM.dmPelsWidth 'or OldX = Screen.Width / Screen.TwipsPerPixelX 79 | OldY = DevM.dmPelsHeight 'or OldY = Screen.Height / Screen.TwipsPerPixelY 80 | OldColor = DevM.dmBitsPerPel 81 | OldFreq = DevM.dmDisplayFrequency 82 | 'Apply new resolution 83 | ChangeRes 800, 600, 16, 60 84 | End Sub 85 | 86 | Public Sub SetOrigRes() 87 | '======================================================= 88 | 'Call this sub in Form_Unload 89 | '======================================================= 90 | 91 | 'Change the display settings back to the old settings 92 | ChangeRes OldX, OldY, OldColor, OldFreq 93 | Do 94 | Loop Until ShowCursor(1) >= 1 95 | resChanged = False 96 | End Sub 97 | 98 | Public Sub ChangeRes(ScreenX As Integer, ScreenY As Integer, ScreenColor As Integer, ScreenFreq As Integer) 99 | '======================================================= 100 | 'ChangeRes sub format (can be set at runtime): 101 | 'Insert a zero if you don't want to change an aspect 102 | 'eg: 103 | 'ChangeRes 800, 600, 16, 60 '800x600 pixels, 16 bit Color, 60Hz 104 | 'ChangeRes 800, 600, 16, 0 '800x600 pixels, 16 bit Color 105 | 'ChangeRes 800, 600, 0, 60 '800x600 pixels, 60Hz 106 | 'ChangeRes 0, 0, 16, 60 '16 bit Color, 60Hz 107 | 'ChangeRes 0, 0, 16, 0 '16 bit Color 108 | 'ChangeRes 800, 600, 0, 0 '800x600 pixels 109 | 'ChangeRes 0, 0, 0, 60 '60Hz 110 | '======================================================= 111 | 112 | '======================================================= 113 | 'The "EndIf" statement is used because if a "0" is used 114 | 'in the API call, the API considers it as an aspect that 115 | 'does not need to be changed, but is the current system 116 | 'setting. 117 | 'eg: 118 | 'ChangeRes 0, 0, 0, 0 = The current system setting 119 | 'ChangeRes 0, 0, 16, 0 = The current resolution and display frequency setting, with new color quality 120 | '======================================================= 121 | 122 | 'Get selected resolution 123 | If ScreenX <> 0 And ScreenY <> 0 And ScreenColor = 0 And ScreenFreq = 0 Then 124 | DevM.dmPelsWidth = ScreenX 'Screen width 125 | DevM.dmPelsHeight = ScreenY 'Screen height 126 | DevM.dmBitsPerPel = SetColor 'Screen color quality 127 | DevM.dmDisplayFrequency = SetFreq 'Screen display frequency 128 | 'SetX = ScreenX 129 | 'SetY = ScreenY 130 | SaveIt ScreenX, ScreenY, ScreenColor, ScreenFreq, "ChangeResol" 131 | 'DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT 132 | ElseIf ScreenX = 0 And ScreenY = 0 And ScreenColor <> 0 And ScreenFreq = 0 Then 133 | DevM.dmPelsWidth = SetX 'Screen width 134 | DevM.dmPelsHeight = SetY 'Screen height 135 | DevM.dmBitsPerPel = ScreenColor 'Screen color quality 136 | DevM.dmDisplayFrequency = SetFreq 'Screen display frequency 137 | 'SetColor = ScreenColor 138 | SaveIt ScreenX, ScreenY, ScreenColor, ScreenFreq, "ChangeColor" 139 | 'DevM.dmFields = DM_BITSPERPEL 140 | ElseIf ScreenX = 0 And ScreenY = 0 And ScreenColor = 0 And ScreenFreq <> 0 Then 141 | DevM.dmPelsWidth = SetX 'Screen width 142 | DevM.dmPelsHeight = SetY 'Screen height 143 | DevM.dmBitsPerPel = SetColor 'Screen color quality 144 | DevM.dmDisplayFrequency = ScreenFreq 'Screen display frequency 145 | 'SetFreq = ScreenFreq 146 | SaveIt ScreenX, ScreenY, ScreenColor, ScreenFreq, "ChangeFreq" 147 | 'DevM.dmFields = DM_DISPFREQ 148 | ElseIf ScreenX <> 0 And ScreenY <> 0 And ScreenColor <> 0 And ScreenFreq <> 0 Then 149 | DevM.dmPelsWidth = ScreenX 'Screen width 150 | DevM.dmPelsHeight = ScreenY 'Screen height 151 | DevM.dmBitsPerPel = ScreenColor 'Screen color quality 152 | DevM.dmDisplayFrequency = ScreenFreq 'Screen display frequency 153 | SaveIt ScreenX, ScreenY, ScreenColor, ScreenFreq, "ChangeAll" 154 | 'DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT Or DM_BITSPERPEL Or DM_DISPFREQ 155 | ElseIf ScreenX = 0 And ScreenY = 0 And ScreenColor = 0 And ScreenFreq = 0 Then 156 | Exit Sub 157 | End If 158 | 'we want to change the horizontal and the vertical 159 | 'resolution, the color quality, and the display 160 | 'frequency (screen refresh rate) 161 | DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT Or DM_BITSPERPEL Or DM_DISPFREQ 162 | 'change the display settings 163 | Call ChangeDisplaySettingsEx(ByVal 0&, DevM, ByVal 0&, CDS_TEST, ByVal 0&) 164 | End Sub 165 | 166 | Private Sub SaveIt(ScX As Integer, ScY As Integer, ScC As Integer, ScF As Integer, ScreenChanged As String) 167 | Select Case ScreenChanged 168 | Case "ChangeResol" 169 | SetX = ScX 'Screen width 170 | SetY = ScY 'Screen height 171 | Case "ChangeColor" 172 | SetColor = ScC 'Screen color quality 173 | Case "ChangeFreq" 174 | SetFreq = ScF 'Screen display frequency 175 | Case "ChangeAll" 176 | SetX = ScX 'Screen width 177 | SetY = ScY 'Screen height 178 | SetColor = ScC 'Screen color quality 179 | SetFreq = ScF 'Screen display frequency 180 | End Select 181 | End Sub 182 | 183 | '=========================================================== 184 | 'Example of code for form: 185 | 'Private Sub cmdChange_Click(Index As Integer) 186 | ' Select Case Index 187 | ' Case 0 188 | ' '1024x768x16x60 189 | ' ChangeRes 1024, 768, 0, 0 190 | ' Case 1 191 | ' '800x600x32x85 192 | ' ChangeRes 800, 600, 32, 85 193 | ' Case 2 194 | ' '800x600x16x85 195 | ' ChangeRes 0, 0, 16, 0 196 | ' Case 3 197 | ' '800x600x16x60 198 | ' ChangeRes 0, 0, 0, 60 199 | ' End Select 200 | 'End Sub 201 | ' 202 | 'Private Sub Form_Load() 203 | ' GetCurrentRes 204 | 'End Sub 205 | ' 206 | 'Private Sub Form_Unload(Cancel As Integer) 207 | ' SetOrigRes 208 | 'End Sub 209 | '=========================================================== 210 | 211 | 212 | 'Common Screen Resoulutions: 213 | '===============' 214 | 'Width Height ' 215 | '===============' 216 | '640 480 ' 217 | '800 600 ' 218 | '1024 768 ' 219 | '1280 1024 ' 220 | '1600 1200 ' 221 | '===============' 222 | ' 223 | 'Common Color Qualities: 224 | '===============================================================' 225 | 'Bits # colors Common Name 226 | '===============================================================' 227 | '4 16 16 Colors ' 228 | '8 256 256 Colors ' 229 | '16 65,536 High Color (16-Bit) ' 230 | '24 16,777,216 True Color (24-bit) ' 231 | '32 4,294,967,296 True Color (32-Bit/24bit + 8bit Alpha) ' 232 | '===============================================================' 233 | -------------------------------------------------------------------------------- /modCollision.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "modCollision" 2 | Option Explicit 3 | 4 | Public Function CheckCollision(Loc1 As Location, Loc2 As Location) As Boolean 'Normal collisions 5 | If Loc1.Y + Loc1.Height >= Loc2.Y Then 6 | If Loc1.Y <= Loc2.Y + Loc2.Height Then 7 | If Loc1.X <= Loc2.X + Loc2.Width Then 8 | If Loc1.X + Loc1.Width >= Loc2.X Then 9 | CheckCollision = True 10 | End If 11 | End If 12 | End If 13 | End If 14 | End Function 15 | 16 | Public Function n00bCollision(Loc1 As Location, Loc2 As Location) As Boolean 'Make the game easier for the people who whine about the detection being 'off' 17 | Dim EZ As Single 18 | EZ = 2 19 | If Loc2.Width >= 32 - EZ * 2 And Loc2.Height >= 32 - EZ * 2 Then 20 | If Loc1.Y + Loc1.Height - EZ >= Loc2.Y Then 21 | If Loc1.Y + EZ <= Loc2.Y + Loc2.Height Then 22 | If Loc1.X + EZ <= Loc2.X + Loc2.Width Then 23 | If Loc1.X + Loc1.Width - EZ >= Loc2.X Then 24 | n00bCollision = True 25 | End If 26 | End If 27 | End If 28 | End If 29 | Else 30 | If Loc1.Y + Loc1.Height >= Loc2.Y Then 31 | If Loc1.Y <= Loc2.Y + Loc2.Height Then 32 | If Loc1.X <= Loc2.X + Loc2.Width Then 33 | If Loc1.X + Loc1.Width >= Loc2.X Then 34 | n00bCollision = True 35 | End If 36 | End If 37 | End If 38 | End If 39 | End If 40 | End Function 41 | 42 | Public Function NPCStartCollision(Loc1 As Location, Loc2 As Location) As Boolean 'Used when a NPC is activated to see if it should spawn 43 | If Loc1.X < Loc2.X + Loc2.Width Then 44 | If Loc1.X + Loc1.Width > Loc2.X Then 45 | If Loc1.Y < Loc2.Y + Loc2.Height Then 46 | If Loc1.Y + Loc1.Height > Loc2.Y Then 47 | NPCStartCollision = True 48 | End If 49 | End If 50 | End If 51 | End If 52 | End Function 53 | Public Function WarpCollision(Loc1 As Location, A As Integer) As Boolean 'Warp point collisions 54 | Dim X2 As Single 55 | Dim Y2 As Single 56 | With Warp(A) 57 | If .Direction = 3 Then 58 | X2 = 0 59 | Y2 = 32 60 | ElseIf .Direction = 1 Then 61 | X2 = 0 62 | Y2 = -30 63 | ElseIf .Direction = 2 Then 64 | X2 = -31 65 | Y2 = 32 66 | ElseIf .Direction = 4 Then 67 | X2 = 31 68 | Y2 = 32 69 | End If 70 | If Loc1.X <= .Entrance.X + .Entrance.Width + X2 Then 71 | If Loc1.X + Loc1.Width >= .Entrance.X + X2 Then 72 | If Loc1.Y <= .Entrance.Y + .Entrance.Height + Y2 Then 73 | If Loc1.Y + Loc1.Height >= .Entrance.Y + Y2 Then 74 | WarpCollision = True 75 | End If 76 | End If 77 | End If 78 | End If 79 | End With 80 | End Function 81 | 82 | Public Function FindCollision(Loc1 As Location, Loc2 As Location) As Integer 'Whats side the collision happened 83 | If Loc1.Y + Loc1.Height - Loc1.SpeedY <= Loc2.Y - Loc2.SpeedY Then 84 | FindCollision = 1 85 | ElseIf Loc1.X - Loc1.SpeedX >= Loc2.X + Loc2.Width - Loc2.SpeedX Then FindCollision = 2 86 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X - Loc2.SpeedX Then FindCollision = 4 87 | ElseIf Loc1.Y - Loc1.SpeedY > Loc2.Y + Loc2.Height - Loc2.SpeedY - 0.1 Then FindCollision = 3 88 | Else 89 | FindCollision = 5 90 | End If 91 | End Function 92 | 93 | Public Function FindCollisionBelt(Loc1 As Location, Loc2 As Location, BeltSpeed As Single) As Integer 'Whats side the collision happened for belts 94 | If Loc1.Y + Loc1.Height - Loc1.SpeedY <= Loc2.Y - Loc2.SpeedY Then 95 | FindCollisionBelt = 1 96 | ElseIf Loc1.X - Loc1.SpeedX - BeltSpeed >= Loc2.X + Loc2.Width - Loc2.SpeedX Then FindCollisionBelt = 2 97 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X - Loc2.SpeedX Then FindCollisionBelt = 4 98 | ElseIf Loc1.Y - Loc1.SpeedY - BeltSpeed > Loc2.Y + Loc2.Height - Loc2.SpeedY - 0.1 Then FindCollisionBelt = 3 99 | Else 100 | FindCollisionBelt = 5 101 | End If 102 | End Function 103 | 104 | Public Function NPCFindCollision(Loc1 As Location, Loc2 As Location) As Integer 'Whats side the collision happened for NPCs 105 | If Loc1.Y + Loc1.Height - Loc1.SpeedY <= Loc2.Y - Loc2.SpeedY + 4 Then 106 | NPCFindCollision = 1 107 | ElseIf Loc1.X - Loc1.SpeedX >= Loc2.X + Loc2.Width - Loc2.SpeedX Then NPCFindCollision = 2 108 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X - Loc2.SpeedX Then NPCFindCollision = 4 109 | ElseIf Loc1.Y - Loc1.SpeedY > Loc2.Y + Loc2.Height - Loc2.SpeedY - 0.1 Then NPCFindCollision = 3 110 | Else 111 | NPCFindCollision = 5 112 | End If 113 | End Function 114 | 115 | Public Function EasyModeCollision(Loc1 As Location, Loc2 As Location, Optional StandOn As Boolean = False) As Integer 'Easy mode collision for jumping on NPCs 116 | If FreezeNPCs = False Then 117 | If Loc1.Y + Loc1.Height - Loc1.SpeedY <= Loc2.Y - Loc2.SpeedY + 10 Then 118 | If (Loc1.SpeedY > Loc2.SpeedY Or StandOn = True) Then 119 | EasyModeCollision = 1 120 | Else 121 | EasyModeCollision = 0 122 | End If 123 | ElseIf Loc1.X - Loc1.SpeedX >= Loc2.X + Loc2.Width - Loc2.SpeedX Then EasyModeCollision = 2 124 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X - Loc2.SpeedX Then EasyModeCollision = 4 125 | ElseIf Loc1.Y - Loc1.SpeedY >= Loc2.Y + Loc2.Height - Loc2.SpeedY Then EasyModeCollision = 3 126 | Else 127 | EasyModeCollision = 5 128 | End If 129 | Else 130 | If Loc1.Y + Loc1.Height - Loc1.SpeedY <= Loc2.Y + 10 Then 131 | EasyModeCollision = 1 132 | ElseIf Loc1.X - Loc1.SpeedX >= Loc2.X + Loc2.Width Then EasyModeCollision = 2 133 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X Then EasyModeCollision = 4 134 | ElseIf Loc1.Y - Loc1.SpeedY >= Loc2.Y + Loc2.Height Then EasyModeCollision = 3 135 | Else 136 | EasyModeCollision = 5 137 | End If 138 | End If 139 | End Function 140 | 141 | Public Function BootCollision(Loc1 As Location, Loc2 As Location, Optional StandOn As Boolean = False) As Integer 'Easy mode collision for jumping on NPCs while on yoshi/boot 142 | If FreezeNPCs = False Then 143 | If Loc1.Y + Loc1.Height - Loc1.SpeedY <= Loc2.Y - Loc2.SpeedY + 16 Then 144 | If (Loc1.SpeedY > Loc2.SpeedY Or StandOn = True) Then 145 | BootCollision = 1 146 | Else 147 | BootCollision = 0 148 | End If 149 | ElseIf Loc1.X - Loc1.SpeedX >= Loc2.X + Loc2.Width - Loc2.SpeedX Then BootCollision = 2 150 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X - Loc2.SpeedX Then BootCollision = 4 151 | ElseIf Loc1.Y - Loc1.SpeedY >= Loc2.Y + Loc2.Height - Loc2.SpeedY Then BootCollision = 3 152 | Else 153 | BootCollision = 5 154 | End If 155 | Else 156 | If Loc1.Y + Loc1.Height - Loc1.SpeedY <= Loc2.Y + 16 Then 157 | BootCollision = 1 158 | ElseIf Loc1.X - Loc1.SpeedX >= Loc2.X + Loc2.Width Then BootCollision = 2 159 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X Then BootCollision = 4 160 | ElseIf Loc1.Y - Loc1.SpeedY >= Loc2.Y + Loc2.Height Then BootCollision = 3 161 | Else 162 | BootCollision = 5 163 | End If 164 | End If 165 | End Function 166 | 167 | Public Function CursorCollision(Loc1 As Location, Loc2 As Location) As Boolean 'Cursor collision 168 | If Loc1.X <= Loc2.X + Loc2.Width - 1 Then 169 | If Loc1.X + Loc1.Width >= Loc2.X + 1 Then 170 | If Loc1.Y <= Loc2.Y + Loc2.Height - 1 Then 171 | If Loc1.Y + Loc1.Height >= Loc2.Y + 1 Then 172 | CursorCollision = True 173 | End If 174 | End If 175 | End If 176 | End If 177 | End Function 178 | 179 | Public Function ShakeCollision(Loc1 As Location, Loc2 As Location, ShakeY3 As Integer) As Boolean 'Shakey block collision 180 | If Loc1.X + 1 <= Loc2.X + Loc2.Width Then 181 | If Loc1.X + Loc1.Width - 1 >= Loc2.X Then 182 | If Loc1.Y <= Loc2.Y + Loc2.Height + ShakeY3 Then 183 | If Loc1.Y + Loc1.Height >= Loc2.Y + ShakeY3 Then 184 | ShakeCollision = True 185 | End If 186 | End If 187 | End If 188 | End If 189 | End Function 190 | 191 | Public Function vScreenCollision(A As Integer, Loc2 As Location) As Boolean 'vScreen collisions 192 | If A = 0 Then 193 | vScreenCollision = True 194 | Exit Function 195 | End If 196 | If -vScreenX(A) <= Loc2.X + Loc2.Width Then 197 | If -vScreenX(A) + vScreen(A).Width >= Loc2.X Then 198 | If -vScreenY(A) <= Loc2.Y + Loc2.Height Then 199 | If -vScreenY(A) + vScreen(A).Height >= Loc2.Y Then 200 | vScreenCollision = True 201 | End If 202 | End If 203 | End If 204 | End If 205 | End Function 206 | 207 | Public Function vScreenCollision2(A As Integer, Loc2 As Location) As Boolean 'vScreen collisions 2 208 | If -vScreenX(A) + 64 <= Loc2.X + Loc2.Width Then 209 | If -vScreenX(A) + vScreen(A).Width - 64 >= Loc2.X Then 210 | If -vScreenY(A) + 96 <= Loc2.Y + Loc2.Height Then 211 | If -vScreenY(A) + vScreen(A).Height - 64 >= Loc2.Y Then 212 | vScreenCollision2 = True 213 | End If 214 | End If 215 | End If 216 | End If 217 | End Function 218 | 219 | Public Function WalkingCollision(Loc1 As Location, Loc2 As Location) As Boolean 'Collision detection for blocks. Prevents walking on walls. 220 | If Loc1.X <= Loc2.X + Loc2.Width + Loc1.SpeedX Then 221 | If Loc1.X + Loc1.Width >= Loc2.X + Loc1.SpeedX Then 222 | WalkingCollision = True 223 | End If 224 | End If 225 | End Function 226 | 227 | Public Function WalkingCollision2(Loc1 As Location, Loc2 As Location) As Boolean 'Collision detection for blocks. Lets NPCs fall through cracks. 228 | If Loc1.X <= Loc2.X + Loc2.Width - Loc1.SpeedX - 1 Then 229 | If Loc1.X + Loc1.Width >= Loc2.X - Loc1.SpeedX + 1 Then 230 | WalkingCollision2 = True 231 | End If 232 | End If 233 | End Function 234 | 235 | Public Function WalkingCollision3(Loc1 As Location, Loc2 As Location, BeltSpeed As Single) As Boolean 'Factors in beltspeed 236 | If Loc1.X <= Loc2.X + Loc2.Width - (Loc1.SpeedX + BeltSpeed) - 1 Then 237 | If Loc1.X + Loc1.Width >= Loc2.X - (Loc1.SpeedX + BeltSpeed) + 1 Then 238 | WalkingCollision3 = True 239 | End If 240 | End If 241 | End Function 242 | 243 | 244 | Public Function FindRunningCollision(Loc1 As Location, Loc2 As Location) As Integer 'Helps the player to walk over 1 unit cracks 245 | If Loc1.Y + Loc1.Height - Loc1.SpeedY - 2.5 <= Loc2.Y - Loc2.SpeedY Then 246 | FindRunningCollision = 1 247 | ElseIf Loc1.X - Loc1.SpeedX >= Loc2.X + Loc2.Width - Loc2.SpeedX Then FindRunningCollision = 2 248 | ElseIf Loc1.X + Loc1.Width - Loc1.SpeedX <= Loc2.X - Loc2.SpeedX Then FindRunningCollision = 4 249 | ElseIf Loc1.Y - Loc1.SpeedY >= Loc2.Y + Loc2.Height - Loc2.SpeedY Then FindRunningCollision = 3 250 | Else 251 | FindRunningCollision = 5 252 | End If 253 | End Function 254 | 255 | Public Function ShouldTurnAround(Loc1 As Location, Loc2 As Location, Direction As Single) As Boolean 'Determines if an NPC should turnaround 256 | ShouldTurnAround = True 257 | If Loc1.Y + Loc1.Height + 8 <= Loc2.Y + Loc2.Height Then 258 | If Loc1.Y + Loc1.Height + 8 >= Loc2.Y Then 259 | If Loc1.X + Loc1.Width * 0.5 + (8 * Direction) <= Loc2.X + Loc2.Width Then 260 | If Loc1.X + Loc1.Width * 0.5 + (8 * Direction) >= Loc2.X Then 261 | If Loc2.Y > Loc1.Y + Loc1.Height - 8 Then 262 | ShouldTurnAround = False 263 | End If 264 | End If 265 | End If 266 | End If 267 | End If 268 | End Function 269 | 270 | Public Function CanComeOut(Loc1 As Location, Loc2 As Location) As Boolean 'Determines if an NPC can come out of a pipe 271 | CanComeOut = True 272 | If Loc1.X <= Loc2.X + Loc2.Width + 32 Then 273 | If Loc1.X + Loc1.Width >= Loc2.X - 32 Then 274 | If Loc1.Y <= Loc2.Y + Loc2.Height + 300 Then 275 | If Loc1.Y + Loc1.Height >= Loc2.Y - 300 Then 276 | CanComeOut = False 277 | End If 278 | End If 279 | End If 280 | End If 281 | End Function 282 | 283 | Public Function CheckHitSpot1(Loc1 As Location, Loc2 As Location) As Boolean 'Fixes NPCs sinking through the ground 284 | If Loc1.Y + Loc1.Height - Loc1.SpeedY - Physics.NPCGravity <= Loc2.Y - Loc2.SpeedY Then CheckHitSpot1 = True 285 | End Function 286 | 287 | -------------------------------------------------------------------------------- /modCustom.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "modCustom" 2 | Option Explicit 3 | 4 | Public Sub SaveNPCDefaults() 5 | Dim A As Integer 6 | With NPCDefaults 7 | For A = 1 To maxNPCType 8 | .NPCFrameOffsetX(A) = NPCFrameOffsetX(A) 9 | .NPCFrameOffsetY(A) = NPCFrameOffsetY(A) 10 | .NPCWidth(A) = NPCWidth(A) 11 | .NPCHeight(A) = NPCHeight(A) 12 | .NPCWidthGFX(A) = NPCWidthGFX(A) 13 | .NPCHeightGFX(A) = NPCHeightGFX(A) 14 | .NPCIsAShell(A) = NPCIsAShell(A) 15 | .NPCIsABlock(A) = NPCIsABlock(A) 16 | .NPCIsAHit1Block(A) = NPCIsAHit1Block(A) 17 | .NPCIsABonus(A) = NPCIsABonus(A) 18 | .NPCIsACoin(A) = NPCIsACoin(A) 19 | .NPCIsAVine(A) = NPCIsAVine(A) 20 | .NPCIsAnExit(A) = NPCIsAnExit(A) 21 | .NPCIsAParaTroopa(A) = NPCIsAParaTroopa(A) 22 | .NPCIsCheep(A) = NPCIsCheep(A) 23 | .NPCJumpHurt(A) = NPCJumpHurt(A) 24 | .NPCNoClipping(A) = NPCNoClipping(A) 25 | .NPCScore(A) = NPCScore(A) 26 | .NPCCanWalkOn(A) = NPCCanWalkOn(A) 27 | .NPCGrabFromTop(A) = NPCGrabFromTop(A) 28 | .NPCTurnsAtCliffs(A) = NPCTurnsAtCliffs(A) 29 | .NPCWontHurt(A) = NPCWontHurt(A) 30 | .NPCMovesPlayer(A) = NPCMovesPlayer(A) 31 | .NPCStandsOnPlayer(A) = NPCStandsOnPlayer(A) 32 | .NPCIsGrabbable(A) = NPCIsGrabbable(A) 33 | .NPCIsBoot(A) = NPCIsBoot(A) 34 | .NPCIsYoshi(A) = NPCIsYoshi(A) 35 | .NPCIsToad(A) = NPCIsToad(A) 36 | .NPCNoYoshi(A) = NPCNoYoshi(A) 37 | .NPCForeground(A) = NPCForeground(A) 38 | .NPCIsABot(A) = NPCIsABot(A) 39 | .NPCDefaultMovement(A) = NPCDefaultMovement(A) 40 | .NPCIsVeggie(A) = NPCIsVeggie(A) 41 | .NPCSpeedvar(A) = NPCSpeedvar(A) 42 | .NPCNoFireBall(A) = NPCNoFireBall(A) 43 | .NPCNoIceBall(A) = NPCNoIceBall(A) 44 | .NPCNoGravity(A) = NPCNoGravity(A) 45 | NPCFrameSpeed(A) = 8 46 | Next A 47 | End With 48 | End Sub 49 | 50 | Public Sub LoadNPCDefaults() 51 | Dim A As Integer 52 | With NPCDefaults 53 | For A = 1 To maxNPCType 54 | NPCFrameOffsetX(A) = .NPCFrameOffsetX(A) 55 | NPCFrameOffsetY(A) = .NPCFrameOffsetY(A) 56 | NPCWidth(A) = .NPCWidth(A) 57 | NPCHeight(A) = .NPCHeight(A) 58 | NPCWidthGFX(A) = .NPCWidthGFX(A) 59 | NPCHeightGFX(A) = .NPCHeightGFX(A) 60 | NPCIsAShell(A) = .NPCIsAShell(A) 61 | NPCIsABlock(A) = .NPCIsABlock(A) 62 | NPCIsAHit1Block(A) = .NPCIsAHit1Block(A) 63 | NPCIsABonus(A) = .NPCIsABonus(A) 64 | NPCIsACoin(A) = .NPCIsACoin(A) 65 | NPCIsAVine(A) = .NPCIsAVine(A) 66 | NPCIsAnExit(A) = .NPCIsAnExit(A) 67 | NPCIsAParaTroopa(A) = .NPCIsAParaTroopa(A) 68 | NPCIsCheep(A) = .NPCIsCheep(A) 69 | NPCJumpHurt(A) = .NPCJumpHurt(A) 70 | NPCNoClipping(A) = .NPCNoClipping(A) 71 | NPCScore(A) = .NPCScore(A) 72 | NPCCanWalkOn(A) = .NPCCanWalkOn(A) 73 | NPCGrabFromTop(A) = .NPCGrabFromTop(A) 74 | NPCTurnsAtCliffs(A) = .NPCTurnsAtCliffs(A) 75 | NPCWontHurt(A) = .NPCWontHurt(A) 76 | NPCMovesPlayer(A) = .NPCMovesPlayer(A) 77 | NPCStandsOnPlayer(A) = .NPCStandsOnPlayer(A) 78 | NPCIsGrabbable(A) = .NPCIsGrabbable(A) 79 | NPCIsBoot(A) = .NPCIsBoot(A) 80 | NPCIsYoshi(A) = .NPCIsYoshi(A) 81 | NPCIsToad(A) = .NPCIsToad(A) 82 | NPCNoYoshi(A) = .NPCNoYoshi(A) 83 | NPCForeground(A) = .NPCForeground(A) 84 | NPCIsABot(A) = .NPCIsABot(A) 85 | NPCDefaultMovement(A) = .NPCDefaultMovement(A) 86 | NPCIsVeggie(A) = .NPCIsVeggie(A) 87 | NPCSpeedvar(A) = .NPCSpeedvar(A) 88 | NPCNoFireBall(A) = .NPCNoFireBall(A) 89 | NPCNoIceBall(A) = .NPCNoIceBall(A) 90 | NPCNoGravity(A) = .NPCNoGravity(A) 91 | NPCFrame(A) = 0 92 | NPCFrameSpeed(A) = 8 93 | NPCFrameStyle(A) = 0 94 | Next A 95 | End With 96 | End Sub 97 | 98 | Public Sub FindCustomNPCs(Optional cFilePath As String = "") 99 | Dim A As Integer 100 | If Dir(FileNamePath & "\npc*.txt") <> "" Then 101 | For A = 1 To maxNPCType 102 | If Dir(FileNamePath & "\npc-" & A & ".txt") <> "" Then 103 | LoadCustomNPC A, FileNamePath & "\npc-" & A & ".txt" 104 | End If 105 | Next A 106 | End If 107 | If cFilePath <> "" Then 108 | If Dir(cFilePath & "\npc*.txt") <> "" Then 109 | For A = 1 To maxNPCType 110 | If Dir(cFilePath & "\npc-" & A & ".txt") <> "" Then 111 | LoadCustomNPC A, cFilePath & "\npc-" & A & ".txt" 112 | End If 113 | Next A 114 | End If 115 | End If 116 | End Sub 117 | 118 | Private Sub LoadCustomNPC(A As Integer, cFileName As String) 119 | Dim newStr As String 120 | Open cFileName For Input As #1 121 | Do Until EOF(1) 122 | Input #1, newStr 123 | newStr = FixComma(newStr) 124 | If LCase(Left(newStr, Len("gfxoffsetx="))) = "gfxoffsetx=" Then NPCFrameOffsetX(A) = Mid(newStr, Len("gfxoffsetx=") + 1) 125 | If LCase(Left(newStr, Len("gfxoffsety="))) = "gfxoffsety=" Then NPCFrameOffsetY(A) = Mid(newStr, Len("gfxoffsety=") + 1) 126 | If LCase(Left(newStr, Len("width="))) = "width=" Then NPCWidth(A) = Mid(newStr, Len("width=") + 1) 127 | If LCase(Left(newStr, Len("height="))) = "height=" Then NPCHeight(A) = Mid(newStr, Len("height=") + 1) 128 | If LCase(Left(newStr, Len("gfxwidth="))) = "gfxwidth=" Then NPCWidthGFX(A) = Mid(newStr, Len("gfxwidth=") + 1) 129 | If LCase(Left(newStr, Len("gfxheight="))) = "gfxheight=" Then NPCHeightGFX(A) = Mid(newStr, Len("gfxheight=") + 1) 130 | If LCase(Left(newStr, Len("score="))) = "score=" Then NPCScore(A) = Mid(newStr, Len("score=") + 1) 131 | If LCase(Left(newStr, Len("playerblock="))) = "playerblock=" Then NPCMovesPlayer(A) = Mid(newStr, Len("playerblock=") + 1) 132 | If LCase(Left(newStr, Len("playerblocktop="))) = "playerblocktop=" Then NPCCanWalkOn(A) = Mid(newStr, Len("playerblocktop=") + 1) 133 | If LCase(Left(newStr, Len("npcblock="))) = "npcblock=" Then NPCIsABlock(A) = Mid(newStr, Len("npcblock=") + 1) 134 | If LCase(Left(newStr, Len("npcblocktop="))) = "npcblocktop=" Then NPCIsAHit1Block(A) = Mid(newStr, Len("npcblocktop=") + 1) 135 | If LCase(Left(newStr, Len("grabside="))) = "grabside=" Then NPCIsGrabbable(A) = Mid(newStr, Len("grabside=") + 1) 136 | If LCase(Left(newStr, Len("grabtop="))) = "grabtop=" Then NPCGrabFromTop(A) = Mid(newStr, Len("grabtop=") + 1) 137 | If LCase(Left(newStr, Len("jumphurt="))) = "jumphurt=" Then NPCJumpHurt(A) = Mid(newStr, Len("jumphurt=") + 1) 138 | If LCase(Left(newStr, Len("nohurt="))) = "nohurt=" Then NPCWontHurt(A) = Mid(newStr, Len("nohurt=") + 1) 139 | If LCase(Left(newStr, Len("noblockcollision="))) = "noblockcollision=" Then NPCNoClipping(A) = Mid(newStr, Len("noblockcollision=") + 1) 140 | If LCase(Left(newStr, Len("cliffturn="))) = "cliffturn=" Then NPCTurnsAtCliffs(A) = Mid(newStr, Len("cliffturn=") + 1) 141 | If LCase(Left(newStr, Len("noyoshi="))) = "noyoshi=" Then NPCNoYoshi(A) = Mid(newStr, Len("noyoshi=") + 1) 142 | If LCase(Left(newStr, Len("foreground="))) = "foreground=" Then NPCForeground(A) = Mid(newStr, Len("foreground=") + 1) 143 | If LCase(Left(newStr, Len("speed="))) = "speed=" Then NPCSpeedvar(A) = Mid(newStr, Len("speed=") + 1) 144 | If LCase(Left(newStr, Len("nofireball="))) = "nofireball=" Then NPCNoFireBall(A) = Mid(newStr, Len("nofireball=") + 1) 145 | If LCase(Left(newStr, Len("noiceball="))) = "noiceball=" Then NPCNoIceBall(A) = Mid(newStr, Len("noiceball=") + 1) 146 | If LCase(Left(newStr, Len("nogravity="))) = "nogravity=" Then NPCNoGravity(A) = Mid(newStr, Len("nogravity=") + 1) 147 | If LCase(Left(newStr, Len("frames="))) = "frames=" Then NPCFrame(A) = Mid(newStr, Len("frames=") + 1) 148 | If LCase(Left(newStr, Len("framespeed="))) = "framespeed=" Then NPCFrameSpeed(A) = Mid(newStr, Len("framespeed=") + 1) 149 | If LCase(Left(newStr, Len("framestyle="))) = "framestyle=" Then NPCFrameStyle(A) = Mid(newStr, Len("framestyle=") + 1) 150 | Loop 151 | Close #1 152 | End Sub 153 | 154 | 155 | -------------------------------------------------------------------------------- /modJoystick.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "modJoystick" 2 | 'this module handles the players controls, both keyboard and joystick 3 | 4 | Option Explicit 5 | Public Declare Function joyGetPosEx Lib "winmm.dll" (ByVal uJoyID As Integer, pji As JOYINFOEX) As Integer 6 | Public Declare Function joyGetDevCapsA Lib "winmm.dll" (ByVal uJoyID As Integer, pjc As JOYCAPS, ByVal cjc As Integer) As Integer 7 | Public Type JOYCAPS 8 | wMid As Long 9 | wPid As Long 10 | szPname As String * 32 11 | wXmin As Long 12 | wXmax As Long 13 | wYmin As Long 14 | wYmax As Long 15 | wZmin As Long 16 | wZmax As Long 17 | wNumButtons As Long 18 | wPeriodMin As Long 19 | wPeriodMax As Long 20 | wRmin As Long 21 | wRmax As Long 22 | wUmin As Long 23 | wUmax As Long 24 | wVmin As Long 25 | wVmax As Long 26 | wCaps As Long 27 | wMaxAxes As Long 28 | wNumAxes As Long 29 | wMaxButtons As Long 30 | szRegKey As String * 32 31 | szOEMVxD As String * 260 32 | End Type 33 | Public Type JOYINFOEX 34 | dwSize As Long 35 | dwFlags As Long 36 | dwXpos As Long 37 | dwYpos As Long 38 | dwZpos As Long 39 | dwRpos As Long 40 | dwUpos As Long 41 | dwVpos As Long 42 | dwButtons As Long 43 | dwButtonNumber As Long 44 | dwPOV As Long 45 | dwReserved1 As Long 46 | dwReserved2 As Long 47 | End Type 48 | Public JoyNum As Long 49 | Public MYJOYEX As JOYINFOEX 50 | Public MYJOYCAPS As JOYCAPS 51 | Public CenterX(0 To 7) As Long 52 | Public CenterY(0 To 7) As Long 53 | Public JoyButtons(-15 To 15) As Boolean 54 | Public CurrentJoyX As Long 55 | Public CurrentJoyY As Long 56 | Public CurrentJoyPOV As Long 57 | 58 | Public Sub UpdateControls() 'Gets players controls 59 | Dim A As Integer 60 | Dim B As Integer 61 | Dim C As Integer 62 | If TestLevel = True And Not (nPlay.Online = True And nPlay.Mode = 0) Then 63 | If GetKeyState(vbKeyEscape) And KEY_PRESSED Then 64 | EndLevel = True 65 | End If 66 | End If 67 | For B = 1 To numPlayers 68 | If B = 2 And numPlayers = 2 Then 69 | A = 2 70 | Else 71 | A = 1 72 | End If 73 | With Player(A).Controls 74 | .Down = False 75 | .Drop = False 76 | .Jump = False 77 | .Left = False 78 | .Right = False 79 | .Run = False 80 | .Start = False 81 | .Up = False 82 | .AltJump = False 83 | .AltRun = False 84 | If useJoystick(A) > 0 Then 'There is a joystick 85 | JoyNum = useJoystick(A) - 1 86 | PollJoystick 87 | If CurrentJoyX < CenterX(JoyNum) - CenterX(JoyNum) * 0.3 Or (CurrentJoyPOV >= 22500 And CurrentJoyPOV <= 31500) Then 88 | .Left = True 89 | ElseIf CurrentJoyX > CenterX(JoyNum) + CenterX(JoyNum) * 0.3 Or (CurrentJoyPOV >= 4500 And CurrentJoyPOV <= 13500) Then 90 | .Right = True 91 | End If 92 | If CurrentJoyY < CenterY(JoyNum) - CenterY(JoyNum) * 0.3 Or (CurrentJoyPOV >= 0 And CurrentJoyPOV <= 4500) Or CurrentJoyPOV = 31500 Then 93 | .Up = True 94 | ElseIf CurrentJoyY > CenterY(JoyNum) + CenterY(JoyNum) * 0.3 Or (CurrentJoyPOV >= 13500 And CurrentJoyPOV <= 22500) Then 95 | .Down = True 96 | End If 97 | If JoyButtons(conJoystick(A).Jump) = True Then 98 | .Jump = True 99 | End If 100 | If JoyButtons(conJoystick(A).Run) = True Then 101 | .Run = True 102 | End If 103 | If JoyButtons(conJoystick(A).Drop) = True Then 104 | .Drop = True 105 | End If 106 | If JoyButtons(conJoystick(A).Start) = True Then 107 | .Start = True 108 | End If 109 | If JoyButtons(conJoystick(A).AltRun) = True Then 110 | .AltRun = True 111 | End If 112 | If JoyButtons(conJoystick(A).AltJump) = True Then 113 | .AltJump = True 114 | End If 115 | End If 116 | If useJoystick(A) = 0 Then 'Keyboard controls 117 | If GetKeyState(conKeyboard(A).Up) And KEY_PRESSED Then 118 | .Up = True 119 | End If 120 | If GetKeyState(conKeyboard(A).Down) And KEY_PRESSED Then 121 | .Down = True 122 | End If 123 | If GetKeyState(conKeyboard(A).Left) And KEY_PRESSED Then 124 | .Left = True 125 | End If 126 | If GetKeyState(conKeyboard(A).Right) And KEY_PRESSED Then 127 | .Right = True 128 | End If 129 | If GetKeyState(conKeyboard(A).Jump) And KEY_PRESSED Then 130 | .Jump = True 131 | End If 132 | If GetKeyState(conKeyboard(A).Run) And KEY_PRESSED Then 133 | .Run = True 134 | End If 135 | If GetKeyState(conKeyboard(A).Drop) And KEY_PRESSED Then 136 | .Drop = True 137 | End If 138 | If GetKeyState(conKeyboard(A).Start) And KEY_PRESSED Then 139 | .Start = True 140 | End If 141 | If GetKeyState(conKeyboard(A).AltJump) And KEY_PRESSED Then 142 | .AltJump = True 143 | End If 144 | If GetKeyState(conKeyboard(A).AltRun) And KEY_PRESSED Then 145 | .AltRun = True 146 | End If 147 | End If 148 | If .Left = True And .Right = True Then 149 | .Left = False 150 | .Right = False 151 | End If 152 | If Player(A).Controls.Start = False And Player(A).Controls.Jump = False Then 153 | Player(A).UnStart = True 154 | End If 155 | If .Up = True And .Down = True Then 156 | .Up = False 157 | .Down = False 158 | End If 159 | If .Left = True And .Right = True Then 160 | .Left = False 161 | .Right = False 162 | End If 163 | If Not (Player(A).State = 5 And Player(A).Mount = 0) And .AltRun = True Then .Run = True 164 | If ForcedControls = True And GamePaused = False Then 165 | Player(A).Controls = ForcedControl 166 | End If 167 | End With 168 | Next B 169 | If SingleCoop > 0 Then 170 | If numPlayers = 1 Or numPlayers > 2 Then SingleCoop = 0 171 | Dim tempControls As Controls 172 | If SingleCoop = 1 Then 173 | Player(2).Controls = tempControls 174 | Else 175 | Player(2).Controls = Player(1).Controls 176 | Player(1).Controls = tempControls 177 | End If 178 | End If 179 | If nPlay.Online = True Then 180 | Player(nPlay.MySlot + 1).Controls = Player(1).Controls 181 | If Not (nPlay.MyControls.AltJump = Player(1).Controls.AltJump And nPlay.MyControls.AltRun = Player(1).Controls.AltRun And nPlay.MyControls.Down = Player(1).Controls.Down And nPlay.MyControls.Drop = Player(1).Controls.Drop And nPlay.MyControls.Jump = Player(1).Controls.Jump And nPlay.MyControls.Left = Player(1).Controls.Left And nPlay.MyControls.Right = Player(1).Controls.Right And nPlay.MyControls.Run = Player(1).Controls.Run And nPlay.MyControls.Start = Player(1).Controls.Start And nPlay.MyControls.Up = Player(1).Controls.Up) Then 182 | nPlay.MyControls = Player(1).Controls 183 | nPlay.Player(nPlay.MySlot).Controls = Player(1).Controls 184 | If Player(nPlay.MySlot + 1).Dead = False And Player(nPlay.MySlot + 1).TimeToLive = 0 Then Netplay.sendData Netplay.PutPlayerControls(nPlay.MySlot) 185 | Else 186 | nPlay.MyControls = Player(1).Controls 187 | nPlay.Player(nPlay.MySlot).Controls = Player(1).Controls 188 | End If 189 | For A = 0 To numPlayers - 1 190 | If nPlay.Player(A).Active = True And A <> nPlay.MySlot Then 191 | Player(A + 1).Controls = nPlay.Player(A).Controls 192 | End If 193 | Next A 194 | End If 195 | For A = 1 To numPlayers 196 | With Player(A) 197 | If .SpinJump = True Then 198 | If .SpinFrame < 4 Or .SpinFrame > 9 Then 199 | .Direction = -1 200 | Else 201 | .Direction = 1 202 | End If 203 | End If 204 | End With 205 | Next A 206 | End Sub 207 | 208 | Public Function StartJoystick(Optional ByVal JoystickNumber As Integer = 0) As Boolean 209 | JoyNum = JoystickNumber 210 | If joyGetDevCapsA(JoyNum, MYJOYCAPS, 404) <> 0 Then 'Get joystick info 211 | StartJoystick = False 212 | Else 213 | MYJOYEX.dwSize = 64 214 | MYJOYEX.dwFlags = 255 215 | Call joyGetPosEx(JoyNum, MYJOYEX) 216 | 'CenterX(JoyNum) = MYJOYEX.dwXpos 217 | 'CenterY(JoyNum) = MYJOYEX.dwYpos 218 | CenterX(JoyNum) = (MYJOYCAPS.wXmax + MYJOYCAPS.wXmin) / 2 219 | CenterY(JoyNum) = (MYJOYCAPS.wYmax + MYJOYCAPS.wYmin) / 2 220 | StartJoystick = True 221 | End If 222 | End Function 223 | 224 | Public Sub PollJoystick() 225 | Dim i As Integer 226 | Dim t As Integer 227 | MYJOYEX.dwSize = 64 228 | MYJOYEX.dwFlags = 255 229 | ' Get the joystick information 230 | Call joyGetPosEx(JoyNum, MYJOYEX) 231 | t = MYJOYEX.dwButtons 232 | For i = 15 To 0 Step -1 233 | JoyButtons(i) = False 234 | If (2 ^ i) <= t Then 235 | t = t - (2 ^ i) 236 | JoyButtons(i) = True 237 | End If 238 | Next i 239 | CurrentJoyX = MYJOYEX.dwXpos 240 | CurrentJoyY = MYJOYEX.dwYpos 241 | CurrentJoyPOV = MYJOYEX.dwPOV 242 | End Sub 243 | -------------------------------------------------------------------------------- /modSorting.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "modSorting" 2 | Option Explicit 3 | 4 | Public Sub qSortBlocksY(min As Integer, max As Integer) 'quicksort the blocks Y 5 | Dim medBlock As Block 6 | Dim hi As Integer 7 | Dim lo As Integer 8 | Dim i As Integer 9 | If min >= max Then Exit Sub 10 | i = Int((max + min) / 2) 11 | medBlock = Block(i) 12 | Block(i) = Block(min) 13 | lo = min 14 | hi = max 15 | Do 16 | Do While Block(hi).Location.Y >= medBlock.Location.Y 17 | hi = hi - 1 18 | If hi <= lo Then Exit Do 19 | Loop 20 | If hi <= lo Then 21 | Block(lo) = medBlock 22 | Exit Do 23 | End If 24 | Block(lo) = Block(hi) 25 | lo = lo + 1 26 | Do While Block(lo).Location.Y < medBlock.Location.Y 27 | lo = lo + 1 28 | If lo >= hi Then Exit Do 29 | Loop 30 | If lo >= hi Then 31 | lo = hi 32 | Block(hi) = medBlock 33 | Exit Do 34 | End If 35 | Block(hi) = Block(lo) 36 | Loop 37 | qSortBlocksY min, lo - 1 38 | qSortBlocksY lo + 1, max 39 | End Sub 40 | 41 | Public Sub qSortBlocksX(min As Integer, max As Integer) 'quicksort the blocks X 42 | Dim medBlock As Block 43 | Dim hi As Integer 44 | Dim lo As Integer 45 | Dim i As Integer 46 | If min >= max Then Exit Sub 47 | i = Int((max + min) / 2) 48 | medBlock = Block(i) 49 | Block(i) = Block(min) 50 | lo = min 51 | hi = max 52 | Do 53 | Do While Block(hi).Location.X >= medBlock.Location.X 54 | hi = hi - 1 55 | If hi <= lo Then Exit Do 56 | Loop 57 | If hi <= lo Then 58 | Block(lo) = medBlock 59 | Exit Do 60 | End If 61 | Block(lo) = Block(hi) 62 | lo = lo + 1 63 | Do While Block(lo).Location.X < medBlock.Location.X 64 | lo = lo + 1 65 | If lo >= hi Then Exit Do 66 | Loop 67 | If lo >= hi Then 68 | lo = hi 69 | Block(hi) = medBlock 70 | Exit Do 71 | End If 72 | Block(hi) = Block(lo) 73 | Loop 74 | qSortBlocksX min, lo - 1 75 | qSortBlocksX lo + 1, max 76 | End Sub 77 | 78 | Public Sub qSortBackgrounds(min As Integer, max As Integer) 'quicksort the backgrounds 79 | Dim medBackground As Background 80 | Dim medBackgroundPri 81 | Dim hi As Integer 82 | Dim lo As Integer 83 | Dim i As Integer 84 | If min >= max Then Exit Sub 85 | i = Int((max + min) / 2) 86 | medBackground = Background(i) 87 | medBackgroundPri = BackGroundPri(i) 88 | Background(i) = Background(min) 89 | lo = min 90 | hi = max 91 | Do 92 | Do While BackGroundPri(hi) >= medBackgroundPri 93 | 94 | hi = hi - 1 95 | If hi <= lo Then Exit Do 96 | Loop 97 | If hi <= lo Then 98 | Background(lo) = medBackground 99 | Exit Do 100 | End If 101 | Background(lo) = Background(hi) 102 | lo = lo + 1 103 | Do While BackGroundPri(lo) < medBackgroundPri 104 | lo = lo + 1 105 | If lo >= hi Then Exit Do 106 | Loop 107 | If lo >= hi Then 108 | lo = hi 109 | Background(hi) = medBackground 110 | Exit Do 111 | End If 112 | Background(hi) = Background(lo) 113 | Loop 114 | qSortBackgrounds min, lo - 1 115 | qSortBackgrounds lo + 1, max 116 | End Sub 117 | 118 | Public Sub FindBlocks() 'create a table of contents for blocks for an optimization 119 | Dim A As Double 120 | Dim B As Double 121 | Dim C As Integer 122 | Dim curBlk As Integer 123 | Dim fBool As Boolean 124 | curBlk = 1 125 | For A = -FLBlocks To FLBlocks 126 | For B = curBlk To numBlock 127 | If Block(B).Location.X + Block(B).Location.Width >= A * 32 Then 128 | curBlk = B 129 | Exit For 130 | End If 131 | Next B 132 | FirstBlock(A) = curBlk 133 | Next A 134 | curBlk = numBlock 135 | For A = FLBlocks To -FLBlocks Step -1 136 | fBool = False 137 | For B = curBlk To 1 Step -1 138 | If Block(B).Location.X <= A * 32 Then 139 | curBlk = B 140 | Exit For 141 | End If 142 | Next B 143 | LastBlock(A) = curBlk 144 | Next A 145 | BlocksSorted = True 146 | End Sub 147 | 148 | Public Sub BlockSort() 'sizable block sorting 149 | Dim A As Integer 150 | Dim B As Integer 151 | Dim tempBlock As Block 152 | 'Sort Sizable Blocks 153 | For A = 1 To numBlock 154 | If BlockIsSizable(Block(A).Type) Then 155 | For B = 1 To A - 1 156 | If Not BlockIsSizable(Block(B).Type) Then 157 | tempBlock = Block(A) 158 | Block(A) = Block(B) 159 | Block(B) = tempBlock 160 | Exit For 161 | End If 162 | Next B 163 | End If 164 | Next A 165 | For A = 1 To numBlock 166 | If BlockIsSizable(Block(A).Type) Then 167 | For B = 1 To numBlock 168 | If BlockIsSizable(Block(B).Type) Then 169 | If B <> 1 Then 170 | If Block(A).Location.Y < Block(B).Location.Y And A > B Then 171 | tempBlock = Block(A) 172 | Block(A) = Block(B) 173 | Block(B) = tempBlock 174 | ElseIf Block(A).Location.Y > Block(B).Location.Y And A < B Then 175 | tempBlock = Block(A) 176 | Block(A) = Block(B) 177 | Block(B) = tempBlock 178 | End If 179 | End If 180 | End If 181 | Next B 182 | End If 183 | Next A 184 | End Sub 185 | 186 | Public Sub BlockSort2() 'Super Block sorting / slow and only used when saving 187 | Dim A As Integer 188 | Dim B As Integer 189 | Dim tempBlock As Block 190 | Dim sortAgain As Boolean 191 | Do 192 | sortAgain = False 193 | For A = 1 To numBlock 194 | For B = 1 To numBlock 195 | If B <> A Then 196 | If Block(A).Location.Y < Block(B).Location.Y And A > B Then 197 | tempBlock = Block(A) 198 | Block(A) = Block(B) 199 | Block(B) = tempBlock 200 | sortAgain = True 201 | End If 202 | End If 203 | Next B 204 | Next A 205 | Loop While sortAgain = True 206 | End Sub 207 | 208 | Public Sub BackgroundSort() 209 | Dim A As Integer 210 | Dim B As Integer 211 | Dim tempBackground As Background 212 | Dim sortAgain As Boolean 213 | Do 214 | sortAgain = False 215 | For A = 1 To numBackground 216 | For B = 1 To numBackground 217 | If B <> A Then 218 | If BackGroundPri(A) < BackGroundPri(B) And A > B Then 219 | tempBackground = Background(A) 220 | Background(A) = Background(B) 221 | Background(B) = tempBackground 222 | sortAgain = True 223 | End If 224 | End If 225 | Next B 226 | Next A 227 | Loop While sortAgain = True 228 | End Sub 229 | 230 | Public Function BackGroundPri(A As Integer) As Double 'finds where the backgrounds should be put to set drawing priority 231 | 'Lower Numbers get drawn first 232 | With Background(A) 233 | If .Type = 11 Or .Type = 12 Or .Type = 60 Or .Type = 61 Then 234 | BackGroundPri = 20 235 | ElseIf .Type = 65 Or .Type = 26 Or .Type = 82 Or .Type = 83 Or .Type = 164 Or .Type = 165 Or .Type = 166 Or .Type = 167 Or .Type = 168 Or .Type = 169 Then 'WATER 236 | 237 | BackGroundPri = 26 238 | ElseIf .Type = 168 Or .Type = 159 Or .Type = 172 Or .Type = 66 Or .Type = 158 Then 'WATER FALLS 239 | BackGroundPri = 25 240 | ElseIf .Type = 75 Or .Type = 76 Or .Type = 77 Or .Type = 78 Or .Type = 14 Then 241 | BackGroundPri = 10 242 | ElseIf .Type = 79 Or .Type = 52 Then 243 | BackGroundPri = 30 244 | ElseIf .Type = 70 Or .Type = 71 Or .Type = 72 Or .Type = 73 Or .Type = 74 Or .Type = 141 Then 245 | BackGroundPri = 90 246 | ElseIf .Type = 139 Or .Type = 140 Or .Type = 48 Then 247 | BackGroundPri = 80 248 | ElseIf .Type = 65 Or .Type = 165 Then 249 | BackGroundPri = 150 250 | ElseIf Foreground(.Type) = True Then 251 | BackGroundPri = 125 252 | ElseIf .Type = 66 Then 253 | BackGroundPri = 50 254 | ElseIf .Type = 99 Then 255 | BackGroundPri = 99 'Always doors + 1 256 | ElseIf .Type = 87 Or .Type = 88 Or .Type = 92 Or .Type = 107 Or .Type = 105 Or .Type = 104 Then 'Doors 257 | BackGroundPri = 98 258 | ElseIf .Type >= 129 And .Type <= 131 Then 259 | BackGroundPri = 76 260 | ElseIf .Type = 1 Then 261 | BackGroundPri = 77 262 | Else 263 | BackGroundPri = 75 264 | End If 265 | BackGroundPri = BackGroundPri + Background(A).Location.X / 10000000 266 | End With 267 | End Function 268 | 269 | Public Sub NPCSort() 270 | Dim A As Integer 271 | Dim B As Integer 272 | Dim tempNPC As NPC 273 | For A = 1 To numNPCs 274 | If NPCIsACoin(NPC(A).Type) Then 275 | For B = 1 To A - 1 276 | If Not NPCIsACoin(NPC(B).Type) Then 277 | tempNPC = NPC(A) 278 | NPC(A) = NPC(B) 279 | NPC(B) = tempNPC 280 | Exit For 281 | End If 282 | Next B 283 | End If 284 | Next A 285 | End Sub 286 | 287 | Public Sub FindSBlocks() 'sorts sizable blocks 288 | 289 | Dim A As Integer 290 | sBlockNum = 0 291 | For A = 1 To numBlock 292 | If BlockIsSizable(Block(A).Type) Then 293 | sBlockNum = sBlockNum + 1 294 | sBlockArray(sBlockNum) = A 295 | End If 296 | Next A 297 | qSortSBlocks 1, sBlockNum 298 | End Sub 299 | 300 | Public Sub qSortSBlocks(min As Integer, max As Integer) 301 | Dim medBlock As Integer 302 | Dim hi As Integer 303 | Dim lo As Integer 304 | Dim i As Integer 305 | If min >= max Then Exit Sub 306 | 307 | i = Int((max + min) / 2) 308 | medBlock = sBlockArray(i) 309 | sBlockArray(i) = sBlockArray(min) 310 | lo = min 311 | hi = max 312 | Do 313 | Do While Block(sBlockArray(hi)).Location.Y >= Block(medBlock).Location.Y 314 | hi = hi - 1 315 | If hi <= lo Then Exit Do 316 | Loop 317 | If hi <= lo Then 318 | sBlockArray(lo) = medBlock 319 | Exit Do 320 | End If 321 | sBlockArray(lo) = sBlockArray(hi) 322 | lo = lo + 1 323 | Do While Block(sBlockArray(lo)).Location.Y < Block(medBlock).Location.Y 324 | lo = lo + 1 325 | If lo >= hi Then Exit Do 326 | Loop 327 | If lo >= hi Then 328 | lo = hi 329 | sBlockArray(hi) = medBlock 330 | Exit Do 331 | End If 332 | sBlockArray(hi) = sBlockArray(lo) 333 | Loop 334 | qSortSBlocks min, lo - 1 335 | qSortSBlocks lo + 1, max 336 | End Sub 337 | 338 | Public Sub qSortNPCsY(min As Integer, max As Integer) 339 | Dim medNPC As NPC 340 | Dim hi As Integer 341 | Dim lo As Integer 342 | Dim i As Integer 343 | If min >= max Then Exit Sub 344 | i = Int((max + min) / 2) 345 | medNPC = NPC(i) 346 | NPC(i) = NPC(min) 347 | lo = min 348 | hi = max 349 | Do 350 | Do While NPC(hi).Location.Y < medNPC.Location.Y 351 | hi = hi - 1 352 | If hi <= lo Then Exit Do 353 | Loop 354 | If hi <= lo Then 355 | NPC(lo) = medNPC 356 | Exit Do 357 | End If 358 | NPC(lo) = NPC(hi) 359 | lo = lo + 1 360 | Do While NPC(lo).Location.Y >= medNPC.Location.Y 361 | lo = lo + 1 362 | If lo >= hi Then Exit Do 363 | Loop 364 | If lo >= hi Then 365 | lo = hi 366 | NPC(hi) = medNPC 367 | Exit Do 368 | End If 369 | NPC(hi) = NPC(lo) 370 | Loop 371 | qSortNPCsY min, lo - 1 372 | qSortNPCsY lo + 1, max 373 | End Sub 374 | 375 | Public Sub UpdateBackgrounds() 376 | Dim A As Integer 377 | Dim B As Integer 378 | LastBackground = numBackground 379 | MidBackground = 1 380 | For A = 1 To numBackground 381 | If BackGroundPri(A) >= 25 Then 382 | For B = A To numBackground 383 | If BackGroundPri(B) >= 100 Then 384 | LastBackground = B - 1 385 | Exit For 386 | End If 387 | Next B 388 | Exit For 389 | End If 390 | Next A 391 | MidBackground = A 392 | 393 | If noUpdate = False Then 394 | Netplay.sendData "s" & numBackground & LB 395 | End If 396 | End Sub 397 | 398 | Public Sub qSortTempBlocksX(min As Integer, max As Integer) 399 | Dim medBlock As Block 400 | Dim hi As Integer 401 | Dim lo As Integer 402 | Dim i As Integer 403 | If min >= max Then Exit Sub 404 | i = Int((max + min) / 2) 405 | medBlock = Block(i) 406 | Block(i) = Block(min) 407 | lo = min 408 | hi = max 409 | Do 410 | Do While Block(hi).Location.X >= medBlock.Location.X 411 | hi = hi - 1 412 | If hi <= lo Then Exit Do 413 | Loop 414 | If hi <= lo Then 415 | Block(lo) = medBlock 416 | Exit Do 417 | End If 418 | Block(lo) = Block(hi) 419 | lo = lo + 1 420 | Do While Block(lo).Location.X < medBlock.Location.X 421 | lo = lo + 1 422 | If lo >= hi Then Exit Do 423 | Loop 424 | If lo >= hi Then 425 | lo = hi 426 | Block(hi) = medBlock 427 | Exit Do 428 | End If 429 | Block(hi) = Block(lo) 430 | Loop 431 | qSortBlocksX min, lo - 1 432 | qSortBlocksX lo + 1, max 433 | End Sub 434 | 435 | --------------------------------------------------------------------------------