diff --git a/src/hollywoo/Director.hx b/src/hollywoo/Director.hx index 5822fcb..54b7669 100644 --- a/src/hollywoo/Director.hx +++ b/src/hollywoo/Director.hx @@ -1,6 +1,6 @@ package hollywoo; -import hollywoo.Stage; +import hollywoo.Scene; enum Appearance { FirstAppearance; @@ -10,6 +10,6 @@ enum Appearance { typedef Continuation = Void -> Void; interface Director { - function showSet(set:Set, appearance:Appearance, cc:Continuation):Void; + function showScene(scene:Scene, appearance:Appearance, cc:Continuation):Void; function showCharacter(character:Character, appearance:Appearance, cc:Continuation):Void; } diff --git a/src/hollywoo/Movie.hx b/src/hollywoo/Movie.hx new file mode 100644 index 0000000..985f707 --- /dev/null +++ b/src/hollywoo/Movie.hx @@ -0,0 +1,13 @@ +package hollywoo; + +import kiss.AsyncEmbeddedScript; + +/** + * Model of a Hollywoo film + */ +@:build(kiss.Kiss.build()) +class Movie extends AsyncEmbeddedScript { + // TODO for some reason this wasn't working when declared in Movie.kiss: + // Mutable representation of frames in time: + var scenes:Map> = []; +} diff --git a/src/hollywoo/Movie.kiss b/src/hollywoo/Movie.kiss new file mode 100644 index 0000000..a16e8f0 --- /dev/null +++ b/src/hollywoo/Movie.kiss @@ -0,0 +1,6 @@ +// Mostly immutable, reusable resources: +(prop :Map sets (new Map)) +(prop :Map actors (new Map)) + +// "View" in the Model-View-Controller architecture: +(defNew [&prop :Director director] (super)) \ No newline at end of file diff --git a/src/hollywoo/Stage.hx b/src/hollywoo/Scene.hx similarity index 51% rename from src/hollywoo/Stage.hx rename to src/hollywoo/Scene.hx index ac272a7..103a783 100644 --- a/src/hollywoo/Stage.hx +++ b/src/hollywoo/Scene.hx @@ -1,7 +1,5 @@ package hollywoo; -import kiss.EmbeddedScript; - enum SceneTime { Morning; Day; @@ -27,17 +25,3 @@ typedef Scene = { time:SceneTime, perspective:ScenePerspective }; - -/** - * Model of a Hollywoo film - */ -@:build(kiss.Kiss.build()) -class Stage extends kiss.AsyncEmbeddedScript { - // Mostly immutable, reusable resources: - var sets:Map = []; - var actors:Map = []; - - - // Mutable representation of frames in time: - var scenes:Map> = []; -} diff --git a/src/hollywoo/Stage.kiss b/src/hollywoo/Stage.kiss deleted file mode 100644 index 14a6f2e..0000000 --- a/src/hollywoo/Stage.kiss +++ /dev/null @@ -1,2 +0,0 @@ -// "View" in the Model-View-Controller architecture: -(defNew [&prop :Director director] (super)) \ No newline at end of file