[DEL] old palette functions [MODIF] mouse function names [MODIF] map function params now are ints [NEW] ascii function [NEW] strlen function
36 lines
743 B
C++
36 lines
743 B
C++
#include "mini.h"
|
|
|
|
int current_editor = 0;
|
|
|
|
void do_terminal() {
|
|
cls(0);
|
|
pdebug();
|
|
}
|
|
|
|
void do_sprite_editor() {
|
|
cls(14);
|
|
//palt(0, false);
|
|
rectfill(0, 0, 160, 7, 2);
|
|
rectfill(0, 115, 160, 119, 2);
|
|
sspr(0, 0, 128, 32, 0, 83);
|
|
sspr(0, 0, 8, 8, 8, 16, 64, 64);
|
|
rect(8, 16, 72, 80, 0);
|
|
spr(17, mousex(), mousey());
|
|
if (mbtn(1) && mousex()>=8 && mousey()>=8 && mousex()<72 && mousey()<72) {
|
|
sset((mousex()-8)/8, (mousey()-16)/8);
|
|
}
|
|
}
|
|
|
|
void loop() {
|
|
if (btnp(KEY_TAB)) {
|
|
current_editor = (++current_editor)%5;
|
|
}
|
|
switch(current_editor) {
|
|
case 0:
|
|
do_terminal();
|
|
break;
|
|
case 1:
|
|
do_sprite_editor();
|
|
break;
|
|
}
|
|
} |