Previously it wasnt working but now its working, TRUST ME
This commit is contained in:
64
build/modules/Multimedia.core
Normal file
64
build/modules/Multimedia.core
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
|
||||
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.
|
||||
|
||||
*/
|
||||
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: Platform
|
||||
|
||||
MUWindow :: struct
|
||||
x: S64
|
||||
y: S64
|
||||
sizef: Vec2
|
||||
size: Vec2I
|
||||
resizable: Bool
|
||||
|
||||
MUTime :: struct
|
||||
total : F64
|
||||
delta : F64 // @modifiable
|
||||
start : F64
|
||||
frame_start: F64
|
||||
|
||||
KeyState :: struct
|
||||
down: Bool
|
||||
|
||||
Key :: enum
|
||||
None
|
||||
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 "MathF32.core"
|
||||
#import "MathVec2.core"
|
||||
#import "Arena.core"
|
||||
#load "$os_multimedia.core"
|
||||
Reference in New Issue
Block a user