add sdl2 for debugging
This commit is contained in:
parent
6da35ff25d
commit
8fcd668585
7 changed files with 263 additions and 43 deletions
46
src/example.cpp
Normal file
46
src/example.cpp
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
#include "hal.h"
|
||||
#include "col.h"
|
||||
#include "example.h"
|
||||
|
||||
|
||||
void draw_foo(int offset, int size, Node* ptr){
|
||||
Value* val = (Value*) ptr;
|
||||
print("|");
|
||||
if(ptr)
|
||||
print(ptr->title_);
|
||||
//print(ptr->state);
|
||||
print("|");
|
||||
|
||||
for(int i = 0; i<32; i++)
|
||||
draw(offset,i);
|
||||
for(int i = 0; i<size; i++)
|
||||
draw(offset+i,31-i%32);
|
||||
for(int i = 0; i<size; i++)
|
||||
draw(offset+i,31-(i+16)%32);
|
||||
}
|
||||
|
||||
void draw_blub(int offset, int size, Node* ptr){
|
||||
Value* val = (Value*) ptr;
|
||||
print("#");
|
||||
if(ptr)
|
||||
print(ptr->title_);
|
||||
//print(ptr->state);
|
||||
print("#");
|
||||
for(int i = 0; i<32;i++)
|
||||
draw(offset,i);
|
||||
}
|
||||
|
||||
void draw_menu(int offset, int size, Node* val){
|
||||
if(val&&val->title_){
|
||||
print("_");
|
||||
print(val->title_);
|
||||
print("_");
|
||||
//print(ptr->state);
|
||||
}
|
||||
|
||||
for(int i = 0; i<32;i++)
|
||||
draw(offset,i);
|
||||
for(int i = 0; i<32 && i<size;i++)
|
||||
draw(offset+(i%size),i);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue