Update doc comments

This commit is contained in:
Sezz 2023-10-06 13:25:02 +11:00
parent 1b92381e76
commit e10607e733
2 changed files with 12 additions and 13 deletions

View file

@ -24,15 +24,15 @@ void ScriptDisplaySprite::Register(sol::table& parent)
ScriptReserved_DisplaySpriteDraw, &ScriptDisplaySprite::Draw, ScriptReserved_DisplaySpriteDraw, &ScriptDisplaySprite::Draw,
/// (int) ID of the sprite object. /// (Objects.ObjID) ID of the sprite sequence object.
//@mem ObjectID //@mem ObjectID
"ObjectID", &ScriptDisplaySprite::ObjectID, "ObjectID", &ScriptDisplaySprite::ObjectID,
/// (int) ID of the display sprite in the sprite object. /// (int) ID of the display sprite in the sprite sequence object.
//@mem SpriteID //@mem SpriteID
"SpriteID", &ScriptDisplaySprite::SpriteID, "SpriteID", &ScriptDisplaySprite::SpriteID,
/// (Vec2) Display position of the display sprite. /// (Vec2) Display space position of the display sprite.
//@mem Position //@mem Position
"Position", &ScriptDisplaySprite::Position, "Position", &ScriptDisplaySprite::Position,
@ -58,13 +58,13 @@ void ScriptDisplaySprite::Register(sol::table& parent)
} }
/*** /***
@int objectID ID of the sprite object. @int objectID ID of the sprite sequence object.
@int spriteID ID of the display sprite in the sprite object. @int spriteID ID of the sprite in the sprite sequence object.
@Vec2 pos Display position of the display sprite. @Vec2 pos Display space position of the display sprite relative to the __DisplaySprite.AlignMode__ used in the __Draw()__ call.
@float rot Rotation of the display sprite in degrees. @float rot Rotation of the display sprite in degrees.
@Vec2 scale Horizontal and vertical scale of the display sprite. @Vec2 scale Horizontal and vertical scale of the display sprite relative to the __DisplaySprite.ScaleMode__ used in the __Draw()__ call.
@Color color[opt] Color of the display sprite. __Default: Color(255, 255, 255, 255)__ @Color color[opt] Color of the display sprite. __Default: Color(255, 255, 255, 255)__
@function Vec3 @treturn DisplaySprite A DisplaySprite object.
*/ */
ScriptDisplaySprite::ScriptDisplaySprite(GAME_OBJECT_ID objectID, int spriteID, const Vec2& pos, float rot, const Vec2& scale, ScriptDisplaySprite::ScriptDisplaySprite(GAME_OBJECT_ID objectID, int spriteID, const Vec2& pos, float rot, const Vec2& scale,
sol::optional<ScriptColor> color) sol::optional<ScriptColor> color)
@ -81,7 +81,7 @@ ScriptDisplaySprite::ScriptDisplaySprite(GAME_OBJECT_ID objectID, int spriteID,
/*** Draw the display sprite in display space for the current frame. /*** Draw the display sprite in display space for the current frame.
@function DisplaySprite:Draw @function DisplaySprite:Draw
@tparam int[opt] priority Draw priority of the sprite. Can be thought of as a layer, with higher values having higher priority. __Default: 0__ @tparam Objects.ObjID[opt] priority Draw priority of the sprite. Can be thought of as a layer, with higher values having higher priority. __Default: 0__
@tparam DisplaySprite.AlignMode[opt] alignMode Align mode of the sprite. __Default: DisplaySprite.AlignMode.CENTER__ @tparam DisplaySprite.AlignMode[opt] alignMode Align mode of the sprite. __Default: DisplaySprite.AlignMode.CENTER__
@tparam DisplaySprite.ScaleMode[opt] scaleMode Scale mode of the sprite. __Default: DisplaySprite.ScaleMode.FIT__ @tparam DisplaySprite.ScaleMode[opt] scaleMode Scale mode of the sprite. __Default: DisplaySprite.ScaleMode.FIT__
@tparam Effects.BlendID[opt] blendMode Blend mode of the sprite. __Default: Effects.BlendID.ALPHABLEND__ @tparam Effects.BlendID[opt] blendMode Blend mode of the sprite. __Default: Effects.BlendID.ALPHABLEND__

View file

@ -76,19 +76,18 @@ most can just be ignored (see usage).
@tparam string name Lua name of the item @tparam string name Lua name of the item
@tparam Vec3 position position in level @tparam Vec3 position position in level
@tparam[opt] Rotation rotation rotation about x, y, and z axes (default Rotation(0, 0, 0)) @tparam[opt] Rotation rotation rotation about x, y, and z axes (default Rotation(0, 0, 0))
@int[opt] room room ID item is in (default: calculated automatically) @int[opt] roomID room ID item is in (default: calculated automatically)
@int[opt=0] animNumber anim number @int[opt=0] animNumber anim number
@int[opt=0] frameNumber frame number @int[opt=0] frameNumber frame number
@int[opt=10] hp HP of item @int[opt=10] hp HP of item
@int[opt=0] OCB ocb of item (default 0) @int[opt=0] OCB ocb of item (default 0)
@tparam[opt] table AIBits table with AI bits (default {0,0,0,0,0,0}) @tparam[opt] table AIBits table with AI bits (default { 0, 0, 0, 0, 0, 0 })
@treturn Moveable A new Moveable object (a wrapper around the new object) @treturn Moveable A new Moveable object (a wrapper around the new object)
@usage @usage
local item = Moveable( local item = Moveable(
TEN.Objects.ObjID.PISTOLS_ITEM, -- object id TEN.Objects.ObjID.PISTOLS_ITEM, -- object id
"test", -- name "test", -- name
Vec3(18907, 0, 21201) Vec3(18907, 0, 21201))
)
*/ */
static std::unique_ptr<Moveable> Create( static std::unique_ptr<Moveable> Create(
GAME_OBJECT_ID objID, GAME_OBJECT_ID objID,