More CleanUp of JabyEngine/PoolBox
This commit is contained in:
@@ -5,25 +5,6 @@ namespace ControllerTest {
|
||||
using DigitalButton = Periphery::AnalogeController::Button;
|
||||
using namespace JabyEngine;
|
||||
|
||||
// This should go to JabyEngine eventually
|
||||
template<typename T>
|
||||
static GPU::Link* link_array(GPU::Link* last_prim, T* elements, size_t length) {
|
||||
for(size_t n = 0; n < length; n++) {
|
||||
last_prim->concat(elements[n]);
|
||||
last_prim = &elements[n];
|
||||
}
|
||||
|
||||
last_prim->terminate();
|
||||
return last_prim;
|
||||
}
|
||||
|
||||
template<typename T, size_t N>
|
||||
static GPU::Link* link_array(GPU::Link* last_prim, T(&elements)[N]) {
|
||||
return link_array(last_prim, elements, N);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
static void set_active(GPU::SPRT_16::Linked& sprt, bool is_active) {
|
||||
sprt->tex_offset.y = is_active ? 16 : 0;
|
||||
}
|
||||
@@ -71,7 +52,7 @@ namespace ControllerTest {
|
||||
|
||||
void ControllerState :: setup() {
|
||||
for(size_t n = 0; n < 2; n++) {
|
||||
link_array(link_array(&this->tex_page[n], this->buttons[n]), this->arrows[n]);
|
||||
GPU::LinkHelper::link_array(GPU::LinkHelper::link_array(&this->tex_page[n], this->buttons[n]), this->arrows[n]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user