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 enum class BlendMode {
21 NONE = SDL_BLENDMODE_NONE,
22 BLEND = SDL_BLENDMODE_BLEND,
23 BLEND_PREMULTIPLIED = SDL_BLENDMODE_BLEND_PREMULTIPLIED,
24 ADD = SDL_BLENDMODE_ADD,
25 ADD_PREMULTIPLIED = SDL_BLENDMODE_ADD_PREMULTIPLIED,
26 MODULATE = SDL_BLENDMODE_MOD,
27 MULTIPLY = SDL_BLENDMODE_MUL,
28 };
29
31 using Texture = std::shared_ptr<SDL_Texture>;
32
34 using Font = std::shared_ptr<TTF_Font>;
35
37 using Sample = std::shared_ptr<Mix_Chunk>;
38
40 using Music = std::shared_ptr<Mix_Music>;
41
43 using Renderer = SDL_Renderer;
44
46 using Window = SDL_Window;
47
48} // namespace asw
49
50#endif // ASW_TYPES_H
std::shared_ptr< Mix_Chunk > Sample
Alias for a shared pointer to an Mix_Chunk.
Definition types.h:37
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
Definition types.h:34
std::shared_ptr< Mix_Music > Music
Alias for a shared pointer to an Mix_Music.
Definition types.h:40
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
Definition types.h:31
BlendMode
Mappings from SDL_BLENDMODE to ASW BlendMode.
Definition types.h:20
SDL_Window Window
Alias for a shared pointer to an SDL_Window.
Definition types.h:46
SDL_Renderer Renderer
Alias for a shared pointer to an SDL_Renderer.
Definition types.h:43