41 lines
826 B
Text
41 lines
826 B
Text
G: *struct {
|
|
allocator: Allocator;
|
|
iterations: int;
|
|
};
|
|
|
|
#program_export max_memory: u64 = 4 * Gigabyte;
|
|
#program_export state_size: u64 = size_of(type_of(G.*));
|
|
|
|
#program_export init :: (state: *void, allocator: Allocator, reset: bool) {
|
|
print("in: init\n");
|
|
|
|
G = xx state;
|
|
G.allocator = allocator;
|
|
}
|
|
|
|
#program_export setup :: () {
|
|
print("in: setup\n");
|
|
}
|
|
|
|
#program_export teardown :: () {
|
|
print("in: teardown\n");
|
|
}
|
|
|
|
#program_export frame :: () -> reload.Status {
|
|
G.iterations += 1; // change this line and rebuild the program library
|
|
|
|
print("in frame, count: %\n", G.iterations);
|
|
sleep_milliseconds(1000);
|
|
return .none;
|
|
}
|
|
|
|
#import "Basic";
|
|
|
|
#import "jx";
|
|
|
|
#poke_name reload frame;
|
|
#poke_name reload init;
|
|
#poke_name reload setup;
|
|
#poke_name reload teardown;
|
|
|
|
reload :: #import "jx/reload";
|