From 756b42bf82fbd0c2dcce23e95d3394eda11af49a Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Sat, 9 Apr 2022 21:50:08 -0400 Subject: [PATCH] change the game name --- Makefile | 4 ++-- README.md | 4 ++-- doxygen.conf | 2 +- godot/Main.gdns | 2 +- godot/Main.tscn | 1 - godot/characters/player/Player.gdns | 2 +- godot/gdnative/libalai.tres | 7 +++++++ godot/gdnative/libjuego.tres | 7 ------- godot/project.godot | 3 ++- src/Main.cpp | 12 ++++++------ src/Player.cpp | 18 +++++++++--------- src/include/Main.h | 10 +++++----- src/include/Player.h | 14 +++++++------- 13 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 godot/gdnative/libalai.tres delete mode 100644 godot/gdnative/libjuego.tres diff --git a/Makefile b/Makefile index d3c418b..e651b4f 100644 --- a/Makefile +++ b/Makefile @@ -24,10 +24,10 @@ godot-cpp-windows: game: game-linux game-windows game-linux: - scons use_llvm=$(USE_LLVM) target=$(RELEASE_TYPE) target_path=godot/gdnative/ target_name=libjuego platform=linux bits=64 -j $(PROCS) + scons use_llvm=$(USE_LLVM) target=$(RELEASE_TYPE) target_path=godot/gdnative/ target_name=libalai platform=linux bits=64 -j $(PROCS) game-windows: - scons target=$(RELEASE_TYPE) target_name=libjuego target_path=godot/gdnative/ platform=windows bits=64 -j $(PROCS) + scons target=$(RELEASE_TYPE) target_name=libalai target_path=godot/gdnative/ platform=windows bits=64 -j $(PROCS) docs: # if doxygen and bear are installed create the code documentation diff --git a/README.md b/README.md index d87c67f..d7339e6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Juego +# Alai ## License -[3-Clause BSD License](LICENSE) \ No newline at end of file +[3-Clause BSD License](LICENSE) diff --git a/doxygen.conf b/doxygen.conf index bb27cef..244e1f1 100644 --- a/doxygen.conf +++ b/doxygen.conf @@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = "juego" +PROJECT_NAME = "Alai" # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version diff --git a/godot/Main.gdns b/godot/Main.gdns index 1a43cfc..764a788 100644 --- a/godot/Main.gdns +++ b/godot/Main.gdns @@ -1,6 +1,6 @@ [gd_resource type="NativeScript" load_steps=2 format=2] -[ext_resource path="res://gdnative/libjuego.tres" type="GDNativeLibrary" id=1] +[ext_resource path="res://gdnative/libalai.tres" type="GDNativeLibrary" id=1] [resource] resource_name = "Main" diff --git a/godot/Main.tscn b/godot/Main.tscn index f78d34a..d264a5c 100644 --- a/godot/Main.tscn +++ b/godot/Main.tscn @@ -5,6 +5,5 @@ [node name="Main" type="Node"] script = ExtResource( 1 ) -launch_screen = 0 [node name="Level1" parent="." instance=ExtResource( 2 )] diff --git a/godot/characters/player/Player.gdns b/godot/characters/player/Player.gdns index 047be51..40af8ae 100644 --- a/godot/characters/player/Player.gdns +++ b/godot/characters/player/Player.gdns @@ -1,6 +1,6 @@ [gd_resource type="NativeScript" load_steps=2 format=2] -[ext_resource path="res://gdnative/libjuego.tres" type="GDNativeLibrary" id=1] +[ext_resource path="res://gdnative/libalai.tres" type="GDNativeLibrary" id=1] [resource] resource_name = "Player" diff --git a/godot/gdnative/libalai.tres b/godot/gdnative/libalai.tres new file mode 100644 index 0000000..e54b81b --- /dev/null +++ b/godot/gdnative/libalai.tres @@ -0,0 +1,7 @@ +[gd_resource type="GDNativeLibrary" format=2] + +[resource] +entry/Windows.64 = "res://gdnative/windows.64/libalai.dll" +entry/X11.64 = "res://gdnative/linux.64/libalai.so" +dependency/Windows.64 = [ ] +dependency/X11.64 = [ ] diff --git a/godot/gdnative/libjuego.tres b/godot/gdnative/libjuego.tres deleted file mode 100644 index 3cc3c56..0000000 --- a/godot/gdnative/libjuego.tres +++ /dev/null @@ -1,7 +0,0 @@ -[gd_resource type="GDNativeLibrary" format=2] - -[resource] -entry/Windows.64 = "res://gdnative/windows.64/libjuego.dll" -entry/X11.64 = "res://gdnative/linux.64/libjuego.so" -dependency/Windows.64 = [ ] -dependency/X11.64 = [ ] diff --git a/godot/project.godot b/godot/project.godot index 2d33340..e1b9eb4 100644 --- a/godot/project.godot +++ b/godot/project.godot @@ -10,7 +10,8 @@ config_version=4 [application] -config/name="Juego" +config/name="Alai" +config/description="This game is for testing an Artificial Intelligence." run/main_scene="res://Main.tscn" config/icon="res://icon.png" diff --git a/src/Main.cpp b/src/Main.cpp index 6202fcf..315bf3b 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -8,9 +8,9 @@ void Main::_register_methods() { register_method("_ready", &Main::_ready); register_method("_physics_process", &Main::_physics_process); - register_property("full_screen", &Main::set_full_screen, &Main::get_full_screen, JUEGO_MAIN_FULL_SCREEN); - register_property("window_size", &Main::set_window_size, &Main::get_window_size, JUEGO_MAIN_WINDOW_SIZE); - register_property("launch_screen", &Main::set_launch_screen, &Main::get_launch_screen, JUEGO_MAIN_LAUNCH_SCREEN); + register_property("full_screen", &Main::set_full_screen, &Main::get_full_screen, ALAI_MAIN_FULL_SCREEN); + register_property("window_size", &Main::set_window_size, &Main::get_window_size, ALAI_MAIN_WINDOW_SIZE); + register_property("launch_screen", &Main::set_launch_screen, &Main::get_launch_screen, ALAI_MAIN_LAUNCH_SCREEN); } Main::Main() @@ -26,9 +26,9 @@ void Main::_init() _os = OS::get_singleton(); _input = Input::get_singleton(); - full_screen = JUEGO_MAIN_FULL_SCREEN; - window_size = JUEGO_MAIN_WINDOW_SIZE; - launch_screen = JUEGO_MAIN_LAUNCH_SCREEN; + full_screen = ALAI_MAIN_FULL_SCREEN; + window_size = ALAI_MAIN_WINDOW_SIZE; + launch_screen = ALAI_MAIN_LAUNCH_SCREEN; } void Main::_ready() diff --git a/src/Player.cpp b/src/Player.cpp index efb7fda..0b0e0fe 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -14,10 +14,10 @@ void Player::_register_methods() register_method("_physics_process", &Player::_physics_process); register_method("_on_Player_player_moved", &Player::_on_Player_player_moved); //register_property>("sprite_frames", &Player::set_sprite_frames, &Player::get_sprite_frames, Ref(), GODOT_METHOD_RPC_MODE_DISABLED, GODOT_PROPERTY_USAGE_DEFAULT, GODOT_PROPERTY_HINT_RESOURCE_TYPE, String("SpriteFrames")); - register_property("speed", &Player::set_speed, &Player::get_speed, JUEGO_PLAYER_SPEED); - register_property("jump_force", &Player::set_jump_force, &Player::get_jump_force, JUEGO_PLAYER_JUMP_FORCE); - register_property("gravity", &Player::set_gravity, &Player::get_gravity, JUEGO_PLAYER_GRAVITY); - register_property("run_speed", &Player::set_run_speed, &Player::get_run_speed, JUEGO_PLAYER_RUN_SPEED); + register_property("speed", &Player::set_speed, &Player::get_speed, ALAI_PLAYER_SPEED); + register_property("jump_force", &Player::set_jump_force, &Player::get_jump_force, ALAI_PLAYER_JUMP_FORCE); + register_property("gravity", &Player::set_gravity, &Player::get_gravity, ALAI_PLAYER_GRAVITY); + register_property("run_speed", &Player::set_run_speed, &Player::get_run_speed, ALAI_PLAYER_RUN_SPEED); register_signal("player_moved", "position", GODOT_VARIANT_TYPE_VECTOR2); } @@ -35,11 +35,11 @@ void Player::_init() _input = Input::get_singleton(); _resource_loader = ResourceLoader::get_singleton(); - //sprite_frames = _resource_loader->load(JUEGO_PLAYER_SPRITE_FRAMES); - set_speed(JUEGO_PLAYER_SPEED); - set_jump_force(JUEGO_PLAYER_JUMP_FORCE); - set_gravity(JUEGO_PLAYER_GRAVITY); - set_run_speed(JUEGO_PLAYER_RUN_SPEED); + //sprite_frames = _resource_loader->load(ALAI_PLAYER_SPRITE_FRAMES); + set_speed(ALAI_PLAYER_SPEED); + set_jump_force(ALAI_PLAYER_JUMP_FORCE); + set_gravity(ALAI_PLAYER_GRAVITY); + set_run_speed(ALAI_PLAYER_RUN_SPEED); coins = 0; diff --git a/src/include/Main.h b/src/include/Main.h index 98c5611..71c9253 100644 --- a/src/include/Main.h +++ b/src/include/Main.h @@ -1,5 +1,5 @@ -#ifndef JUEGO_MAIN_H -#define JUEGO_MAIN_H +#ifndef ALAI_MAIN_H +#define ALAI_MAIN_H #include #include @@ -9,17 +9,17 @@ /** * @brief If the game should be full screen or not by default. */ -#define JUEGO_MAIN_FULL_SCREEN false +#define ALAI_MAIN_FULL_SCREEN false /** * @brief The default size of the window. * @details This is ignored if full screen is true. */ -#define JUEGO_MAIN_WINDOW_SIZE Vector2(1280, 720) +#define ALAI_MAIN_WINDOW_SIZE Vector2(1280, 720) /** * @brief Which screen to launch the game on. * @details If -1 it will launch the game on the "active" screen. Anything between 0 and N represents the screen number to show the game on when opened. */ -#define JUEGO_MAIN_LAUNCH_SCREEN -1 +#define ALAI_MAIN_LAUNCH_SCREEN -1 /** * @brief This is the godot namespace for all the code included in the library. diff --git a/src/include/Player.h b/src/include/Player.h index 7349d47..aca9b16 100644 --- a/src/include/Player.h +++ b/src/include/Player.h @@ -1,26 +1,26 @@ -#ifndef JUEGO_PLAYER_H -#define JUEGO_PLAYER_H +#ifndef ALAI_PLAYER_H +#define ALAI_PLAYER_H /** * @brief This resource is loaded by default for the AnimatedSprite node. */ -#define JUEGO_PLAYER_SPRITE_FRAMES "res://characters/player/sprites/green.tres" +#define ALAI_PLAYER_SPRITE_FRAMES "res://characters/player/sprites/green.tres" /** * @brief The speed the player should move it. */ -#define JUEGO_PLAYER_SPEED 60.0 +#define ALAI_PLAYER_SPEED 60.0 /** * @brief The force applied to the player when jumping. */ -#define JUEGO_PLAYER_JUMP_FORCE 300.0 +#define ALAI_PLAYER_JUMP_FORCE 300.0 /** * @brief The gravity applied to the player. */ -#define JUEGO_PLAYER_GRAVITY 9.81 +#define ALAI_PLAYER_GRAVITY 9.81 /** * @brief The multiplier used to change the speed of the player when running. */ -#define JUEGO_PLAYER_RUN_SPEED 2.0 +#define ALAI_PLAYER_RUN_SPEED 2.0 #include #include