Improving multimedia, trying to add a single c library mode
This commit is contained in:
@@ -1,20 +1,25 @@
|
||||
#import "Base.core"
|
||||
#import "Math.core"
|
||||
#import "Arena.core"
|
||||
W32 :: #load "win32_multimedia.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
|
||||
scrn: *U32
|
||||
x : S64
|
||||
y : S64
|
||||
screen: *U32
|
||||
window: MUWindow
|
||||
|
||||
key: [Key.Count]KeyState
|
||||
mouse: Mouse
|
||||
frame_count: U64
|
||||
time: MUTime
|
||||
quit: Bool
|
||||
@@ -22,6 +27,12 @@ MU :: struct
|
||||
frame_arena: Arena
|
||||
os: W32.OS
|
||||
|
||||
MUWindow :: struct
|
||||
x: S64
|
||||
y: S64
|
||||
sizef: Vec2
|
||||
|
||||
|
||||
MUTime :: struct
|
||||
total : F64
|
||||
delta : F64 // @modifiable
|
||||
@@ -29,7 +40,7 @@ MUTime :: struct
|
||||
frame_start: F64
|
||||
|
||||
KeyState :: struct
|
||||
is_down: Bool
|
||||
down: Bool
|
||||
|
||||
Key :: enum
|
||||
Nil
|
||||
@@ -41,5 +52,13 @@ Key :: enum
|
||||
K2;K3;K4;K5;K6;K7;K8;K9
|
||||
Count
|
||||
|
||||
StartMultimedia :: W32.StartMultimedia
|
||||
UpdateMultimedia :: W32.UpdateMultimedia
|
||||
Mouse :: struct
|
||||
left: KeyState
|
||||
right: KeyState
|
||||
middle: KeyState
|
||||
wheel: S64
|
||||
|
||||
#import "Base.core"
|
||||
#import "Math.core"
|
||||
#import "Arena.core"
|
||||
W32 :: #load "win32_multimedia.core"
|
||||
|
||||
Reference in New Issue
Block a user