import scene_object
, main_scenes

, ../vk/vulkan_record 

import std/tables 

type 
 Scene_Record_Object = object of RootObj
  current_scene*: ptr Scene
  main_scene_table*: Table[string, ptr Scene]
  current_scene_name*: Main_Scenes

 Scene_Record* = ref object of Scene_Record_Object


proc a_scene_record*( the_main_scene: Main_Scenes
                                   , current_scene: ptr Scene = nil 
                                   ): Scene_Record = 
 
 result = Scene_Record( current_scene:  current_scene
                                      , main_scene_table: initTable[string, ptr Scene]()
                                      )


proc add_scene*( scene_record: var Scene_Record
                           , scene: ptr Scene 
                           , scene_name: string
                           ) = 
 scene_record.main_scene_table[scene_name] = scene 

proc get_scene*( scene_record: var Scene_Record
                          , scene_name: string
                          ): ptr Scene = 
 scene_record.main_scene_table[scene_name]