author | ecalot
<ecalot> 2004-03-23 21:09:14 UTC |
committer | ecalot
<ecalot> 2004-03-23 21:09:14 UTC |
parent | ba205279118f24ddfcf23d9276d44dc74d3f90f2 |
FP/src/include/input.h | +40 | -0 |
FP/src/include/main.h | +38 | -0 |
FP/src/include/output.h | +52 | -0 |
FP/src/include/resources.h | +44 | -0 |
FP/src/main.c | +66 | -0 |
diff --git a/FP/src/include/input.h b/FP/src/include/input.h new file mode 100644 index 0000000..3b41c5c --- /dev/null +++ b/FP/src/include/input.h @@ -0,0 +1,40 @@ +/* Princed V3 - Prince of Persia Level Editor for PC Version + Copyright (C) 2003 Princed Development Team + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The authors of this program may be contacted at http://forum.princed.com.ar +*/ + +/* +input.h: Free Prince : Input devices handling +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf + Copyright 2004 Princed Development Team + Created: 24 Aug 2003 + + Author: name <name.cod@princed.com.ar> + + Note: + DO NOT remove this copyright notice +*/ + +#ifndef _INPUT_H_ +#define _INPUT_H_ + +typeDef key + +tKey getKey(); + +#endif diff --git a/FP/src/include/main.h b/FP/src/include/main.h new file mode 100644 index 0000000..609a03f --- /dev/null +++ b/FP/src/include/main.h @@ -0,0 +1,38 @@ +/* Princed V3 - Prince of Persia Level Editor for PC Version + Copyright (C) 2003 Princed Development Team + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The authors of this program may be contacted at http://forum.princed.com.ar +*/ + +/* +resources.h: Princed Resources : Resource Handler headers +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf + Copyright 2003 Princed Development Team + Created: 24 Mar 2004 + + Author: Endfhgfhgfhg <efghgfdht.cod@princed.com.ar> + + Note: + DO NOT remove this copyright notice +*/ + +#ifndef _MAIN_H_ +#define _MAIN_H_ + + + +#endif diff --git a/FP/src/include/output.h b/FP/src/include/output.h new file mode 100644 index 0000000..4cdbc17 --- /dev/null +++ b/FP/src/include/output.h @@ -0,0 +1,52 @@ +/* Princed V3 - Prince of Persia Level Editor for PC Version + Copyright (C) 2003 Princed Development Team + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The authors of this program may be contacted at http://forum.princed.com.ar +*/ + +/* +resources.h: Free Prince : Output Devices Handler +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf + Copyright 2004 Princed Development Team + Created: 23 Mar 2004 + + Author: vhgh <fhdht.cod@princed.com.ar> + + Note: + DO NOT remove this copyright notice +*/ + +#ifndef _OUTPUT_H_ +#define _OUTPUT_H_ + +/* Text Primitives*/ +drawText(const char* text); +drawMessage(const char* text); + +/* Sound */ +playWav(tWave sound); +playMid(tMidi music); + +/* Graph */ +drawBitmap(tImage image); +clearScreen(); + +/* Initialization */ +startGraphicMode(); +stopGraphicMode(); + +#endif diff --git a/FP/src/include/resources.h b/FP/src/include/resources.h new file mode 100644 index 0000000..4340867 --- /dev/null +++ b/FP/src/include/resources.h @@ -0,0 +1,44 @@ +/* Princed V3 - Prince of Persia Level Editor for PC Version + Copyright (C) 2003 Princed Development Team + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The authors of this program may be contacted at http://forum.princed.com.ar +*/ + +/* +resources.h: Free Prince : Resource Handler +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf + Copyright 2003,2004 Princed Development Team + Created: 23 Mar 2004 + + Author: Enrique Calot <ecalot.cod@princed.com.ar> + + Note: + DO NOT remove this copyright notice +*/ + +#ifndef _RESOURCES_H_ +#define _RESOURCES_H_ + +int resOpenFile(const char* file); +resCloseFile(int fd); +resCloseAllFiles(); + +tMidi resGetMidi(int fd,int resId); +tWave resGetWave(int fd,int resId); +tImage resGetImage(int df, int resId); + +#endif diff --git a/FP/src/main.c b/FP/src/main.c new file mode 100644 index 0000000..eecfed8 --- /dev/null +++ b/FP/src/main.c @@ -0,0 +1,66 @@ +/* Princed V3 - Prince of Persia Level Editor for PC Version + Copyright (C) 2003 Princed Development Team + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + The authors of this program may be contacted at http://forum.princed.com.ar +*/ + +/* +resources.h: Princed Resources : Resource Handler headers +\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf + Copyright 2003 Princed Development Team + Created: 24 Mar 2004 + + Author: Endfhgfhgfhg <efghgfdht.cod@princed.com.ar> + + Note: + DO NOT remove this copyright notice +*/ + +#include "input.h" +#include "interpreter.h" +#include "main.h" +#include "output.h" +#include "parse.h" +#include "resources.h" + +int main(int argc,char** argv) { + tGame game; + int playing; + + /* Parse game */ + game=parseFile("engine.dat"); + if (!game) { + printf("Game couldn't be loaded\n"); + return 0; + } + + /* Initialize Devices */ + startGraphicMode(); + + /* Start interpreter */ + if (!initGame(game)) return 0; + + /* Main Loop */ + while(performActions(getKey())); + + /* End */ + stopGraphicMode(); + freeGame(game); + return 1; +} + +