diff options
| author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 14:44:48 +0100 | 
|---|---|---|
| committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-17 14:44:48 +0100 | 
| commit | 4080a2eec207b35b36f7d0ceae7c2afcfcdfd977 (patch) | |
| tree | dfb0f2df5f07719ff08c471853a30c388d211a9e /src | |
| parent | 0ce74416985061dee60253221a77e6b06b4ed12b (diff) | |
small changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/crepe/api/Script.h | 1 | ||||
| -rw-r--r-- | src/crepe/facade/Font.cpp | 2 | ||||
| -rw-r--r-- | src/example/loadfont.cpp | 4 | 
3 files changed, 3 insertions, 4 deletions
| diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h index 8bca38a..668e5d1 100644 --- a/src/crepe/api/Script.h +++ b/src/crepe/api/Script.h @@ -185,7 +185,6 @@ private:  	 *  	 * \{  	 */ -  	//! Game object ID of game object parent BehaviorScript is attached to  	game_object_id_t game_object_id;  	//! Reference to parent component diff --git a/src/crepe/facade/Font.cpp b/src/crepe/facade/Font.cpp index f202c05..771002f 100644 --- a/src/crepe/facade/Font.cpp +++ b/src/crepe/facade/Font.cpp @@ -9,7 +9,7 @@ using namespace std;  using namespace crepe;  Font::Font(const Asset & src, Mediator & mediator) : Resource(src, mediator) { -	Config & config = Config::get_instance(); +	const Config & config = Config::get_instance();  	const std::string FONT_PATH = src.get_path();  	TTF_Font * loaded_font = TTF_OpenFont(FONT_PATH.c_str(), config.font.size);  	if (loaded_font == NULL) { diff --git a/src/example/loadfont.cpp b/src/example/loadfont.cpp index 6fb9760..78b3adb 100644 --- a/src/example/loadfont.cpp +++ b/src/example/loadfont.cpp @@ -30,8 +30,8 @@ int main() {  		std::cout << label->font.value().get_path() << std::endl;  		// label2->font = std::make_optional(asset);  		// std::cout << "Path: " << label2->font.get_path() << std::endl; -		// ResourceManager & resource_mgr = mediator.resource_manager; -		// const Font & res = resource_manager.get<Font>(label->font); +		ResourceManager & resource_mgr = mediator.resource_manager; +		const Font & res = resource_manager.get<Font>(label->font.value());  		// TTF_Font * test_font = res.get_font();  		// if (test_font == NULL) {  		// 	std::cout << "error with font" << std::endl; |