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.

36 lines
631 B
C++

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