4.5.9 Script Settings Overview

This is a breakdown of all the scripts in defined in the Script Settings along with mentions of what files are included within them and what files they get included in. This is based on the Metroidvania Module, but should generally apply to all modules in most cases.

Main

 * Overview: Includes Base. That’s all that is in here.
 * File: Routines\BASE_4_5\System\MainASM.asm
 * Define: SCR_MAIN
 * Includes: Base

Header

 * Overview: Data that goes at the beginning of a rom file to tell an emulator hardware information about the intended cartridge.
 * File: Routines\BASE_4_5\System\Header.asm
 * Define: SCR_HEADER
 * Included by: Base

System Constants

 * Overview: Constants are a way of giving a name to numerical values to help make code easier to read. They don’t take up space because when the game gets assembled, these names are discarded and the original numerical value is all that remains.
 * File: Routines\BASE_4_5\System\SystemConstants.asm
 * Define: SCR_SYSTEM_CONSTANTS
 * Included by: Base
 * Includes:
 * GameData\UserDefinedConstants.asm
 * This is where the constants defined in the User Constants tab go.
 * GameData\HUD_BOX_CONSTANTS.dat
 * Constants pertaining to the HUD and other Boxes’ width and height as well as constants for HUD Assets.
 * GameData\HUD_CONSTANTS.dat
 * Constants for which values correspond to HUD tiles. Also has masks for each of the HUD elements.

Memory Map

 * Overview: Defines how the different regions of RAM will be used. See section on Memory Map.
 * File: Routines\BASE_4_5\System\MemoryMap.asm
 * Define: SCR_MEMORY_MAP
 * Included by: Base
 * Includes:
 * GameData/ZP_RAM.asm
 * GameData/Variables/UserVariables.asm
 * System\ggsound_ram.asm
 * GameData/System_RAM.asm
 * GameData/Object_RAM.asm

Reset

 * Overview: This is where the code of you starts. For the most part it zeroes out a lot of values and turns on some stuff. After this is complete the program moves on to Initialize.
 * File: Routines\BASE_4_5\System\Reset.asm
 * Define: SCR_RESET
 * Included by: Base

NMI

 * Overview: At the end of every frame, the main program gets interrupted by this routine. It takes care of loading all the updated graphics information to PPU to be drawn for the next frame.
 * File: Routines\BASE_4_5\System\NMI.asm
 * Define: SCR_NMI
 * Included by: Base
 * Includes:
 * Load Palettes
 * Load Sprite Palettes
 * Handle Update Tiles

Assign Banks

 * Overview: Similar to how the Memory Map assigns regions of RAM for various purposes, this file defines which banks all of your asm files will go to.
 * File: Routines\BASE_4_5\System\AssignBanks.asm
 * Define: SCR_ASSIGN_BANKS
 * Included by: Base
 * Includes all the Bank files (00 to 1E)

Vectors

 * Overview: The main thing that happens here is that the address for NMI and RESET (and IRQ) are kept here so the NES knows where to go when the game start (RESET) and when the end of a frame is reached (NMI).  Not really sure what the values assigned to $FFF0 to $FFF9 in this file are for.
 * File: Routines\BASE_4_5\System\Vectors.asm
 * Define: SCR_VECTORS
 * Included by: Base

Load Subroutines

 * Overview: Includes the files for various subroutines. Most of these subroutines are not defined through NESmaker’s Script Settings.  Also has a definition for a constant called DATABANK1 here for some reason.
 * File: Routines\BASE_4_5\Game\LoadAllSubroutines.asm
 * Define: SCR_LOAD_SUBROUTINES
 * Included by: Base
 * Includes from the Game\Subroutines\ folder not found in Script Settings:
 * doBankswitchY.asm
 * doLoadBackgroundPalette.asm
 * doLoadObjectPalette.asm
 * doLoadObjectSubPalette.asm
 * doLoadChrRam.asm
 * doLoadNametableData.asm
 * doLoadAttributeData.asm
 * doLoadCollisionTable.asm
 * doCleanUpSpriteRam.asm
 * doWaitFrame.asm
 * doHandleBounds.asm
 * doLoadScreen.asm
 * doLoadScreen2.asm
 * ToggleTables.asm
 * ejectionSubroutines.asm
 * doLoadScreenData.asm
 * doLoadNametableDataFull.asm
 * doHandleCreateState.asm
 * doChangeActionStep.asm
 * doGetRandomNumber.asm
 * updateAction.asm
 * doClearAllMonsters.asm
 * doDrawBox.asm
 * doDrawText.asm
 * doDrawTilesDirect.asm
 * doDrawVariableTiles.asm
 * doDrawNumbers.asm
 * doUpdateHudElement.asm
 * doUpdateHudTiles.asm
 * doUpdateHudVarTiles.asm
 * doUpdateHudNumber.asm
 * doHandleInputReads.asm
 * doCreateObject.asm
 * locationFinders.asm
 * Includes listed under Subroutines in the Script Settings
 * Handle Screen Update
 * Handle Drawing Boxes
 * Handle Objects
 * Load Scroll Column
 * Compare Object Boxes
 * Handle Camera
 * Includes listed under Game in the Script Settings
 * Menu Management
 * Includes listed under Behaviors in the Script Settings
 * Update Position
 * Start Moving
 * Stop Moving
 * Change Facing Direction
 * Includes listed under Common in the Script Settings
 * Handle Drawing Hud
 * Odd include that I’m not sure how to categorize in my scheme thus far
 * GameData\DataBank01_Includes.asm
 * Also includes the files for the 16 AI routines as well as the hi lo tables of pointers for the addresses of those routines.

Math Functions

 * Overview: A file dedicated for placing math functions. Default file includes functions to add and subtract values for use in the HUD.
 * File: Routines\BASE_4_5\System\simpleMath.asm
 * Define: SCR_MATH_FUNCTIONS
 * Included by: Base

Base

 * Overview: Basically a high-level outline of definition files and what essentially becomes the content for the static bank. Not really any code in this file, just includes to other files.
 * File: Routines\BASE_4_5\System\Base.asm
 * Define: SCR_BASE
 * Included by: Main
 * Includes:
 * Header
 * System Constants
 * GameData\macroList.asm
 * Overview: Loads the list of macros for the assembler to reference when assembling your game.
 * See section on Macros.
 * Memory Map
 * Sound\ggsound.inc
 * Assign Banks
 * Reset
 * Initialize
 * NMI
 * Main Game Loop
 * GameData\ScriptTables.asm
 * Math Functions
 * Load Subroutines
 * Vectors

Extra SFX

 * Overview: a place to put extra SFX I guess in case you are running out of room in the sound bank. While there are some labels in here, everything is commented out.
 * File: Routines\BASE_4_5\Game\Subroutines\ExtraSFX.asm
 * Define: SCR_EXTRA_SOUND_EFFECTS
 * Included by: Uh… doesn’t look like it’s included by anything so even if you put something in here, it won’t end up in your game.

Bank00 - ScreenData 0 to Bank0F - ScreenData 15

 * Overview: Holds the nametable, collision, screen info, and attribute data data for all the screens. Banks 00 to 07 are the overworld screens, banks 08 to 0F are the underworld screens. Each bank contains two rows of standard screens or 1 row of “High Resolution” screens.
 * File: Routines\BASE_4_5\System\BankData\Bank0X.asm
 * Define: SCR_BANK0X
 * Included in: Assign Banks
 * Includes 3 files for each XX numbered screen: ScreenData\Nametables\Screen_Over_XX.nam, ScreenData\CollisionTables\Screen_Over_XX.col, and ScreenData\AttributeTables\Screen_Over_XX.att. The col files also hold the screen info data.

Bank10 - CHR bank 0

 * Overview: Holds the CHR files for Background tiles 00 to 05, Screen Specific tiles 00 to 09, and Path Tiles 00 to 07.
 * File: Routines\BASE_4_5\System\BankData\Bank10.asm
 * Define: SCR_BANK10
 * Included by: Assign Banks
 * Included files are located in the Graphics\Backgrounds\ folder.

Bank11 - CHR bank 1

 * Overview: Holds the CHR files for Background tiles 06 to 11, Screen Specific tiles 10 to 19, and *Path Tiles 08 to 15.
 * File: Routines\BASE_4_5\System\BankData\Bank11.asm
 * Define: SCR_BANK11
 * Included by: Assign Banks
 * Included files are located in the Graphics\Backgrounds\ folder.

Bank12 - CHR bank 2

 * Overview: Holds the CHR files for Background tiles 12 to 17, Screen Specific tiles 20 to 29, and Path Tiles 16 to 23.
 * File: Routines\BASE_4_5\System\BankData\Bank12.asm
 * Define: SCR_BANK12
 * Included by: Assign Banks
 * Included files are located in the Graphics\Backgrounds\ folder.

Bank13 - Monster CHR bank 0

 * Overview: Holds the CHR files for Monster tiles 0_00 to 0_07
 * File: Routines\BASE_4_5\System\BankData\Bank13.asm
 * Define: SCR_BANK13
 * Included by: Assign Banks
 * Included files are located in the Graphics\Sprites\ folder.

Bank14 - Monster CHR bank 1

 * Overview: Holds the CHR files for Monster tiles 1_00 to 1_07
 * File: Routines\BASE_4_5\System\BankData\Bank14.asm
 * Define: SCR_BANK14
 * Included by: Assign Banks
 * Included files are located in the Graphics\Sprites\ folder.

Bank15 - Game Object CHR bank

 * Overview: Holds the CHR file for the GameObjectTiles.
 * File: Routines\BASE_4_5\System\BankData\Bank15.asm
 * Define: SCR_BANK15
 * Included by: Assign Banks
 * Included files are located in the Graphics\Sprites\ folder.

Bank16 - Reference Tables

 * Overview: Mostly holds tables for pointers to various things like graphical information, some *routines, and text. Also has some data for text groups, palettes, and some luts.
 * File: Routines\BASE_4_5\System\BankData\Bank16.asm
 * Define: SCR_BANK16
 * Included by: Assign Banks
 * Includes:
 * ScreenData\npcTextGroup.dat
 * ScreenData\PaletteInfo.pal
 * ScreenData\ObjectPals.pal
 * GameData\ObjectStatusPointers.asm
 * GameData\ObjectBehaviorLuts.asm

Bank17 - Object Behaviours

 * Overview: Most of the routines in the Behaviors folder in the script settings end up here.
 * File: Routines\BASE_4_5\System\BankData\Bank17.asm
 * Define: SCR_BANK17
 * Included by: Assign Banks
 * Includes:
 * Change AI Step
 * Change Anim Step
 * Change Attribute
 * Change Background Palette
 * Change Bakcground Tile
 * Change Game State
 * Change Game SubState
 * Change Gravity
 * Change Speed
 * Change Sprite Priority
 * Change Sprite Palette
 * Change Background Subpalette
 * Check Global Var
 * Check Local Var
 * Create Object
 * Destroy Current Object
 * Destroy Selected Object
 * Draw Sprite
 * Flip AI Bits
 * Move Towards Object
 * Move Towards Position
 * No Behavior
 * Open Box
 * Play Music
 * Play Sound
 * Reverse Direction
 * Run Code
 * Run Subroutine
 * Set Global Var
 * Set Local Var
 * Stop Sounds
 * Update Hud
 * Update Position

Bank18 - Overflow Logic

 * Overview: There are various routines in here. About half of them you will find in the Script Settings, but the other half are directly written into this file.
 * File: Routines\BASE_4_5\System\BankData\Bank18.asm
 * Define: SCR_BANK18
 * Different modules use different variants of this bank file.
 * Included by Assign Banks
 * Includes:
 * ScreenData\ObjectData\SolidEdgeObjectReaction.dat
 * Sprite Pre-Draw
 * Pickup Script
 * Sprite Post-draw
 * Tile Collision State
 * Handle Tile Collisions
 * Update State
 * Handle Object Updates
 * Solid Reaction 1 to 7
 * doMoveTowardsPoint.asm
 * GameData\HUD_UPDATES.dat
 * Additional Routines:
 * doTileObservationLogic
 * doHandleBounds_bank18
 * doEraseBox_bank18
 * Commented out
 * doDrawHud_bank18
 * doUpdateHudElement_bank18
 * getPathInfo
 * Commented out
 * Alternate locations:
 * Game\Subroutines\doGetPathInfo.asm
 * Game\MOD_shooter\Banks\Bank18_shooter.asm
 * Game\MOD_Brawlerbase\Banks\Bank18_BralwerBase.asm
 * Look Up Tables:
 * TileTableLo and Hi
 * octant_adjust
 * atan_tab
 * log2_tab
 * AngleToHVelLo
 * AngleToHVelLo

Bank19 - Text

 * Overview: This is where text is stored.
 * File: Routines\BASE_4_5\System\BankData\Bank19.asm
 * Define: SCR_BANK19
 * Included by: Assign Banks
 * Includes ScreenData\npcText01.dat

Bank1A - Empty

 * Overview: It’s empty except for an example of the new way of including additional text.
 * File: Routines\BASE_4_5\System\BankData\Bank1A.asm
 * Define: SCR_BANK1A
 * Included by: Assign Banks

Bank1B - Music

 * Overview: Holds the GGSound engine, the music and sound data that you import, and the routine for music updates that runs in the main loop.
 * File: Routines\BASE_4_5\System\BankData\Bank1B.asm
 * Define: SCR_BANK1B
 * Included by: Assign Banks
 * Includes:
 * System\ggsound.asm
 * Sound\AllSongs_WithSFX.asm

Bank1C - Luts, Anim, Physics

 * Overview: Object data that was set in NESmaker. Routines for handling actions, animations, and sprite drawing. Object Collisions routines, though the rest of physics are in another bank. Hurt routines.
 * File: Routines\BASE_4_5\System\BankData\Bank1C.asm
 * Define: SCR_BANK1C
 * Included by: Assign Banks
 * Includes:
 * ScreenData\ObjectInfo.dat
 * ScreenData\ObjectPointers.pnt
 * ScreenData\ObjectData\ObjectLutTable.dat
 * Game\Subroutines\TimerEndScripts.asm
 * Game\Subroutines\doObjectAction.asm
 * Handle Drawing Sprites
 * Handle Sprite Animation Timer
 * Update Action Timer
 * Object Collision State
 * Handle Object Collisions
 * Handle Player Hurt
 * Handle Monster Hurt
 * Look Up Tables:
 * ObjectLoSpriteAddressLo and Hi
 * ObjectHiSpriteAddressLo and Hi

Bank1D - Empty

 * Overview: It’s empty.
 * File: Routines\BASE_4_5\System\BankData\Bank1D.asm
 * Define: SCR_BANK1D
 * Included by: Assign Banks

Bank1E - Extra CHR bank

 * Overview: Just has the CHR file for the HUD tiles.
 * File: Routines\BASE_4_5\System\BankData\Bank1E.asm
 * Define: SCR_BANK1E
 * Included by: Assign Banks
 * Includes Graphics\Backgrounds\CHR_HudTiles.chr

Behaviors
I think the distinction between a behavior and a subroutine is that behaviors are actually the meat of the Macros. My guess is that Joe separated this code out of the macro files is because the problem with macro is that they essentially copy and paste the code into the final build. If a macro is used several times, that means you end up with the same code duplicated all over the place and wasting space. This separation also has the added benefit of making it easier to debug with Mesen if you’ve imported the labels. It looks like some of these files are essentially blank so maybe Joe hasn’t updated all the macros he intends to yet, or it wasn’t practical to do it for every macro. The downside to having this separation is that you have to be sure you are in the correct bank in order to use the macro. It seems that all of these routines just return except for four of them. See section on Macros.

Change AI Step

 * Overview: Does nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeAIstep.asm
 * Define: SCR_CHANGE_AI_STEP
 * Included by: Bank17 - Object Behaviours

Change Anim Step

 * Overview: Does nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeAnimationStep.asm
 * Define: SCR_CHANGE_ANIMATION_STEP
 * Included by: Bank17 - Object Behaviours

Change Attribute

 * Overview: Does nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeAttribute.asm
 * Define: SCR_CHANGE_ATTRIBUTE
 * Included by: Bank17 - Object Behaviours

Change Background Palette

 * Overview: Does nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeBackgroundPalette.asm
 * Define: SCR_CHANGE_BACKGROUND_PALETTE
 * Included by: Bank17 - Object Behaviours

Change Bakcground Tile

 * Note: The name is misspelled. You can correct it and it will be fine, but I kept it this way because that's how it comes by default.
 * Overview: Does nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeBackgroundTile.asm
 * Define: SCR_CHANGE_BACKGROUND_TILE
 * Included by: Bank17 - Object Behaviours

Change Facing Direction

 * Overview:
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeFacingDirection.asm
 * Define: SCR_CHANGE_FACING_DIRECTION
 * Included by: Load Subroutines

Change Game State

 * Overview: Does nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeGameState.asm
 * Define: SCR_CHANGE_GAME_STATE
 * Included by: Bank17 - Object Behaviours

Change Game SubState

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeGameSubState.asm
 * Define: SCR_CHANGE_GAME_SUB_STATE
 * Included by: Bank17 - Object Behaviours

Change Gravity

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeGravity.asm
 * Define: SCR_CHANGE_GRAVITY
 * Included by: Bank17 - Object Behaviours

Change Speed

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeSpeed.asm
 * Define: SCR_CHANGE_SPEED
 * Included by: Bank17 - Object Behaviours

Change Sprite Priority

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeSpritePriority.asm
 * Define: SCR_CHANGE_SPRITE_PRIORITY
 * Included by: Bank17 - Object Behaviours

Change Sprite Palette

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeSpriteSubpalette.asm
 * Define: SCR_CHANGE_SPRITE_PALETTE
 * Included by: Bank17 - Object Behaviours

Change Background Subpalette

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oChangeSubpalette.asm
 * Define: SCR_CHANGE_SUBPALETTE
 * Included by: Bank17 - Object Behaviours

Check Global Var

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oCheckGlobalVariable.asm
 * Define: SCR_CHECK_GLOBAL_VARIABLE
 * Included by: Bank17 - Object Behaviours

Check Local Var

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oCheckLocalVariable.asm
 * Define: SCR_CHECK_LOCAL_VARIABLE
 * Included by: Bank17 - Object Behaviours

Create Object

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oCreateObjectAtPosition.asm
 * Define: SCR_CREATE_OBJECT
 * Included by: Bank17 - Object Behaviours

Destroy Current Object

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oDestroyCurrentObject.asm
 * Define: SCR_DESTROY_CURRENT_OBJECT
 * Included by: Bank17 - Object Behaviours

Destroy Select Object

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oDestroySelectedObject.asm
 * Define: SCR_DESTROY_SELECTED_OBJECT
 * Included by: Bank17 - Object Behaviours

Draw Sprite

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oDrawSprite.asm
 * Define: SCR_DRAW_SPRITE
 * Included by: Bank17 - Object Behaviours

Flip AI Bits

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oFlipAiBits.asm
 * Define: SCR_FLIP_AI_BITS
 * Included by: Bank17 - Object Behaviours

Move Towards Object

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oMoveTowardsObject.asm
 * Define: SCR_MOVE_TOWARES_POSITION
 * Included by: Bank17 - Object Behaviours

Move Towards Position

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oMoveTowardsPosition.asm
 * Define: SCR_MOVE_TOWARDS_OBJECT
 * Included by: Bank17 - Object Behaviours

No Behavior

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oNoBehavior.asm
 * Define: SCR_NO_BEHAVIOR
 * Included by: Bank17 - Object Behaviours

Open Box

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oOpenBox.asm
 * Define: SCR_OPEN_BOX
 * Included by: Bank17 - Object Behaviours

Play Music

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oPlayMusic.asm
 * Define: SCR_PLAY_MUSIC
 * Included by: Bank17 - Object Behaviours

Play Sound

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oPlaySoundEffect.asm
 * Define: SCR_PLAY_SFX
 * Included by: Bank17 - Object Behaviours

Reverse Direction

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oReverseDirection.asm
 * Define: SCR_REVERSE_DIRECTION
 * Included by: Bank17 - Object Behaviours

Run Code

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oRunCode.asm
 * Define: SCR_RUN_CODE
 * Included by: Bank17 - Object Behaviours

Run Subroutine
Overview: Does Nothing


 * File: Routines\BASE_4_5\System\ObjectBehaviors\oRunSubroutine.asm
 * Define: SCR_RUN_SUBROUTINE
 * Included by: Bank17 - Object Behaviours

Set Global Var

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oSetGlobalVariable.asm
 * Define: SCR_SET_GLOBAL_VARIABLE
 * Included by: Bank17 - Object Behaviours

Set Local Var

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oSetLocalVariable.asm
 * Define: SCR_SET_LOCAL_VARIABLE
 * Included by: Bank17 - Object Behaviours

Start Moving

 * Overview:
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oStartMovingInADirection.asm
 * Define: SCR_START_MOVING
 * Included by: Load Subroutines

Stop Sounds

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oStopAllSounds.asm
 * Define: SCR_STOP_SOUNDS
 * Included by: Bank17 - Object Behaviours

Stop Moving

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oStopMoving.asm
 * Define: SCR_STOP_MOVING
 * Included by: Load Subroutines

Update Hud

 * Overview: Does Nothing
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oUpdateHud.asm
 * Define: SCR_UPDATE_HUD
 * Included by: Bank17 - Object Behaviours

Update Position

 * Overview:
 * File: Routines\BASE_4_5\System\ObjectBehaviors\oUpdatePosition.asm
 * Define: SCR_UPDATE_POSITION
 * Included by: Load Subroutines

Initialize

 * Overview: Runs immediately after Reset. Does initial set up. Creates the Player Object
 * File: Routines\BASE_4_5\Game\Initialization.asm
 * Define: SCR_INITIALIZE
 * Included by: Base
 * Includes:
 * ScreenData\init.ini
 * GameData\InitializationScripts\hudVarInits.asm

Main Game Loop

 * Overview: The heart of the game. The game will loop over this code while the game is running to consistently update all the processes that make the game work. See Program Flow
 * File: Routines\BASE_4_5\Game\MainGameLoop.asm
 * Define: SCR_MAIN_LOOP
 * Included by: Base
 * Includes Handle Game Timer

Handle Input Scripts

 * Overview: This is blank by default. I guess input gets handled elsewhere. Nothing is including this define.
 * File: Routines\BASE_4_5\Game\Subroutines\doHandleInputScripts.asm
 * Define: SCR_HANDLE_INPUT_SCRIPTS

Extra Screen Load

 * Overview: I think this is where you are supposed to put the code for checking screen flags.
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Game\extraScreenLoad_PlatformBase.asm
 * Define: SCR_EXTRA_SCREEN_LOAD
 * Included by: doLoadScreen.asm

Post screen load

 * Overview: Blank by default, but in the advanced MetroidVania tutorial it is used as a place for handling lock blocks.
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_POST_SCREEN_LOAD
 * Included by: doLoadScreen.asm

Pickup Script

 * Overview: Blank by default.
 * File: Routines\BASE_4_5\Game\MOD_MetroidVania\Game\pickup_MetroidVania.asm
 * Define: SCR_PICKUP_SCRIPTS
 * Included by: Bank18 - Overflow Logic

Sprite Pre-Draw

 * Overview: Place code here to draw additional sprites before update calculations are made.
 * File: Routines\BASE_4_5\Game\Subroutines\doSpritePreDraw.asm
 * Define: SCR_SPRITE_PREDRAW
 * Included by: Bank18 - Overflow Logic
 * Includes: Handle Drawing Sprite Hud

Sprite Post-Draw

 * Overview: Place code here to draw additional sprites after update calculations are made. Blank by default.
 * File: Routines\BASE_4_5\Game\Subroutines\doSpritePostDraw.asm
 * Define: SCR_SPRITE_POSTDRAW
 * Included by: Bank18 - Overflow Logic

Handle Game Timer

 * Overview: Place code here to handle an in game timer as demonstrated in the Arcade Platformer Advanced Tutorial. Blank by default.
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_HANDLE_GAME_TIMER
 * Included by: Main Game Loop

Extra Tables

 * Overview: I guess put extra tables here. So far there is just a hi lo table with one entry called TextLibrary. I guess this is for the extra text method using the text in Bank 1A.
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Game\ExtraTables_PlatformerBase.asm
 * Define: SCR_TABLES
 * Included by: ToggleTables.asm

Menu Management

 * Overview: My deductive reasoning skill lead me to believe this is for making menus. Blank by default
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_MENU_MANAGER
 * Included by: Load Subroutines

Tile Types

 * Folder holding up to 16 tile types, see Tile Types section
 * Folder: Routines\BASE_4_5\Game\TileScripts\
 * Define: SCR_TILE_XX

Handle Player Hurt

 * Overview: Code for hurting the player because there is something wrong with you.
 * File: Routines\BASE_4_5\Game\MOD_MetroidVania\Common\hurtPlayer_MetroidVania.asm
 * Define: SCR_HANDLE_PLAYER_HURT
 * Included by: Bank1C - Luts, Anim, Physics

Handle Monster Hurt

 * Overview: Code for hurting monsters, but if you created the monsters, what does that make you?
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Common\hurtMonster_PlatformBase.asm
 * Define: SCR_HANDLE_MONSTER_HURT
 * Included by: Bank1C - Luts, Anim, Physics

Handle Drawing Hud

 * Overview: Calls the routine for drawing a background HUD in Bank 18. Ultimate gets called from the macro DrawHud called in the doLoadScreen.asm routine.
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_HANDLE_HUD
 * Included by: Load Subroutines
 * Includes: GameData\HUD_INCLUDES.dat

Handle Drawing Sprite Hud

 * Overview: Where to put the sprite hud code. Blank by default.
 * File: Routines\BASE_4_5\Game\MOD_MetroidVania\Common\doDrawSpriteHud_metroidvania.asm
 * Define: SCR_DRAW_SPRITE_HUD
 * Included by: Sprite Pre-Draw

AI Behaviors

 * Folder holding up to 16 AI behaviours, see AI Behaviors section
 * Folder: Routines\BASE_4_5\Game\Subroutines\
 * Define: SCR_AI_X
 * AI_edge_reactions
 * Folder holding up to 8 Edge Reactions, see Reactions section
 * AI_Solid_reactions
 * Folder holding up to 8 Solid Reactions, see Reactions section

Handle Physics

 * Overview: Handles physics.
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Subroutines\doHandlePhysics_PlatformBase.asm
 * Define: SCR_HANDLE_PHYSICS
 * Included by: Handle Objects

Handle Camera

 * Overview:
 * File: Routines\BASE_4_5\Game\MOD_MetroidVania\Subroutines\doUpdateCamera.asm
 * Define: SCR_HANDLE_CAMERA
 * Included by: Load Subroutines

Handle Drawing Sprites

 * Overview:
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Subroutines\doDrawSprites_PlatformBase.asm
 * Define: SCR_HANDLE_DRAWING_SPRITES
 * Included by: Bank1C - Luts, Anim, Physics
 * Includes:

Handle Objects

 * Overview:
 * File: Routines\BASE_4_5\Game\Subroutines\doHandleObjects_withinCamera.asm
 * Define: SCR_HANDLE_OBJECTS
 * Included by: Load Subroutines
 * Includes:
 * Destroy State
 * Create State
 * Input State
 * Handle Physics
 * Draw State

Handle Object Updates

 * Overview:
 * File: Routines\BASE_4_5\Game\Subroutines\doHandleUpdateObjects.asm
 * Define: SCR_HANDLE_OBJECT_UPDATE
 * Included by: Bank18 - Overflow Logic

Handle Tile Collisions

 * Overview:
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Subroutines\doHandleTileCollisions_PlatformBase.asm
 * Define: SCR_HANDLE_TILE_COLLISIONS
 * Included by: Bank18 - Overflow Logic

Handle Object Collisions

 * Overview:
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Subroutines\doHandleObjectCollisions_PlatformerBase.asm
 * Define: SCR_HANDLE_OBJECT_COLLISIONS
 * Included by: Bank1C - Luts, Anim, Physics
 * Includes: Pickup Script

Load Palettes

 * Overview:
 * File: Routines\BASE_4_5\Game\DataLoadScripts\LoadBackgroundPalettes_NMI.asm
 * Define: SCR_LOAD_PALETTES
 * Included by: NMI

Load Sprite Palettes

 * Overview:
 * File: Routines\BASE_4_5\Game\DataLoadScripts\LoadSpritePalettes_NMI.asm
 * Define: SCR_LOAD_SPRITE_PALETTES
 * Included by: NMI

Create State

 * Overview: Retrieves object health data and stores it in the current object.
 * File: Routines\BASE_4_5\Game\MOD_PlatformerBase\Subroutines\doCreateState_addExtraVariables_PlatformBase.asm
 * Define: SCR_CREATE_STATE
 * Included by: Handle Objects

Input State

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doInputState.asm
 * Define: SCR_INPUT_STATE
 * Included by: Handle Objects

Update State

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doUpdateState.asm
 * Define: SCR_UPDATE_STATE
 * Included by: Bank18 - Overflow Logic

Draw State

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doDrawState.asm
 * Define: SCR_DRAW_STATE
 * Included by: Handle Objects

Tile Collision State

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doTileCollisionState.asm
 * Define: SCR_TILE_COLLISION_STATE
 * Included by: Bank18 - Overflow Logic

Object Collision State

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doObjectCollisionState.asm
 * Define: SCR_OBJECT_COLLISION_STATE
 * Included by: Bank1C - Luts, Anim, Physics

Bounds

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doBoundsState.asm
 * Define: SCR_BOUNDS_STATE
 * Included by: Commented out in Handle Objects

Timer

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doTimerState.asm
 * Define: SCR_TIMER_STATE
 * Included by: Commented out in Handle Objects

Destroy State

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\doDestroyState.asm
 * Define: SCR_DESTROY_STATE
 * Included by: Handle Objects

Handle Sprite Animation Timer

 * Overview: “Check to see if this object in this state animates. If the animation speed is zero, it does not animate.”
 * File: Routines\BASE_4_5\Game\Subroutines\doUpdateSpriteTimer.asm
 * Define: SCR_UPDATE_SPRITE_TIMER
 * Included by: Bank1C - Luts, Anim, Physics

Handle H Scroll

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_HANDLE_H_SCROLL
 * Included by: Commented out in Handle Objects

Load Scroll Column

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_LOAD_SCROLL_COLUMN
 * Included by: Load Subroutines

Handle Update Tiles

 * Overview: NMI loading of column of scroll tiles. “This routine will spread over two frames. The offset for where in the column is being drawn will be held in scrollOffsetCounter. It will load 32 (#$20) tiles per frame, but not quite, because the screen is only 240 px high. So there are 3 reads per tile, 12 per metatile...12x15 rows = 180.”
 * File: Routines\BASE_4_5\Game\Subroutines\doUpdateScrollColumn.asm
 * Define: SCR_UPDATE_SCROLL_COLUMN
 * Included by: NMI

Handle V Scroll

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_HANDLE_V_SCROLL
 * Included by: Commented out in Handle Objects

Handle Screen Update

 * Overview:
 * File: Routines\BASE_4_5\Game\Subroutines\doHandleUpdateScreen.asm
 * Define: SCR_HANDLE_SCREEN_UPDATE
 * Included by: Load Subroutines

Update Action Timer

 * Overview:
 * File: Routines\BASE_4_5\Game\Subroutines\doUpdateActionTimer.asm
 * Define: SCR_UPDATE_ACTION_TIMER
 * Included by: Bank1C - Luts, Anim, Physics

Compare Object Boxes

 * Overview:
 * File: Routines\BASE_4_5\Game\Subroutines\doCompareBoundingBoxes_multiScreen.asm
 * Define: SCR_COMPARE_BBOX
 * Included by: Bank1C - Luts, Anim, Physics

Handle Drawing Boxes

 * Overview:
 * File: Routines\BASE_4_5\Game\Subroutines\doDrawBox.asm
 * Define: SCR_DRAW_BOX
 * Included by: Load Subroutines

Handle Path Data

 * Overview: Does nothing
 * File: Routines\BASE_4_5\Game\Subroutines\blank.asm
 * Define: SCR_HANDLE_PATHS
 * Included by: doLoadNametableDataFull.asm