ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
asw Namespace Reference

Namespaces

namespace  assets
 
namespace  color
 Color constants.
 
namespace  config
 
namespace  core
 
namespace  detail
 
namespace  dialog
 
namespace  display
 
namespace  draw
 
namespace  easing
 
namespace  game
 
namespace  geometry
 
namespace  input
 
namespace  lighting
 
namespace  log
 
namespace  random
 
namespace  scene
 
namespace  sound
 
namespace  ui
 
namespace  util
 

Classes

class  Animation
 Steps through frames over time, to use with a SpriteSheet. More...
 
class  Camera
 2D camera that follows a target, stays inside the world and shakes. More...
 
struct  Color
 RGBA color struct with 8-bit channels. More...
 
struct  ParticleConfig
 Configuration for particle emitters. More...
 
class  ParticleEmitter
 Particle emitter that integrates with the scene system. More...
 
class  Quad
 A 2D rectangle in space. More...
 
class  SpriteSheet
 A texture split into equal frames, read left to right then top to bottom. More...
 
class  Vec2
 A 2D vector in space. More...
 
class  Vec3
 A 3D vector in space. More...
 

Typedefs

using FColor = SDL_FColor
 A colour with each channel as a float from 0.0 to 1.0.
 
using Vec2f = Vec2<float>
 Type aliases for common vector and rectangle types.
 
using Vec2i = Vec2<int>
 
using Vec3f = Vec3<float>
 
using Vec3i = Vec3<int>
 
using Quadf = Quad<float>
 
using Quadi = Quad<int>
 
template<typename T >
using Polygon = std::vector<Vec2<T>>
 A polygon, as its corners in order. The last corner joins the first.
 
using Polygonf = Polygon<float>
 
using Texture = std::shared_ptr<SDL_Texture>
 Alias for a shared pointer to an SDL_Texture.
 
using Font = std::shared_ptr<TTF_Font>
 Alias for a shared pointer to an TTF_Font.
 
using Sample = std::shared_ptr<MIX_Audio>
 Alias for a shared pointer to an MIX_Audio.
 
using Music = std::shared_ptr<MIX_Audio>
 Alias for a shared pointer to an MIX_Audio.
 
using Renderer = SDL_Renderer
 Alias for a shared pointer to an SDL_Renderer.
 
using Window = SDL_Window
 Alias for a shared pointer to an SDL_Window.
 

Enumerations

enum class  BlendMode : SDL_BlendMode {
  None = SDL_BLENDMODE_NONE , Blend = SDL_BLENDMODE_BLEND , BlendPremultiplied = SDL_BLENDMODE_BLEND_PREMULTIPLIED , Add = SDL_BLENDMODE_ADD ,
  AddPremultiplied = SDL_BLENDMODE_ADD_PREMULTIPLIED , Modulate = SDL_BLENDMODE_MOD , Multiply = SDL_BLENDMODE_MUL
}
 Mappings from SDL_BLENDMODE to ASW BlendMode. More...
 
enum class  ScaleMode { Nearest = SDL_SCALEMODE_NEAREST , Linear = SDL_SCALEMODE_LINEAR }
 Mappings from SDL_SCALEMODE to ASW ScaleMode. More...
 
enum class  Falloff { Linear , Smooth , Quadratic }
 How a gradient or light fades from its centre to its edge. More...
 
enum class  TextJustify { Left , Center , Right }
 Text justification options for text rendering. More...
 
enum class  FontStyle { Smooth , Pixel }
 How a font's glyphs are rendered. More...
 

Typedef Documentation

◆ FColor

using asw::FColor = SDL_FColor

A colour with each channel as a float from 0.0 to 1.0.

Definition at line 14 of file color.h.

◆ Font

using asw::Font = std::shared_ptr<TTF_Font>

Alias for a shared pointer to an TTF_Font.

Definition at line 79 of file types.h.

◆ Music

using asw::Music = std::shared_ptr<MIX_Audio>

Alias for a shared pointer to an MIX_Audio.

Definition at line 85 of file types.h.

◆ Polygon

template<typename T >
using asw::Polygon = std::vector<Vec2<T>>

A polygon, as its corners in order. The last corner joins the first.

Definition at line 740 of file geometry.h.

◆ Polygonf

using asw::Polygonf = Polygon<float>

Definition at line 741 of file geometry.h.

◆ Quadf

using asw::Quadf = Quad<float>

Definition at line 736 of file geometry.h.

◆ Quadi

using asw::Quadi = Quad<int>

Definition at line 737 of file geometry.h.

◆ Renderer

using asw::Renderer = SDL_Renderer

Alias for a shared pointer to an SDL_Renderer.

Definition at line 88 of file types.h.

◆ Sample

using asw::Sample = std::shared_ptr<MIX_Audio>

Alias for a shared pointer to an MIX_Audio.

Definition at line 82 of file types.h.

◆ Texture

using asw::Texture = std::shared_ptr<SDL_Texture>

Alias for a shared pointer to an SDL_Texture.

Definition at line 76 of file types.h.

◆ Vec2f

using asw::Vec2f = Vec2<float>

Type aliases for common vector and rectangle types.

Definition at line 732 of file geometry.h.

◆ Vec2i

using asw::Vec2i = Vec2<int>

Definition at line 733 of file geometry.h.

◆ Vec3f

using asw::Vec3f = Vec3<float>

Definition at line 734 of file geometry.h.

◆ Vec3i

using asw::Vec3i = Vec3<int>

Definition at line 735 of file geometry.h.

◆ Window

using asw::Window = SDL_Window

Alias for a shared pointer to an SDL_Window.

Definition at line 91 of file types.h.

Enumeration Type Documentation

◆ BlendMode

enum class asw::BlendMode : SDL_BlendMode
strong

Mappings from SDL_BLENDMODE to ASW BlendMode.

The underlying type matches SDL_BlendMode so conversions between the two are casts to the underlying type rather than to an unrelated integral type.

Enumerator
None 
Blend 
BlendPremultiplied 
Add 
AddPremultiplied 
Modulate 
Multiply 

Definition at line 26 of file types.h.

◆ Falloff

enum class asw::Falloff
strong

How a gradient or light fades from its centre to its edge.

Enumerator
Linear 

Even fade to the edge.

Smooth 

Soft at the centre and at the edge.

Quadratic 

Bright core that drops off quickly, closer to a real light.

Definition at line 46 of file types.h.

◆ FontStyle

enum class asw::FontStyle
strong

How a font's glyphs are rendered.

Enumerator
Smooth 

Anti-aliased glyphs rendered at the output resolution, for regular fonts.

Pixel 

Hard edged glyphs rendered at the logical size and scaled with nearest filtering, for pixel art fonts.

Definition at line 65 of file types.h.

◆ ScaleMode

enum class asw::ScaleMode
strong

Mappings from SDL_SCALEMODE to ASW ScaleMode.

Enumerator
Nearest 
Linear 

Definition at line 40 of file types.h.

◆ TextJustify

enum class asw::TextJustify
strong

Text justification options for text rendering.

Enumerator
Left 
Center 
Right 

Definition at line 58 of file types.h.