SDXFrameWork  0.07
SDXFrameWork
 全て クラス ネームスペース 関数 変数 列挙型 列挙型の値 ページ
SDX.h
1 #pragma once//☀SDL
2 
3 #include <vector>
4 #include <string>
5 #include <memory>
6 #include <math.h>
7 #include <algorithm>
8 #include <list>
9 #include <iomanip>
10 
11 #include<vector>
12 
14 namespace SDX
15 {
16  const double PAI = 3.1415926535897931;
17  const double DEG = PAI / 180;
18 }
19 
20 #pragma comment(lib, "SDL2.lib")
21 #pragma comment(lib, "SDL2main.lib")
22 #pragma comment(lib, "SDL2_image.lib")
23 #pragma comment(lib, "SDL2_mixer.lib")
24 #pragma comment(lib, "SDL2_ttf.lib")
25 
26 #pragma execution_character_set("utf-8")//charの文字コードをUTF-8に変更
27 
28 #ifdef DEBUG
29  #pragma comment(linker, "/NODEFAULTLIB:msvcrt.lib")
30 #endif
31 
32 #include <SDL.h>
33 #include <SDL_image.h>
34 #include <SDL_mixer.h>
35 #include <SDL_ttf.h>
36 
37 using ImageHandle = SDL_Texture*;
38 using SoundHandle = Mix_Chunk*;
39 using ScreenHandle = SDL_Renderer*;
40 using WindowHandle = SDL_Window*;
41 using StickHandle = SDL_Joystick*;
42 using FontHandle = TTF_Font*;
43 using ColorData = SDL_Color;
44 
45 #define NULL_HANDLE nullptr
46 
47 #ifdef __ANDROID__
48  #define TABLET
49 #elif defined(__IPHONEOS__)
50  #define TABLET
51 #endif
52 
53 #ifdef __WINDOWS__
54  #include<xutility>
55 #else
56  #include <locale.h>
57  #define sprintf_s(a,b,c,d) sprintf(a,c,d)
58  #define localtime_s(a,b) a = localtime(b)
59 #endif