Crappy Layout
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#include "include/controller_state.hpp"
|
||||
#include <PSX/GPU/gpu.hpp>
|
||||
|
||||
namespace ControllerTest {
|
||||
using namespace JabyEngine;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
void ControllerState :: update() {
|
||||
|
||||
}
|
||||
|
||||
void ControllerState :: render() {
|
||||
GPU::render(this->tex_page[GPU::render_id()]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user