Skip to content

Instantly share code, notes, and snippets.

/main.prg Secret

Created November 16, 2017 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/f59d7b7ed5afccb9020c84e011792199 to your computer and use it in GitHub Desktop.
Save anonymous/f59d7b7ed5afccb9020c84e011792199 to your computer and use it in GitHub Desktop.
BeenuGD Test
import "mod_video"
import "mod_screen";
import "mod_text"
import "mod_key"
import "mod_string"
import "mod_proc"
import "mod_say"
import "mod_map"
GLOBAL
byte g_iFinish = false;
byte g_bDEBUG = false;
byte g_iMainFPS = 60;
int g_iWidthRES = 640;
int g_iHeightRES = 480;
int g_iColors = MODE_16BITS;
//Fuentes
int fntDef = 0;
int fntDig = 0;
//FpgFiles
int mainFpg = 0;
int gameFpg = 0;
//Propias de iGame
int g_iMinGotcha = 348;
int g_iMaxGotcha = 356;
int g_iGotcha = 340;
int g_iSpeed = 1;
int g_iWait = 2;
int themes[6][3];
//Game items
int g_iPoints = 0;
//KeyPositions
byte chordDL = 1; //Down Left
byte chordDC = 2; //Down Center
byte chordDR = 3; //Down Right
byte chordUL = 4; //Up left
byte chordUR = 5; //Up right
byte chordSC = 6; //Scract
END
CONST
maxYposition = 350;
END
Process Main()
Private
byte p_bContinue = 0;
int t = 0;
End
Begin
CloseGame();
RunGame(1);
Loop
frame;
End
End
Process CloseGame()
Private
End
Begin
Repeat
frame;
Until(key(_ESC))
exit();
End
Process RunGame(byte sg)
Private
int prc_Points = 0;
End
Begin
g_iWait = 0;
put_screen(gameFpg, 7);
Load(sg);
Play();
While(g_iFinish != 1)
frame;
End
//ESTE ES EL TEXTO QUE QUIERO QUE SALGA CUANDO TERMINE TODO EL PROCESO
write(0, g_iWidthRES/2, g_iHeightRES/2, 1, "TERMINO");
Loop
frame;
End
End
Process Play()
Private
int songs = 0;
int chords = 0;
int counter = 1;
byte steps = 5;
End
Begin
//OJO CON ESTE WRITE_VAR
write_var(fntDig,500,420,0, g_iPoints);
for(songs = 0; songs < 1; songs++)
for(chords = 0; chords <= steps; chords++)
Show(themes[chords][0], themes[chords][2]);
frame;
end
end
While(SON != 0)
if(SON.finalice == 1) signal(SON, S_KILL); end
frame;
End
g_iFinish = 1;
End
Process Show(int milis, byte chordID)
Private
int count = 0;
int keyPress = 0;
End
Begin
While(count <= milis)
count++;
frame;
End
FILE = gameFpg;
GRAPH = chordID;
X = chordID;
Y = 0;
Z = 97;
While(Y <= maxYposition)
Y += g_iSpeed;
X = X;
chordYPosition = Y;
If(Y >= maxYposition) break; End
frame;
End
finalice = 1;
End
//OJO CON ESTE PROCESO
Process SetPoints()
Begin
Loop
write_var(fntDig,500,420,0, g_iPoints);
frame;
End
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment