adding new vault sch
This commit is contained in:
@@ -5,32 +5,31 @@
|
|||||||
#include "../thread/scheduler.h"
|
#include "../thread/scheduler.h"
|
||||||
|
|
||||||
extern Key kout_key;
|
extern Key kout_key;
|
||||||
extern Scheduler sch;
|
|
||||||
|
|
||||||
namespace Epilogues {
|
namespace Epilogues {
|
||||||
|
|
||||||
void keyboard(Vault& g) {
|
void keyboard(Vault& v) {
|
||||||
g.kout.setPos(0,0);
|
v.kout.setPos(0,0);
|
||||||
g.kout << kout_key.ascii() << flush ;
|
v.kout << kout_key.ascii() << flush ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void timer(Vault& g) {
|
void timer(Vault& v) {
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
int x, y;
|
int x, y;
|
||||||
if(Core::getID() == 0) {
|
if(Core::getID() == 0) {
|
||||||
g.kout.getPos(x, y);
|
v.kout.getPos(x, y);
|
||||||
g.kout.setPos(65U, 0U);
|
v.kout.setPos(65U, 0U);
|
||||||
g.kout << counter++ << " " << flush;
|
v.kout << counter++ << " " << flush;
|
||||||
g.kout.setPos(x, y);
|
v.kout.setPos(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
sch.resume(true);
|
v.sch.resume(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void assassin(Vault& g) {
|
void assassin(Vault& v) {
|
||||||
if (sch.active()->kill_flag) {
|
if (v.sch.active()->kill_flag) {
|
||||||
sch.exit();
|
v.sch.exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}; // namespace Epilogues
|
}; // namespace Epilogues
|
||||||
|
|||||||
Reference in New Issue
Block a user