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
types.h
Go to the documentation of this file.
1
8
9#ifndef ASW_TYPES_H
10#define ASW_TYPES_H
11
12#include <SDL3/SDL.h>
13#include <SDL3_mixer/SDL_mixer.h>
14#include <SDL3_ttf/SDL_ttf.h>
15#include <memory>
16
17namespace asw {
18
20 using Texture = std::shared_ptr<SDL_Texture>;
21
23 using Font = std::shared_ptr<TTF_Font>;
24
26 using Sample = std::shared_ptr<Mix_Chunk>;
27
29 using Music = std::shared_ptr<Mix_Music>;
30
32 using Renderer = SDL_Renderer;
33
35 using Window = SDL_Window;
36
38 using Color = SDL_Color;
39
41 enum class BlendMode {
42 NONE = SDL_BLENDMODE_NONE,
43 BLEND = SDL_BLENDMODE_BLEND,
44 BLEND_PREMULTIPLIED = SDL_BLENDMODE_BLEND_PREMULTIPLIED,
45 ADD = SDL_BLENDMODE_ADD,
46 ADD_PREMULTIPLIED = SDL_BLENDMODE_ADD_PREMULTIPLIED,
47 MODULATE = SDL_BLENDMODE_MOD,
48 MULTIPLY = SDL_BLENDMODE_MUL,
49 };
50} // namespace asw
51
52#endif // ASW_TYPES_H
Definition random.cpp:5
std::shared_ptr< Mix_Chunk > Sample
Alias for a shared pointer to an Mix_Chunk.
Definition types.h:26
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
Definition types.h:23
std::shared_ptr< Mix_Music > Music
Alias for a shared pointer to an Mix_Music.
Definition types.h:29
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
Definition types.h:20
BlendMode
Mappings from SDL_BLENDMODE to ASW BlendMode.
Definition types.h:41
SDL_Color Color
Alias for an SDL_Color.
Definition types.h:38
SDL_Window Window
Alias for a shared pointer to an SDL_Window.
Definition types.h:35
SDL_Renderer Renderer
Alias for a shared pointer to an SDL_Renderer.
Definition types.h:32