LuaDocs/FrameManager

From Data Realms Wiki

Revision as of 20:18, 2 April 2015 by LuaBot (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Has no parent class

Generic Class. The singleton manager over the composition and display of frames.

Go back to Class Index


Properties

PPM

The ratio between on-screen pixels and the physics engine's meters.A float describing the current PPM ratio.

MPP

Read-only property. The ratio between the physics engine's meters and on-screen pixels.A float describing the current MPP ratio.

PPL

Read-only property. The ratio between the on-screen pixels and the physics engine's Litres.A float describing the current PPL ratio.

LPP

Read-only property. The ratio between the physics engine's Litres and on-screen pixels.A float describing the current LPP ratio.

ResX

Read-only property. The horizontal resolution of the screen.An int describing the horizontal resolution of the screen in pixels.

ResY

Read-only property. The vertical resolution of the screen.An int describing the vertical resolution of the screen in pixels.

ResBPP

Read-only property. The bits per pixel color depthAn int describing the number of bits per pixel of the current color depth.

HSplit

Gets whether the screen is split horizontally across the screen, ie as two splitscreens one above the other.Whether or not screen has a horizontal split.

VSplit

Gets whether the screen is split vertically across the screen, ie as two splitscreens side by side.Whether screen has a vertical split.

PlayerScreenWidth

Read-only property. The width of the individual player screens. This will only be less than the backbuffer resolution if there are split screens.The width of the player screens.

PlayerScreenHeight

Read-only property. The height of the individual player screens. This will only be less than the backbuffer resolution if there are split screens.The height of the player screens.

ResY

Read-only property. The vertical resolution of the screen.An int describing the vertical resolution of the screen in pixels.

ResY

Read-only property. The vertical resolution of the screen.An int describing the vertical resolution of the screen in pixels.

ResY

Read-only property. The vertical resolution of the screen.An int describing the vertical resolution of the screen in pixels.

PostProcessing

Indicates whether we're postprocessing or notWhether post processing is enabled or not.

PostPixelGlow

Indicates whether we're postprocessing the pixel glow effect or notWhether post processing is enabled or not.


Functions

ResetSplitScreens

Sets new values for the split screen configuration.

Arguments:

  • Whether the new setting should be horizontally split (over and under).
  • Whether the new setting should be vertically split (side by side)

Return value:

None.


SetScreenText

Sets the message to be displayed on top of each player's screen

Arguments:

  • An std::string that specifies what should be displayed.
  • Which screen you want to set text to.
  • The interval with which the screen will be blinking, in ms. 0 means no blinking.
  • The duration, in MS to force this message to display. No other message can be displayed before this expires. ClearScreenText overrides it though.
  • Vertically centered on the screen

Return value:

None.


ClearScreenText

Clears the message to be displayed on top of each player's screen

Arguments:

  • Which screen you want to set text to.

Return value:

None.


IsFullscreen

Indicates whether we're in fullscreen mode or not.

Arguments:

  • None.

Return value:

Whether we're in fullscreen mode.


LoadPalette

Loads a palette from a .dat file and sets it as the currently used screen palette.

Arguments:

  • String with the data path to the palette data object within a .dat.

Return value:

Whether palette laoded successfully or not.


FadeInPalette

Fades the palette in from black at a specified speed.

Arguments:

  • Speed specififed from (slowest) 1 - 64 (fastest)

Return value:

None.


FadeOutPalette

Fades the palette out to black at a specified speed.

Arguments:

  • Speed specififed from (slowest) 1 - 64 (fastest)

Return value:

None.


SaveScreenToBMP

Dumps a bitmap of the screen back buffer to a 8bpp BMP file.

Arguments:

  • The filename of the file to save to, WITHOUT EXTENSION. eg, If "Test" is passed in, this func will save to Test000.bmp, if that file does not already exist. If it does exist, it will attempt 001, and so on.

Return value:

Success >=0, or failure < 0.


SaveBitmapToBMP

Dumps a bitmap to a 8bpp BMP file.

Arguments:

  • A pointer to a BITMAP to save.
  • The filename of the file to save to, WITHOUT EXTENSION. eg, If "Test" is passed in, this func will save to Test000.bmp, if that file does not already exist. If it does exist, it will attempt 001, and so on.

Return value:

Success >=0, or failure < 0.


ResetFrameTimer

Resets the frame timer to restart counting.

Arguments:

  • None.

Return value:

None.


ResetRTE

Orders to reset the entire Retro Terrain Engine system next iteration.

Arguments:

  • None.

Return value:

None.


IsResettingRTE

Indicated whether the system is about to be reset before the next loop starts.

Arguments:

  • None.

Return value:

Whether the RTE is about to reset next iteration of the loop or not.


ToggleFullscreen

Toggles to and from fullscreen and windowed mode.

Arguments:

  • None.

Return value:

Error code, anything other than 0 is error..


ClearBackBuffer8

Clears the 8bpp backbuffer with black.

Arguments:

  • None.

Return value:

None.


ClearBackBuffer32

Clears the 32bpp backbuffer with black.

Arguments:

  • None.

Return value:

None.


ShowPerformanceStats

Sets whetehr to display the performance stats on-screen or not.

Arguments:

  • Whether to show the performance stats or not.

Return value:

None.


FlashScreen

Flashes any of the players' screen red for this frame.

Arguments:

  • Which screen to flash.
  • What color to flash it. -1 means no color or flash.
  • How long a period to fill the frame with color. If 0, a single-frame flash will happen.

Return value:

None.


DrawCirclePrimitive

Schedule to draw a circle primitive.

Arguments:

  • Position of primitive in scene coordintaes, radius, color.

Return value:

None.


DrawCircleFillPrimitive

Schedule to draw a filled circle primitive.

Arguments:

  • Position of primitive in scene coordintaes, radius, color.

Return value:

None.


DrawLinePrimitive

Schedule to draw a line primitive.

Arguments:

  • Position of primitive in scene coordintaes, color.

Return value:

None.


DrawBoxPrimitive

Schedule to draw a box primitive.

Arguments:

  • Position of primitive in scene coordintaes, color.

Return value:

None.


DrawBoxPrimitive

Schedule to draw a filled box primitive.

Arguments:

  • Position of primitive in scene coordintaes, color.

Return value:

None.


Go back to Class Index

Personal tools