- new debug system
This commit is contained in:
37
main.cpp
37
main.cpp
@@ -1,36 +1,9 @@
|
||||
#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;
|
||||
}
|
||||
settrans(255);
|
||||
setcolor(0,0xff0000);
|
||||
const int w=scrw();
|
||||
const int h=scrh();
|
||||
rect(0,0,w-1,h-1,0);
|
||||
}
|
||||
Reference in New Issue
Block a user