summaryrefslogtreecommitdiff
path: root/src/view_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/view_2d.cpp')
-rw-r--r--src/view_2d.cpp30
1 files changed, 15 insertions, 15 deletions
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<std::shared_ptr<VK::View2D>*>(obj);
+ auto ptr = static_cast<std::shared_ptr<BluCat::View2D>*>(obj);
ptr->~shared_ptr();
mrb_free(mrb, ptr);
@@ -38,35 +38,35 @@ cg_cView2D_initialize(mrb_state *mrb, mrb_value self)
{
std::shared_ptr<glm::vec4> *region;
mrb_float projection_width, projection_height;
- std::shared_ptr<VK::View2D> *ptr;
+ std::shared_ptr<BluCat::View2D> *ptr;
mrb_get_args(mrb, "dff", &region, &cg_vector_4d_type,
&projection_width, &projection_height);
- ptr = (std::shared_ptr<VK::View2D>*)DATA_PTR(self);
+ ptr = (std::shared_ptr<BluCat::View2D>*)DATA_PTR(self);
if(ptr) mrb_free(mrb, ptr);
- ptr = (std::shared_ptr<VK::View2D>*)mrb_malloc(
- mrb, sizeof(std::shared_ptr<VK::View2D>));
+ ptr = (std::shared_ptr<BluCat::View2D>*)mrb_malloc(
+ mrb, sizeof(std::shared_ptr<BluCat::View2D>));
- new(ptr)std::shared_ptr<VK::View2D>(
- std::make_shared<VK::View2D>(
+ new(ptr)std::shared_ptr<BluCat::View2D>(
+ std::make_shared<BluCat::View2D>(
*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<std::shared_ptr<VK::View2D>*>(
+ view_2d = static_cast<std::shared_ptr<BluCat::View2D>*>(
DATA_PTR(view_value))->get();
else if (type == &cg_view_3d_type)
- view_2d = static_cast<VK::View2D*>(
- static_cast<std::shared_ptr<VK::View3D>*>(
+ view_2d = static_cast<BluCat::View2D*>(
+ static_cast<std::shared_ptr<BluCat::View3D>*>(
DATA_PTR(view_value))->get());
else
mrb_raisef(