-Demos:
*added ImGUI styles *added new assets (fonts, shaders) *added cimgui.dll *added imports for bindbc-sdl (for WASM) *added simple demo *added demo launcher *added snake demo *impoved demo utils *added cimgui.bc library for WASM -improved wasm build script -small change in vector
This commit is contained in:
parent
73f2aa6861
commit
cb7609dcaa
82 changed files with 11188 additions and 413 deletions
69
demos/external/wasm_imports/bindbc/sdl/bind/sdl.d
vendored
Normal file
69
demos/external/wasm_imports/bindbc/sdl/bind/sdl.d
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
|
||||
// Copyright Michael D. Parker 2018.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
module bindbc.sdl.bind.sdl;
|
||||
|
||||
import bindbc.sdl.config;
|
||||
|
||||
static if(sdlSupport >= SDLSupport.sdl209) {
|
||||
enum : uint {
|
||||
SDL_INIT_TIMER = 0x00000001,
|
||||
SDL_INIT_AUDIO = 0x00000010,
|
||||
SDL_INIT_VIDEO = 0x00000020,
|
||||
SDL_INIT_JOYSTICK = 0x00000200,
|
||||
SDL_INIT_HAPTIC = 0x00001000,
|
||||
SDL_INIT_GAMECONTROLLER = 0x00002000,
|
||||
SDL_INIT_EVENTS = 0x00004000,
|
||||
SDL_INIT_SENSOR = 0x00008000,
|
||||
SDL_INIT_NOPARACHUTE = 0x00100000,
|
||||
SDL_INIT_EVERYTHING =
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO |
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER |
|
||||
SDL_INIT_EVENTS | SDL_INIT_SENSOR
|
||||
}
|
||||
} else {
|
||||
enum : uint {
|
||||
SDL_INIT_TIMER = 0x00000001,
|
||||
SDL_INIT_AUDIO = 0x00000010,
|
||||
SDL_INIT_VIDEO = 0x00000020,
|
||||
SDL_INIT_JOYSTICK = 0x00000200,
|
||||
SDL_INIT_HAPTIC = 0x00001000,
|
||||
SDL_INIT_GAMECONTROLLER = 0x00002000,
|
||||
SDL_INIT_EVENTS = 0x00004000,
|
||||
SDL_INIT_NOPARACHUTE = 0x00100000,
|
||||
SDL_INIT_EVERYTHING =
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO |
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER |
|
||||
SDL_INIT_EVENTS
|
||||
}
|
||||
}
|
||||
|
||||
version(BindSDL_Static) {
|
||||
extern(C) @nogc nothrow {
|
||||
int SDL_Init(uint);
|
||||
int SDL_InitSubSystem(uint);
|
||||
void SDL_QuitSubSystem(uint);
|
||||
uint SDL_WasInit(uint);
|
||||
void SDL_Quit();
|
||||
}
|
||||
}
|
||||
else {
|
||||
extern(C) @nogc nothrow {
|
||||
alias pSDL_Init = int function(uint);
|
||||
alias pSDL_InitSubSystem = int function(uint);
|
||||
alias pSDL_QuitSubSystem = void function(uint);
|
||||
alias pSDL_WasInit = uint function(uint);
|
||||
alias pSDL_Quit = void function();
|
||||
}
|
||||
|
||||
__gshared {
|
||||
pSDL_Init SDL_Init;
|
||||
pSDL_InitSubSystem SDL_InitSubSystem;
|
||||
pSDL_QuitSubSystem SDL_QuitSubSystem;
|
||||
pSDL_WasInit SDL_WasInit;
|
||||
pSDL_Quit SDL_Quit;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue