You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
647 B
C++

#include "epilogues.h"
#include "../debug/output.h"
#include "guard.h"
#include "../thread/scheduler.h"
extern Key kout_key;
extern Scheduler sch;
namespace Epilogues {
void keyboard(Vault& g) {
g.kout.setPos(0,0);
g.kout << kout_key.ascii() << flush ;
}
void timer(Vault& g) {
static int counter = 0;
int x, y;
if(Core::getID() == 0) {
g.kout.getPos(x, y);
g.kout.setPos(65U, 0U);
g.kout << counter++ << " " << flush;
g.kout.setPos(x, y);
}
sch.resume(true);
}
void assassin(Vault& g) {
if (sch.active()->kill_flag) {
sch.exit();
}
}
}; // namespace Epilogues