From 9d6d723846d737b0bcc6b51afefcf313f723dcd0 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Mon, 10 Oct 2022 16:13:12 -0300 Subject: feat Move configuration from YAML file to game --- test/config/init.yaml | 4 ---- test/src/main.rb | 6 ++++++ test/test | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 test/config/init.yaml (limited to 'test') diff --git a/test/config/init.yaml b/test/config/init.yaml deleted file mode 100644 index 0a7fdcf..0000000 --- a/test/config/init.yaml +++ /dev/null @@ -1,4 +0,0 @@ -name: "Candy Gear Test" -screen: - width: 1280 - height: 720 diff --git a/test/src/main.rb b/test/src/main.rb index aaffbfb..be0ae0b 100644 --- a/test/src/main.rb +++ b/test/src/main.rb @@ -16,6 +16,12 @@ CAMERA_ROTATION_SPEED = Math::PI/45; BOX_ROTATION_SPEED = Math::PI/180; TRANSLATION_SPEED = 0.5; +def config() + CandyGear.game_name = "Candy Gear Test"; + CandyGear::Graphic.display_width = 1280; + CandyGear::Graphic.display_height = 720; +end + def init() texture = CandyGear::Texture.from_image("textures/color_texture.png"); mesh = CandyGear::Mesh.new("meshes/cube.cgmesh"); diff --git a/test/test b/test/test index 0d3dede..ec6c529 100755 --- a/test/test +++ b/test/test @@ -1,2 +1,2 @@ #!/bin/bash -candy_gear config/init.yaml test.mrb +candy_gear test.mrb -- cgit v1.2.3