diff --git a/docs/22.0/BulbDrawLitApplicationSurface.md b/docs/22.0/BulbDrawLitApplicationSurface.md new file mode 100644 index 0000000..b8559a4 --- /dev/null +++ b/docs/22.0/BulbDrawLitApplicationSurface.md @@ -0,0 +1,17 @@ +# BulbDrawLitApplicationSurface + +  + +`BulbDrawLitApplicationSurface(renderer, [x], [y], [width], [height], [textureFiltering], [alphaBlend=false])` + +**Returns:** N/A (`undefined`) + +|Argument |Datatype|Purpose | +|--------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------| +|`renderer` |renderer|Renderer to use to draw the application surface | +|`[x]` |number |x position to draw the application surface at. If not specified, the position returned by `application_get_position()` will be used | +|`[y]` |number |y position to draw the application surface at. If not specified, the position returned by `application_get_position()` will be used | +|`[width]` |number |width to draw the application surface. If not specified, the width returned by `application_get_position()` will be used | +|`[height]` |number |heighr to draw the application surface. If not specified, the height returned by `application_get_position()` will be used | +|`[textureFiltering]`|boolean |Whether to use texture filtering when drawing the application surface. If not specified, the texture filter setting will not be changed| +|`[alphaBlend]` |boolean |Whether to use texture filtering when drawing the application surface. If not specified, alpha blending will be disabled | \ No newline at end of file diff --git a/docs/22.0/NormalMapFunctions.md b/docs/22.0/NormalMapFunctions.md new file mode 100644 index 0000000..eb8a70d --- /dev/null +++ b/docs/22.0/NormalMapFunctions.md @@ -0,0 +1,100 @@ +# Normal Map Functions + +  + +## BulbNormalMapClear + +`BulbNormalMapClear()` + +**Returns:** N/A (`undefined`) + +|Argument|Datatype|Purpose| +|--------|--------|-------| +|None | | | + +Clears a normal map surface, resetting all pixels to "flat" i.e. the normal for that pixel will be set to `(0,0,1)`, a vector that points straight upwards. + +  + +## BulbNormalMapShaderSet + +`BulbNormalMapShaderSet([forceFlat=false])` + +**Returns:** N/A (`undefined`) + +|Argument |Datatype|Purpose | +|-------------|--------|------------------------------------------------------------------------------------| +|`[forceFlat]`|boolean |Whether subsequent draw calls should be forced to draw "flat" data to the normal map| + +Before drawing normal map graphics to a renderer's normal map surface using Bulb's native functions (see below) you must call this function. If the `forceFlat` parameter is set to `true` then all draw calls will be forced to "flat" i.e. the normal will be set to `(0,0,1)`, a vector that points straight upwards. + +  + +## BulbNormalMapShaderReset + +`BulbNormalMapShaderReset()` + +**Returns:** N/A (`undefined`) + +|Argument|Datatype|Purpose| +|--------|--------|-------| +|None | | | + +Resets ("un-sets") the Bulb normal map shader. + +  + +## BulbNormalMapDrawSelf + +`BulbNormalMapDrawSelf([spriteIndex])` + +**Returns:** N/A (`undefined`) + +|Argument |Datatype |Purpose | +|---------------|------------|----------------------------------------------------------------------------------------| +|`[spriteIndex]`|sprite index|Sprite to draw. If not specified, the instance's current sprite (`sprite_index`) is used| + +Analogous to GameMaker's native `draw_self()` function. + +?> You should set Bulb's normal map shader before executing this function by calling `BulbNormalMapShaderSet()` beforehand. + +  + +## BulbNormalMapDrawSprite + +`BulbNormalMapDrawSprite(sprite, image, x, y)` + +**Returns:** N/A (`undefined`) + +|Argument|Datatype |Purpose | +|--------|------------|--------------------------------| +|`sprite`|sprite index|Sprite to draw | +|`image` |number |Image of the sprite to draw | +|`x` |number |x position to draw the sprite at| +|`y` |number |y position to draw the sprite at| + +Analogous to GameMaker's native `draw_sprite()` function. + +?> You should set Bulb's normal map shader before executing this function by calling `BulbNormalMapShaderSet()` beforehand. + +  + +## BulbNormalMapDrawSpriteExt + +`BulbNormalMapDrawSpriteExt(sprite, image, x, y, xScale, yScale, angle)` + +**Returns:** N/A (`undefined`) + +|Argument|Datatype |Purpose | +|--------|------------|--------------------------------------| +|`sprite`|sprite index|Sprite to draw | +|`image` |number |Image of the sprite to draw | +|`x` |number |x position to draw the sprite at | +|`y` |number |y position to draw the sprite at | +|`xScale`|number |x scale to use when drawing the sprite| +|`yScale`|number |y scale to use when drawing the sprite| +|`angle` |number |Rotation of the sprite in degrees | + +Analogous to GameMaker's native `draw_sprite_ext()` function. + +?> You should set Bulb's normal map shader before executing this function by calling `BulbNormalMapShaderSet()` beforehand. \ No newline at end of file diff --git a/docs/22.0/_sidebar.md b/docs/22.0/_sidebar.md index 4bd3de1..bb53ea4 100644 --- a/docs/22.0/_sidebar.md +++ b/docs/22.0/_sidebar.md @@ -12,3 +12,5 @@ - [BulbAmbienceSprite](BulbAmbienceSprite) - [BulbShadowOverlay](BulbShadowOverlay) - [BulbLightOverlay](BulbLightOverlay) +- [BulbDrawLitApplicationSurface](BulbDrawLitApplicationSurface) +- [Normal Map Functions](NormalMapFunctions) \ No newline at end of file