Skip to content
Snippets Groups Projects
Commit a278ff1e authored by deuce's avatar deuce
Browse files

Do "proper" ansic() translation, and reset the colour after each \n since

this is how prompt()/print() behave.  Colours should be "right" now.
parent 8560e627
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,7 @@ function find_player()
var found=false;
var i;
if(messagefile.length==0) {
if((!messagefile.exists) || messagefile.length==0) {
messagefile.open('a');
messagefile.writeln('Current file begins on '+system.datestr()+'.');
messagefile.writeln('');
......@@ -306,7 +306,7 @@ function check_played(i)
function logon(a)
{
var j=' ';
ansic(5);
ansic(4);
console.print(j);
console.print('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»\r\n');
ansic(4);
......@@ -404,6 +404,7 @@ function logon(a)
ansic(2);
console.print('!\r\n');
}
ansic(0);
}
function general_instructions()
......@@ -490,6 +491,7 @@ function mc_main()
setcol(1);
console.print("Do you wish to see what's\r\n");
console.print("happened to the others in the game? ");
setcol(0);
if(yn()) {
console.printfile(messagefile.name);
console.pause();
......@@ -497,7 +499,6 @@ function mc_main()
done=false;
slot=roul=twenty=bacc=false;
do {
ansic(7);
tleft();
checkhangup();
if(hangup)
......
......@@ -161,8 +161,50 @@ function tleft() {}
function sysoplog() {}
function ansic(x) {
// TODO: This needs a proper mapping...
console.attributes=x;
if(x==1 || x==0)
x=0;
else {
if(x==2)
x=7;
else
x-=2;
}
switch(x) {
case 0:
console.attributes=7;
break;
case 1:
console.attributes=LIGHTCYAN;
break;
case 2:
console.attributes=YELLOW;
break;
case 3:
console.attributes=MAGENTA;
break;
case 4:
console.attributes=WHITE|BG_BLUE;
break;
case 5:
console.attributes=GREEN;
break;
case 6:
console.attributes=LIGHTRED|BLINK;
break;
case 7:
console.attributes=LIGHTBLUE;
break;
case 8:
console.attributes=BLUE;
break;
case 9:
console.attributes=CYAN;
break;
default:
console.attributes=7;
break;
}
}
function checkhangup()
......@@ -1079,6 +1121,7 @@ function date_kathy()
console.crlf();
ansic(8);
console.print("FOOLED YOU DIDN'T I!"+'\r\n');
ansic(0);
console.crlf();
console.print("This is a family program, so leaving out the details, let's just say"+'\r\n');
console.print('that you leave the suite 12 hours later, with a smile on your face and'+'\r\n');
......
......@@ -69,6 +69,7 @@ function slots_process_bets()
ansic(4); console.print('*** ');
ansic(8); console.print('JACKPOT');
ansic(4); console.print(' ***\r\n');
ansic(0);
sysoplog(player.name+'WON THE JACKPOT!!!');
console.crlf();
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment