Tiny refactor

This commit is contained in:
2024-10-18 16:12:24 +02:00
parent 8ee000ab74
commit 1d5b4499a4
38 changed files with 645 additions and 637 deletions

View File

@@ -58,15 +58,15 @@ deserialize_entity :: (scene: *Scene, path: string) -> *Entity {
//
new_block :: (scene: *Scene = null) -> *Block { _scene := scene;
if _scene == null {
_scene = current_scene; }
_scene = engine.current_scene; }
p, locator := find_and_occupy_empty_slot(*_scene.by_type._Block); p._locator = locator; register_entity(_scene, p); p.transform = create_identity_transform(); init_entity(p); return p; }
new_character :: (scene: *Scene = null) -> *Character { _scene := scene;
if _scene == null {
_scene = current_scene; }
_scene = engine.current_scene; }
p, locator := find_and_occupy_empty_slot(*_scene.by_type._Character); p._locator = locator; register_entity(_scene, p); p.transform = create_identity_transform(); init_entity(p); return p; }
new_item :: (scene: *Scene = null) -> *Item { _scene := scene;
if _scene == null {
_scene = current_scene; }
_scene = engine.current_scene; }
p, locator := find_and_occupy_empty_slot(*_scene.by_type._Item); p._locator = locator; register_entity(_scene, p); p.transform = create_identity_transform(); init_entity(p); return p; }
//