scaffolding in preparation for adding simple load/export/save functionality

This commit is contained in:
2024-08-17 09:46:53 +01:00
parent 3f4c52e0d8
commit 1049f2b561
4 changed files with 26 additions and 0 deletions

BIN
dotscape

Binary file not shown.

View File

@@ -9,6 +9,10 @@ int KEY_G = GLFW_KEY_G;
int KEY_Y = GLFW_KEY_Y;
int KEY_Z = GLFW_KEY_Z;
int KEY_S = GLFW_KEY_S;
int KEY_E = GLFW_KEY_E;
int KEY_I = GLFW_KEY_I;
// Calls function exported from SML
void mouseMoveCallback(GLFWwindow *window, double xpos, double ypos) {
mltonMouseMoveCallback((float)xpos, (float)ypos);

View File

@@ -37,4 +37,11 @@ struct
_symbol "KEY_Y" public : ( unit -> int ) * ( int -> unit );
val (KEY_Z, _) =
_symbol "KEY_Z" public : ( unit -> int ) * ( int -> unit );
val (KEY_S, _) =
_symbol "KEY_S" public : ( unit -> int ) * ( int -> unit );
val (KEY_E, _) =
_symbol "KEY_E" public : ( unit -> int ) * ( int -> unit );
val (KEY_I, _) =
_symbol "KEY_I" public : ( unit -> int ) * ( int -> unit );
end

15
message-types/io-msg.sml Normal file
View File

@@ -0,0 +1,15 @@
signature IO_MESSAGE =
sig
datatype t =
SAVE_TRIANGLES of AppType.triangle list
| EXPORT_FILE of AppType.triangle list
| IMPORT_FILE
end
structure IoMessage :> IO_MESSAGE =
struct
datatype t =
SAVE_TRIANGLES of AppType.triangle list
| EXPORT_FILE of AppType.triangle list
| IMPORT_FILE
end