From 43821b0cffc5aa419c0218992f06f8962ae54a13 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Wed, 8 May 2024 17:56:29 -0300 Subject: refa Rename graphical engine to BluCat --- src/view_2d.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/view_2d.cpp') diff --git a/src/view_2d.cpp b/src/view_2d.cpp index 4a973d6..09cbac1 100644 --- a/src/view_2d.cpp +++ b/src/view_2d.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2022 Frederico de Oliveira Linhares + * Copyright 2022-2024 Frederico de Oliveira Linhares * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,13 +19,13 @@ #include "sprite.hpp" #include "vector_4d.hpp" #include "view_3d.hpp" -#include "vk/sprite.hpp" -#include "vk/view_2d.hpp" +#include "blucat/sprite.hpp" +#include "blucat/view_2d.hpp" void cg_free_view_2d(mrb_state *mrb, void* obj) { - auto ptr = static_cast*>(obj); + auto ptr = static_cast*>(obj); ptr->~shared_ptr(); mrb_free(mrb, ptr); @@ -38,35 +38,35 @@ cg_cView2D_initialize(mrb_state *mrb, mrb_value self) { std::shared_ptr *region; mrb_float projection_width, projection_height; - std::shared_ptr *ptr; + std::shared_ptr *ptr; mrb_get_args(mrb, "dff", ®ion, &cg_vector_4d_type, &projection_width, &projection_height); - ptr = (std::shared_ptr*)DATA_PTR(self); + ptr = (std::shared_ptr*)DATA_PTR(self); if(ptr) mrb_free(mrb, ptr); - ptr = (std::shared_ptr*)mrb_malloc( - mrb, sizeof(std::shared_ptr)); + ptr = (std::shared_ptr*)mrb_malloc( + mrb, sizeof(std::shared_ptr)); - new(ptr)std::shared_ptr( - std::make_shared( + new(ptr)std::shared_ptr( + std::make_shared( *region->get(), projection_width, projection_height)); mrb_data_init(self, ptr, &cg_view_2d_type); return self; } -VK::View2D* +BluCat::View2D* cg_cView_to_view_2d(mrb_state *mrb, mrb_value view_value) { - VK::View2D* view_2d; + BluCat::View2D* view_2d; const mrb_data_type *type = DATA_TYPE(view_value); if(type == &cg_view_2d_type) - view_2d = static_cast*>( + view_2d = static_cast*>( DATA_PTR(view_value))->get(); else if (type == &cg_view_3d_type) - view_2d = static_cast( - static_cast*>( + view_2d = static_cast( + static_cast*>( DATA_PTR(view_value))->get()); else mrb_raisef( -- cgit v1.2.3