DGL
https://delphigl.com/forum/

Object Pascal port of "Managing Game States in C++"
https://delphigl.com/forum/viewtopic.php?f=19&t=3968
Seite 1 von 1

Autor:  cragwolf [ Sa Mär 26, 2005 02:48 ]
Betreff des Beitrags:  Object Pascal port of "Managing Game States in C++"

This is somewhat off-topic, but seeing as though many of us learn OpenGL to fulfill our desire to program 3D games, I hope no one will mind.

I have ported to object pascal the source code accompanying this article:

"Managing Game States in C++" by Tony Lewis
http://tonyandpaige.com/tutorials/game1.html

You can download my port from here:

http://www.urbanaustralia.org/cragwolf/ ... pas.tar.gz

(23 KB)

I have only tested it with FPC v1.9.8 and JEDI_SDL v1.0 (Beta 1) on Linux. But I see no reason why it shouldn't work on Windows with FPC or Delphi (perhaps with a few small changes). I compile it with: fpc -Sd -ostateman main.dpr

If you have any questions about it, just email me.

Autor:  KidPaddle [ Sa Mär 26, 2005 09:12 ]
Betreff des Beitrags: 

To work with Delphi, you have to change two small things.

First, add {APPTYPE CONSOLE} to main.dpr, or you get an in/out error, cause WriteLn without file parameter is only allowed in console applications.

Second, in file gameengine.pas, line 230:
Code:
  1.  
  2. Flags : Cardinal = 0;
  3.  
to
Code:
  1.  
  2. var
  3.   flags: Cardinal;
  4. begin
  5.   flags:= 0;
  6.  


Grettings
KidPaddle

Autor:  cragwolf [ So Mär 27, 2005 11:35 ]
Betreff des Beitrags: 

Thanks.

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/