Files
corelang/modules/Multimedia.core

65 lines
1.3 KiB
Core

/*
Library for making games/graphical applications
* The api is very simple, very few function calls
* You retrieve information about the state of application from "Mu" struct
* Data is available in many different formats to avoid format conversions in user code
API and name inspired by one of Per Vognsen streams
https://www.youtube.com/watch?v=NG_mUhc8LRw&list=PLU94OURih-CjrtFuazwZ5GYzTrupOMDL7&index=19
All of his channel is recommended watch for programmers.
*/
StartMultimedia :: W32.StartMultimedia
UpdateMultimedia :: W32.UpdateMultimedia
Mu: MU
MU :: struct
screen: *U32
window: MUWindow
key: [Key.Count]KeyState
mouse: Mouse
frame_count: U64
time: MUTime
quit: Bool
frame_arena: Arena
os: W32.OS
MUWindow :: struct
x: S64
y: S64
sizef: Vec2
MUTime :: struct
total : F64
delta : F64 // @modifiable
start : F64
frame_start: F64
KeyState :: struct
down: Bool
Key :: enum
Nil
Up;Down;Left;Right;Escape;Control;Backspace;Alt;Shift;Tab
F1;F2;F3;F4;F5;F6;F7;F8;F9;F10
F11;F12;A;B;C;D;E;F;G;H
I;J;K;L;M;N;O;P;Q;R
S;T;U;V;W;X;Y;Z;K0;K1
K2;K3;K4;K5;K6;K7;K8;K9
Count
Mouse :: struct
left: KeyState
right: KeyState
middle: KeyState
wheel: S64
#import "Base.core"
#import "Math.core"
#import "Arena.core"
W32 :: #load "win32_multimedia.core"