-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
052d1dc
commit ef23130
Showing
16 changed files
with
1,041 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
------------------------------------------------------------------------------- | ||
-- @module Animation | ||
|
||
|
||
------------------------------------------------------------------------------- | ||
-- Gets or sets a value of the SMBX Memory by the offset of the SMBX effect struct. | ||
-- If you write the third parameter, then you will set the value.<br> | ||
-- Example of setting a field with mem: | ||
-- | ||
-- myAnimation:mem(0x3C, FIELD_WORD, 4) | ||
-- | ||
-- Example of getting the value of a field with mem: | ||
-- | ||
-- local animationTimer = myAnimation:mem(0x3C, FIELD_WORD) | ||
-- | ||
-- @function [parent=#Animation] mem | ||
-- @param self | ||
-- @param #number address The Memory offset of the struct to fetch or set. | ||
-- @param #number fieldtype The field type of the value. | ||
-- @param value If this value is passed, then the value of this memory offset will be set. | ||
-- @return The value of the struct offset | ||
|
||
------------------------------------------------------------------------------- | ||
-- Returns the amount of running Effects in the level. | ||
-- @function [parent=#Animation] count | ||
-- @return #number The number of running Effects in the level. | ||
|
||
------------------------------------------------------------------------------- | ||
-- Returns running Effects of the level. | ||
-- @function [parent=#Animation] get | ||
-- @param ids [Optional] The ids to be filtered. Can be a single number or a table with numbers of ids to be filtered out. | ||
-- @return #list<#Animation> Returns a table with all Effects in the level. | ||
|
||
------------------------------------------------------------------------------- | ||
-- Spawns/Runs a new Effect. | ||
-- @function [parent=#Animation] spawn | ||
-- @param #number effectID The id of the new Effect, which should be spawned. | ||
-- @param #number x The x position of the new Effect. | ||
-- @param #number y The y position of the new Effect. | ||
-- @param #number animationFrame The selected animation frame of new effect.<br>This Animation frame (as parameter) is not the same as Animation.animationFrame! | ||
-- @return #Animation The spawned Effect-Object. This can be used to modify additional behaviour. | ||
|
||
------------------------------------------------------------------------------- | ||
-- The id of the Effect. | ||
-- @field [parent=#Animation] #number id | ||
|
||
------------------------------------------------------------------------------- | ||
-- The x coordinate of the Animation. | ||
-- @field [parent=#Animation] #number x | ||
|
||
------------------------------------------------------------------------------- | ||
-- The y coordinate of the Animation. | ||
-- @field [parent=#Animation] #number y | ||
|
||
------------------------------------------------------------------------------- | ||
-- The x-speed of the Animation. | ||
-- @field [parent=#Animation] #number speedX | ||
|
||
------------------------------------------------------------------------------- | ||
-- The y-speed of the Animation. | ||
-- @field [parent=#Animation] #number speedY | ||
|
||
------------------------------------------------------------------------------- | ||
-- The width of the Animation. | ||
-- @field [parent=#Animation] #number width | ||
|
||
------------------------------------------------------------------------------- | ||
-- The height of the Animation. | ||
-- @field [parent=#Animation] #number height | ||
|
||
------------------------------------------------------------------------------- | ||
-- The timer of the Animation. This value might be ignored, depending on the type of effect. | ||
-- @field [parent=#Animation] #number timer | ||
|
||
------------------------------------------------------------------------------- | ||
-- The current animation frame. This might be used also as a timer. | ||
-- @field [parent=#Animation] #number animationFrame | ||
|
||
------------------------------------------------------------------------------- | ||
-- The included npc id of the effect. This value is used for effects like yoshis egg. | ||
-- @field [parent=#Animation] #number npcID | ||
|
||
------------------------------------------------------------------------------- | ||
-- A boolean flag if only the mask should be drawn. This value is used for the cheat 'shadowmario'. | ||
-- @field [parent=#Animation] #boolean drawOnlyMask | ||
|
||
|
||
return nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
------------------------------------------------------------------------------- | ||
-- @module BGO | ||
|
||
------------------------------------------------------------------------------- | ||
-- Gets or sets a value of the SMBX Memory by the offset of the SMBX BGO struct. | ||
-- If you write the third parameter, then you will set the value.<br> | ||
-- Example of setting a field with mem: | ||
-- | ||
-- myBGO:mem(0x04, FIELD_WORD, -1) | ||
-- | ||
-- Example of getting the value of a field with mem: | ||
-- | ||
-- local bgoIsHidden = myBGO:mem(0x04, FIELD_WORD) | ||
-- | ||
-- @function [parent=#BGO] mem | ||
-- @param self | ||
-- @param #number address The Memory offset of the struct to fetch or set. | ||
-- @param #number fieldtype The field type of the value. | ||
-- @param value If this value is passed, then the value of this memory offset will be set. | ||
-- @return The value of the struct offset | ||
|
||
------------------------------------------------------------------------------- | ||
-- Returns the amount of BGO in the level. | ||
-- @function [parent=#BGO] count | ||
-- @return #number The number of BGOs in the level. | ||
|
||
------------------------------------------------------------------------------- | ||
-- Returns BGO of the level. | ||
-- @function [parent=#BGO] get | ||
-- @param ids [Optional] The ids to be filtered. Can be a single number or a table with numbers of ids to be filtered out. | ||
-- @return #list<#BGO> Returns a table with all BGOs in the level. | ||
|
||
------------------------------------------------------------------------------- | ||
-- The id of the BGO. | ||
-- @field [parent=#BGO] #number id | ||
|
||
------------------------------------------------------------------------------- | ||
-- Boolean flag if the BGO is invisible. | ||
-- @field [parent=#BGO] #number isHidden | ||
|
||
------------------------------------------------------------------------------- | ||
-- The x coordinate of the BGO. | ||
-- @field [parent=#BGO] #number x | ||
|
||
------------------------------------------------------------------------------- | ||
-- The y coordinate of the BGO. | ||
-- @field [parent=#BGO] #number y | ||
|
||
------------------------------------------------------------------------------- | ||
-- The x-speed of the BGO. | ||
-- @field [parent=#BGO] #number speedX | ||
|
||
------------------------------------------------------------------------------- | ||
-- The y-speed of the BGO. | ||
-- @field [parent=#BGO] #number speedY | ||
|
||
------------------------------------------------------------------------------- | ||
-- The width of the BGO. | ||
-- @field [parent=#BGO] #number width | ||
|
||
------------------------------------------------------------------------------- | ||
-- The height of the BGO. | ||
-- @field [parent=#BGO] #number height | ||
|
||
------------------------------------------------------------------------------- | ||
-- The layer object of the BGO. | ||
-- @field [parent=#BGO] #Layer layer | ||
|
||
------------------------------------------------------------------------------- | ||
-- The layer name of the BGO. | ||
-- @field [parent=#BGO] #string layerName | ||
|
||
|
||
return nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
------------------------------------------------------------------------------- | ||
-- @module Block | ||
|
||
------------------------------------------------------------------------------- | ||
-- Gets or sets a value of the SMBX Memory by the offset of the SMBX Block struct. | ||
-- If you write the third parameter, then you will set the value.<br> | ||
-- Example of setting a field with mem: | ||
-- | ||
-- myBlock:mem(0x1C, FIELD_WORD, -1) | ||
-- | ||
-- Example of getting the value of a field with mem: | ||
-- | ||
-- local bgoIsHidden = myBlock:mem(0x1C, FIELD_WORD) | ||
-- | ||
-- @function [parent=#Block] mem | ||
-- @param self | ||
-- @param #number address The Memory offset of the struct to fetch or set. | ||
-- @param #number fieldtype The field type of the value. | ||
-- @param value If this value is passed, then the value of this memory offset will be set. | ||
-- @return The value of the struct offset | ||
|
||
------------------------------------------------------------------------------- | ||
-- Returns the amount of blocks in the level. | ||
-- @function [parent=#Block] count | ||
-- @return #number The number of blocks in the level. | ||
|
||
------------------------------------------------------------------------------- | ||
-- Returns blocks of the level. | ||
-- @function [parent=#Block] get | ||
-- @param ids [Optional] The ids to be filtered. Can be a single number or a table with numbers of ids to be filtered out. | ||
-- @return #list<#Block> Returns a table with all blocks in the level. | ||
|
||
------------------------------------------------------------------------------- | ||
-- Makes a collision check and returns the side of the collision. | ||
-- @function [parent=#Block] collidesWith | ||
-- @param self | ||
-- @param #Player player The player where the collison check should be done. | ||
-- @return #number The side of the collision.<br>0 = no collision<br>1 = Player on top of block<br>2 = Player touching right side<br>3 = Player touching bottom<br>4 = Player touching left side | ||
|
||
------------------------------------------------------------------------------- | ||
-- The x coordinate of the block. | ||
-- @field [parent=#Block] #number x | ||
|
||
------------------------------------------------------------------------------- | ||
-- The y coordinate of the block. | ||
-- @field [parent=#Block] #number y | ||
|
||
------------------------------------------------------------------------------- | ||
-- The x-speed of the block. | ||
-- @field [parent=#Block] #number speedX | ||
|
||
------------------------------------------------------------------------------- | ||
-- The y-speed of the block. | ||
-- @field [parent=#Block] #number speedY | ||
|
||
------------------------------------------------------------------------------- | ||
-- The id of the block. | ||
-- @field [parent=#Block] #number id | ||
|
||
------------------------------------------------------------------------------- | ||
-- Boolean flag if the block is invisible. | ||
-- @field [parent=#Block] #number invisible | ||
|
||
------------------------------------------------------------------------------- | ||
-- Boolean flag if the block is slippery. | ||
-- @field [parent=#Block] #number slippery | ||
|
||
------------------------------------------------------------------------------- | ||
-- [READONLY] The layer name of the npc. | ||
-- @field [parent=#Block] #VBStr layerName | ||
|
||
------------------------------------------------------------------------------- | ||
-- [READONLY] The layer object of the npc. | ||
-- @field [parent=#Block] #Layer layerObj | ||
|
||
|
||
return nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
------------------------------------------------------------------------------- | ||
-- @module Data | ||
|
||
|
||
------------------------------------------------------------------------------- | ||
-- This data will be saved in the level custom folder and can be only accessed by the current level. | ||
-- @field [parent=#Data] #number DATA_LEVEL | ||
|
||
------------------------------------------------------------------------------- | ||
-- This data will be saved in the episode folder and can be only accessed by the current world or level. | ||
-- @field [parent=#Data] #number DATA_WORLD | ||
|
||
------------------------------------------------------------------------------- | ||
-- This data will be saved in the {SMBX-Path}/worlds folder and can be accessed from every world or level. | ||
-- @field [parent=#Data] #number DATA_GLOBAL | ||
|
||
------------------------------------------------------------------------------- | ||
-- Constructs a new Data class. | ||
-- @callof #Data | ||
-- @param self | ||
-- @param #number dataLocation This value can be Data.DATA_LEVEL, Data.DATA_WORLD or Data.DATA_GLOBAL | ||
-- @param #string sectionName The sectionName of the data file. | ||
-- @param #boolean useSaveSlot This boolean flags decides if the data file depends on the save slot. | ||
-- @return #Data The new Data class. | ||
|
||
|
||
------------------------------------------------------------------------------- | ||
-- Will set a value in the dataset. | ||
-- @function [parent=#Data] set | ||
-- @param self | ||
-- @param #string key The key for the value | ||
-- @param #string value The value which should be set | ||
|
||
------------------------------------------------------------------------------- | ||
-- Will return one or all values. | ||
-- If no argument is passed then a table with [key] = value is returned: | ||
-- | ||
-- local allData = myData:get() | ||
-- local aValue = allData["aKey"] | ||
-- | ||
-- or if you pass an argument: | ||
-- | ||
-- local aValue = myData:get("aKey") | ||
-- | ||
-- @function [parent=#Data] get | ||
-- @param self | ||
-- @param #string key The key for the value | ||
-- @return #string The value of the key. | ||
-- @return #map<#string, #string> A table with [key] = value | ||
|
||
------------------------------------------------------------------------------- | ||
-- Saves the data. | ||
-- @function [parent=#Data] save | ||
-- @param self | ||
-- @param #string sectionName [OPTIONAL] A new section name. | ||
|
||
------------------------------------------------------------------------------- | ||
-- The save location of the data. | ||
-- @field [parent=#Data] #number dataType Can be Data.DATA_LEVEL, Data.DATA_WORLD or Data.DATA_GLOBAL | ||
|
||
------------------------------------------------------------------------------- | ||
-- The section name of the data. | ||
-- @field [parent=#Data] #string sectionName | ||
|
||
------------------------------------------------------------------------------- | ||
-- If the save slot number should be used when saving. | ||
-- @field [parent=#Data] #boolean useSaveSlot | ||
|
||
|
||
return nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
------------------------------------------------------------------------------- | ||
-- @module Graphics | ||
|
||
------------------------------------------------------------------------------- | ||
-- Toggels the hud on/off | ||
-- @function [parent=#Graphics] activate | ||
-- @param #boolean showHud If true, then the hud will be shown. | ||
|
||
------------------------------------------------------------------------------- | ||
-- Loads a image in the resource memory at <i>resourceNumber</i>. You can also set the transparent Color. | ||
-- @function [parent=#Graphics] loadImage | ||
-- @param #string filename The filename of the image file relative to the custom folder. Can be also a absolute path. | ||
-- @param #number resourceNumber The ID for the resource number. Can be selected freely. | ||
-- @param #number transparentColor The color-code, which should be transparent. | ||
|
||
------------------------------------------------------------------------------- | ||
-- Places a sprite from the resource memory and places it at xPos, yPos | ||
-- @function [parent=#Graphics] placeSprite | ||
-- @param #number type If true, then the hud will be shown. <br>1 = Static / HUD sprite<br>2 = "In level" sprite<br>3 = Collectible item<br>4 = Progress bar<br>5 = Phanto | ||
-- @param #number imgResource The resource number where the image is loaded. | ||
-- @param #number xPos The x position the image should be placed on. (relative/absolute position depends on type) | ||
-- @param #number yPos The y position the image should be placed on. (relative/absolute position depends on type) | ||
-- @param #string extra [Optional] Extra value, depends on the given type.<br>On type 4 this value is used for the event when it is collected by the player. | ||
-- @param #number time [Optional] The lifetime of the placed sprite. If not set then the sprite is placed forever. | ||
|
||
|
||
|
||
|
||
return nil |
Oops, something went wrong.