diff options
author | Frederico Linhares <fred@linhares.blue> | 2025-06-21 16:51:22 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2025-06-21 16:51:22 -0300 |
commit | 8bedf8a366cb6c1179bc89678c863517b9356d48 (patch) | |
tree | 4a285592f804802d59f2af090113f607344ffdce /src/candy_gear/sprite.cpp | |
parent | b3428170ac0a1837d3568f7b49312cbb01179f5d (diff) |
View2D is almost useless and add too much complexity for the engine,
so I am removing it.
Diffstat (limited to 'src/candy_gear/sprite.cpp')
-rw-r--r-- | src/candy_gear/sprite.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/candy_gear/sprite.cpp b/src/candy_gear/sprite.cpp index daf96a8..2847d76 100644 --- a/src/candy_gear/sprite.cpp +++ b/src/candy_gear/sprite.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2022-2024 Frederico de Oliveira Linhares + * Copyright 2022-2025 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. @@ -18,7 +18,6 @@ #include "texture.hpp" #include "vector_4d.hpp" -#include "view_2d.hpp" #include "../blu_cat/gra/sprite.hpp" void @@ -61,17 +60,13 @@ cg_cSprite_initialize(mrb_state *mrb, mrb_value self) static mrb_value cg_cSprite_draw(mrb_state *mrb, mrb_value self) { - mrb_value view_value; - BluCat::GRA::View2D *view_2d; mrb_float x, y, w, h, z_index{0.0}; auto ptr = (std::shared_ptr<BluCat::GRA::Sprite>*)DATA_PTR(self); - mrb_get_args(mrb, "offff|f", &view_value, &x, &y, &w, &h, &z_index); - - view_2d = cg_cView_to_view_2d(mrb, view_value); + mrb_get_args(mrb, "ffff|f", &x, &y, &w, &h, &z_index); glm::vec4 rect(x, y, x + w, y + h); - auto &sprites_to_draw = view_2d->sprites_to_draw[ + auto &sprites_to_draw = BluCat::INT::core.vk_renderer->sprites_to_draw[ BluCat::INT::core.vk_swapchain->current_frame]; sprites_to_draw.emplace_back(*ptr, rect, z_index); |