adding new vault sch
This commit is contained in:
@@ -5,32 +5,31 @@
|
||||
#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 keyboard(Vault& v) {
|
||||
v.kout.setPos(0,0);
|
||||
v.kout << kout_key.ascii() << flush ;
|
||||
|
||||
}
|
||||
|
||||
void timer(Vault& g) {
|
||||
void timer(Vault& v) {
|
||||
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);
|
||||
v.kout.getPos(x, y);
|
||||
v.kout.setPos(65U, 0U);
|
||||
v.kout << counter++ << " " << flush;
|
||||
v.kout.setPos(x, y);
|
||||
}
|
||||
|
||||
sch.resume(true);
|
||||
v.sch.resume(true);
|
||||
}
|
||||
|
||||
void assassin(Vault& g) {
|
||||
if (sch.active()->kill_flag) {
|
||||
sch.exit();
|
||||
void assassin(Vault& v) {
|
||||
if (v.sch.active()->kill_flag) {
|
||||
v.sch.exit();
|
||||
}
|
||||
}
|
||||
}; // namespace Epilogues
|
||||
|
||||
Reference in New Issue
Block a user