Mountain  1.0.0
Simple C++ 2D Game Framework
Mountain Namespace Reference

Contains all declarations of the Mountain Framework. More...

Namespaces

 Graphics
 Low-level graphics API.
 

Classes

class  Audio
 
class  AudioBuffer
 
class  AudioContext
 
class  AudioDevice
 
class  AudioListener
 
class  AudioSource
 
class  AudioTrack
 
class  Circle
 
class  Collider
 
class  ColliderList
 
struct  Color
 The Color struct represents a color in RGBA color space. More...
 
struct  ColorHsva
 The ColorHsva struct represents a color in HSVA color space. More...
 
class  Component
 Represents a behavior that can be attached to an Entity. More...
 
class  ComputeShader
 
class  Coroutine
 Wrapper around C++20 Coroutines. More...
 
struct  DebugStringData
 
class  Directory
 Defines a directory on the filesystem. More...
 
class  Draw
 The Draw class contains static functions to draw various things on screen. More...
 
class  Effect
 
class  Entity
 
class  Entry
 File system entry. Can be either a File or a Directory. More...
 
class  Event
 Encapsulates a delegate system similar to its C# implementation. More...
 
class  File
 Defines a file on the filesystem. More...
 
class  FileManager
 Static class used to add, load, get, or unload Files and Directories. More...
 
class  FileSystemWatcher
 
class  FilmGrain
 
class  Font
 Holds the necessary information to draw text using a Font. More...
 
class  Game
 
class  GamepadInput
 Information about a gamepad. More...
 
class  Grid
 
class  Guid
 Stands for Global Unique Identifier, it represents a unique ID that's used to link pointers during serialization and deserialization. More...
 
class  Hitbox
 
class  Input
 Used to fetch inputs from the current Window. More...
 
struct  LightSource
 
class  List
 A dynamic array implementation. Wrapper around the std::vector class. More...
 
class  Logger
 Static class used to log messages to the console and/or a file. More...
 
class  MessageBox
 Defines functions to work with Windows MessageBox utilities. More...
 
struct  OpenGlVersion
 
class  ParticleSystem
 
struct  ParticleSystemBurst
 
class  Pointer
 Custom Mountain smart pointer. Represents both a std::shared_ptr and a std::weak_ptr. More...
 
class  Rectangle
 
class  Renderer
 
class  RenderTarget
 
class  ResourceManager
 Static class used to add, load, get, or unload Resources. More...
 
class  RunLengthEncoding
 
class  Screen
 Represents a screen/monitor. More...
 
class  Shader
 Encapsulates a GPU shader. More...
 
class  ShaderBase
 
struct  ShaderCode
 Encapsulates shader code information. More...
 
class  Sprite
 
class  StateMachine
 
struct  StateMachineCallbacks
 
class  Stopwatch
 C++ reimplementation of the .NET Stopwatch class. More...
 
class  Texture
 Represents an image in memory. More...
 
struct  TimeSpan
 C++ reimplementation of the .NET TimeSpan struct. More...
 
class  TsQueue
 Thread-Safe Queue. More...
 
class  Vignette
 
class  Window
 A wrapper for the main window. More...
 

Typedefs

using GamepadButtonStatuses = std::array< bool_t, magic_enum::enum_count< GamepadButtonStatus >()>
 
template<typename... Args>
using CoroutineFunction = std::function< Coroutine(Args...)>
 Coroutine function prototype.
 

Enumerations

enum  AudioSourceType { Mono, Stereo }
 
enum  ColliderType : uint8_t { Hitbox, Circle, Grid, List }
 
enum  GamepadAxis : uint8_t {
  LeftStickHorizontal, LeftStickVertical, RightStickHorizontal, RightStickVertical,
  LeftTrigger, RightTrigger
}
 Gamepad axis enumeration.
 
enum  GamepadStick : uint8_t { Left, Right }
 Gamepad stick enumeration.
 
enum  GamepadButton : uint8_t {
  A, B, X, Y,
  LeftBumper, RightBumper, Back, Start,
  Guide, LeftStick, RightStick, DirectionalPadUp,
  DirectionalPadRight, DirectionalPadDown, DirectionalPadLeft, LeftTrigger,
  RightTrigger, None
}
 Gamepad button enumeration. More...
 
enum  GamepadButtonStatus : uint8_t { GamepadButtonStatus::Down, GamepadButtonStatus::Up, GamepadButtonStatus::Pressed, GamepadButtonStatus::Released }
 Gamepad button. More...
 
enum  Key : uint16_t {
  Key::Space = 32, Key::Apostrophe = 39, Key::Comma = 44, Key::Minus = 45,
  Key::Period = 46, Key::Slash = 47, Key::Key0 = 48, Key::Key1 = 49,
  Key::Key2 = 50, Key::Key3 = 51, Key::Key4 = 52, Key::Key5 = 53,
  Key::Key6 = 54, Key::Key7 = 55, Key::Key8 = 56, Key::Key9 = 57,
  Key::Semicolon = 59, Key::Equal = 61, Key::A = 65, Key::B = 66,
  Key::C = 67, Key::D = 68, Key::E = 69, Key::F = 70,
  Key::G = 71, Key::H = 72, Key::I = 73, Key::J = 74,
  Key::K = 75, Key::L = 76, Key::M = 77, Key::N = 78,
  Key::O = 79, Key::P = 80, Key::Q = 81, Key::R = 82,
  Key::S = 83, Key::T = 84, Key::U = 85, Key::V = 86,
  Key::W = 87, Key::X = 88, Key::Y = 89, Key::Z = 90,
  Key::LeftBracket = 91, Key::Backslash = 92, Key::RightBracket = 93, Key::GraveAccent = 96,
  Key::World1 = 161, Key::World2 = 162, Key::Escape = 256, Key::Enter = 257,
  Key::Tab = 258, Key::Backspace = 259, Key::Insert = 260, Key::Delete = 261,
  Key::Right = 262, Key::Left = 263, Key::Down = 264, Key::Up = 265,
  Key::PageUp = 266, Key::PageDown = 267, Key::Home = 268, Key::End = 269,
  Key::CapsLock = 280, Key::ScrollLock = 281, Key::NumLock = 282, Key::PrintScreen = 283,
  Key::Pause = 284, Key::F1 = 290, Key::F2 = 291, Key::F3 = 292,
  Key::F4 = 293, Key::F5 = 294, Key::F6 = 295, Key::F7 = 296,
  Key::F8 = 297, Key::F9 = 298, Key::F10 = 299, Key::F11 = 300,
  Key::F12 = 301, Key::F13 = 302, Key::F14 = 303, Key::F15 = 304,
  Key::F16 = 305, Key::F17 = 306, Key::F18 = 307, Key::F19 = 308,
  Key::F20 = 309, Key::F21 = 310, Key::F22 = 311, Key::F23 = 312,
  Key::F24 = 313, Key::F25 = 314, Key::Kp0 = 320, Key::Kp1 = 321,
  Key::Kp2 = 322, Key::Kp3 = 323, Key::Kp4 = 324, Key::Kp5 = 325,
  Key::Kp6 = 326, Key::Kp7 = 327, Key::Kp8 = 328, Key::Kp9 = 329,
  Key::KpDecimal = 330, Key::KpDivide = 331, Key::KpMultiply = 332, Key::KpSubtract = 333,
  Key::KpAdd = 334, Key::KpEnter = 335, Key::KpEqual = 336, Key::LeftShift = 340,
  Key::LeftControl = 341, Key::LeftAlt = 342, Key::LeftSuper = 343, Key::RightShift = 344,
  Key::RightControl = 345, Key::RightAlt = 346, Key::RightSuper = 347, Key::Menu = 348,
  None = 355, Count
}
 List of keyboard buttons More...
 
enum  KeyStatus : uint8_t { KeyStatus::Pressed, KeyStatus::Down, KeyStatus::Release, KeyStatus::Repeat }
 List of keyboard button states More...
 
enum  MouseButton : uint8_t {
  MouseButton::Left, MouseButton::Right, MouseButton::Middle, MouseButton::Button3,
  MouseButton::Button4, MouseButton::Button5, MouseButton::Button6, MouseButton::Button7,
  MouseButton::Button8, None
}
 List of mouse buttons More...
 
enum  MouseButtonStatus : uint8_t { MouseButtonStatus::Pressed, MouseButtonStatus::Down, MouseButtonStatus::Release }
 List of mouse button states More...
 
enum  DrawTextureFlipping : uint8_t {
  None = 0, Horizontal = 1 << 0, Vertical = 1 << 1, Diagonal = 1 << 2,
  AntiDiagonal = 1 << 3
}
 
enum  WindowMode : uint8_t { Windowed, Borderless, Fullscreen }
 

Functions

 PUBLIC_GLOBAL (bool_t, NoBinaryResources, false)
 Whether to not use packaged binary resources. More...
 
 PUBLIC_GLOBAL (std::string, BuiltinShadersPath, "")
 The path to the Mountain builtin shaders directory. More...
 
 PUBLIC_GLOBAL (std::string, BuiltinAssetsPath, "")
 The path to the Mountain builtin assets directory. More...
 
 PUBLIC_GLOBAL (bool_t, BreakOnGraphicsError, false)
 Whether to debug break when an OpenGL error is reported.
 
constexpr Color operator+ (const Color &c1, const Color &c2)
 Adds 2 Color, caps at 1.f. More...
 
constexpr Color operator* (const Color &c1, const Color &c2)
 Multiplies 2 Color. More...
 
constexpr Color operator* (Color color, float_t alphaFactor)
 Multiplies the alpha component of a Color. More...
 
constexpr bool_t operator== (const Color &c1, const Color &c2)
 Compares 2 Color component-wise. More...
 
constexpr bool_t operator!= (const Color &c1, const Color &c2)
 Compares 2 Color component-wise. More...
 
constexpr ColorHsva operator* (const ColorHsva &color, float_t alphaFactor)
 Multiplies the alpha component of a ColorHsva. More...
 
constexpr bool_t operator== (const ColorHsva &c1, const ColorHsva &c2)
 Compares 2 ColorHsva component-wise. More...
 
constexpr bool_t operator!= (const ColorHsva &c1, const ColorHsva &c2)
 Compares 2 ColorHsva component-wise. More...
 

Variables

enum MOUNTAIN_API AudioTrackFormat
 
enum MOUNTAIN_API OggVorbis
 
enum MOUNTAIN_API Mp3
 

Detailed Description

Contains all declarations of the Mountain Framework.

Enumeration Type Documentation

◆ GamepadButton

enum Mountain::GamepadButton : uint8_t
strong

Gamepad button enumeration.

Defines the gamepad button values according to the Xbox controller button placements.

Definition at line 42 of file gamepad_input.hpp.

◆ GamepadButtonStatus

enum Mountain::GamepadButtonStatus : uint8_t
strong

Gamepad button.

Enumerator
Down 

Held down.

Up 

Held up.

Pressed 

Pressed this frame.

Released 

Released this frame.

Definition at line 68 of file gamepad_input.hpp.

◆ Key

enum Mountain::Key : uint16_t
strong

List of keyboard buttons

Enumerator
Space 

Space.

Apostrophe 

'

Comma 

,

Minus 
Period 
Slash 

/

Key0 

0

Key1 

1

Key2 

2

Key3 

3

Key4 

4

Key5 

5

Key6 

6

Key7 

7

Key8 

8

Key9 

9

Semicolon 

;

Equal 

=

A.

B.

C.

D.

E.

F.

G.

H.

I.

J.

K.

L.

M.

N.

O.

P.

Q.

R.

S.

T.

U.

V.

W.

X.

Y.

Z.

LeftBracket 

[

Backslash 

\ (Backslash)

RightBracket 

]

GraveAccent 

`

World1 

World1 non-US #1.

World2 

World2 non-US #2.

Escape 

Escape.

Enter 

Enter.

Tab 

Tab.

Backspace 

Backspace.

Insert 

Insert.

Delete 

Delete.

Right 

Right.

Left 

Left.

Down 

Down.

Up 

Up.

PageUp 

PageUp.

PageDown 

PageDown.

Home 

Home.

End 

End.

CapsLock 

CapsLock.

ScrollLock 

ScrollLock.

NumLock 

NumLock.

PrintScreen 

PrintScreen.

Pause 

Pause.

F1 

F1.

F2 

F2.

F3 

F3.

F4 

F4.

F5 

F5.

F6 

F6.

F7 

F7.

F8 

F8.

F9 

F9.

F10 

F10.

F11 

F11.

F12 

F12.

F13 

F13.

F14 

F14.

F15 

F15.

F16 

F16.

F17 

F17.

F18 

F18.

F19 

F19.

F20 

F20.

F21 

F21.

F22 

F22.

F23 

F23.

F24 

F24.

F25 

F25.

Kp0 

Keypad 0.

Kp1 

Keypad 1.

Kp2 

Keypad 2.

Kp3 

Keypad 3.

Kp4 

Keypad 4.

Kp5 

Keypad 5.

Kp6 

Keypad 6.

Kp7 

Keypad 7.

Kp8 

Keypad 8.

Kp9 

Keypad 9.

KpDecimal 

Keypad Decimal.

KpDivide 

Keypad Divide.

KpMultiply 

Keypad Multiply.

KpSubtract 

Keypad Subtract.

KpAdd 

Keypad Add.

KpEnter 

Keypad Enter.

KpEqual 

Keypad Equal.

LeftShift 

LeftShift.

LeftControl 

LeftControl.

LeftAlt 

LeftAlt.

LeftSuper 

LeftSuper.

RightShift 

RightShift.

RightControl 

RightControl.

RightAlt 

RightAlt.

RightSuper 

RightSuper.

Menu 

Menu.

Definition at line 11 of file keyboard_input.hpp.

◆ KeyStatus

enum Mountain::KeyStatus : uint8_t
strong

List of keyboard button states

Enumerator
Pressed 

Pressed.

Down 

Held down.

Release 

Released.

Repeat 

Repeated.

Definition at line 265 of file keyboard_input.hpp.

◆ MouseButton

enum Mountain::MouseButton : uint8_t
strong

List of mouse buttons

Enumerator
Left 

Left click.

Right 

Right click.

Middle 

Wheel click.

Button3 

Extension button 3.

Button4 

Extension button 4.

Button5 

Extension button 5.

Button6 

Extension button 6.

Button7 

Extension button 7.

Button8 

Extension button 8.

Definition at line 11 of file mouse_input.hpp.

◆ MouseButtonStatus

enum Mountain::MouseButtonStatus : uint8_t
strong

List of mouse button states

Enumerator
Pressed 

Pressed, e.g. true the first frame it is down.

Down 

Held down.

Release 

Released.

Definition at line 36 of file mouse_input.hpp.

Function Documentation

◆ operator!=() [1/2]

constexpr bool_t Mountain::operator!= ( const Color c1,
const Color c2 
)

Compares 2 Color component-wise.

Parameters
c1A
c2B
Returns
A != B

◆ operator!=() [2/2]

constexpr bool_t Mountain::operator!= ( const ColorHsva c1,
const ColorHsva c2 
)

Compares 2 ColorHsva component-wise.

Parameters
c1A
c2B
Returns
A != B

◆ operator*() [1/3]

constexpr Color Mountain::operator* ( const Color c1,
const Color c2 
)

Multiplies 2 Color.

Parameters
c1A
c2B
Returns
A * B

◆ operator*() [2/3]

constexpr Color Mountain::operator* ( Color  color,
float_t  alphaFactor 
)

Multiplies the alpha component of a Color.

Parameters
colorColor
alphaFactorAlpha factor
Returns
Color.a * alphaFactor

◆ operator*() [3/3]

constexpr ColorHsva Mountain::operator* ( const ColorHsva color,
float_t  alphaFactor 
)

Multiplies the alpha component of a ColorHsva.

Parameters
colorColor
alphaFactorAlpha factor
Returns
Color.a * alphaFactor

◆ operator+()

constexpr Color Mountain::operator+ ( const Color c1,
const Color c2 
)

Adds 2 Color, caps at 1.f.

Parameters
c1A
c2B
Returns
A + B

◆ operator==() [1/2]

constexpr bool_t Mountain::operator== ( const Color c1,
const Color c2 
)

Compares 2 Color component-wise.

Parameters
c1A
c2B
Returns
A == B

◆ operator==() [2/2]

constexpr bool_t Mountain::operator== ( const ColorHsva c1,
const ColorHsva c2 
)

Compares 2 ColorHsva component-wise.

Parameters
c1A
c2B
Returns
A == B

◆ PUBLIC_GLOBAL() [1/3]

Mountain::PUBLIC_GLOBAL ( bool_t  ,
NoBinaryResources  ,
false   
)

Whether to not use packaged binary resources.

If this is true, BuiltinShadersPath and BuiltinAssetsPath must be set. This means that instead of using the packaged shader files within the Mountain DLL, the files will instead be loaded from the file system. This can be useful in case you need to edit the builtin shaders because you can then use hot-reloading.

◆ PUBLIC_GLOBAL() [2/3]

Mountain::PUBLIC_GLOBAL ( std::string  ,
BuiltinShadersPath  ,
""   
)

The path to the Mountain builtin shaders directory.

See also
NoBinaryResources

◆ PUBLIC_GLOBAL() [3/3]

Mountain::PUBLIC_GLOBAL ( std::string  ,
BuiltinAssetsPath  ,
""   
)

The path to the Mountain builtin assets directory.

See also
NoBinaryResources