Difference between revisions of "Libfov"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
A field of view library | == A field of view library == | ||
It can be found here: | |||
http://members.optusnet.com.au/puyo/libfov.html | http://members.optusnet.com.au/puyo/libfov.html | ||
Some help from Radomir 'The Sheep' Dopieralski can be found on this rgrd thread: | Some help from Radomir 'The Sheep' Dopieralski can be found on this rgrd thread: | ||
Line 9: | Line 9: | ||
The API | == The API == | ||
http://members.optusnet.com.au/puyo/dev/libfov/html/index.html | http://members.optusnet.com.au/puyo/dev/libfov/html/index.html | ||
== Bugs == | |||
in order to be able to "#include <fov/fov.h>" and compile as a c program rather then a c++ one, you need to add the following lines before including fov.h: | |||
<pre><nowiki> | |||
#define bool int | |||
#include <math.h> | |||
</nowiki></pre> | |||
'' | '' | ||
For instance:'' | For instance:'' | ||
<pre><nowiki> | <pre><nowiki> | ||
#define bool int | |||
#include <math.h> | |||
#include <fov/fov.h> | #include <fov/fov.h> | ||
int | int | ||
main(){ | main(){ | ||
/*do stuff*/ | |||
return 0; | return 0; | ||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
--this page needs to be expanded! | --this page needs to be expanded! |
Revision as of 16:43, 7 April 2006
A field of view library
It can be found here: http://members.optusnet.com.au/puyo/libfov.html
Some help from Radomir 'The Sheep' Dopieralski can be found on this rgrd thread: http://groups.google.com/group/rec.games.roguelike.development/browse_thread/thread/986eee039aa6e279/719361fe8fc96645?hl=en
Read it if you don't understand what the map & light source data structures are all about.
The API
http://members.optusnet.com.au/puyo/dev/libfov/html/index.html
Bugs
in order to be able to "#include <fov/fov.h>" and compile as a c program rather then a c++ one, you need to add the following lines before including fov.h:
#define bool int #include <math.h>
For instance:
#define bool int #include <math.h> #include <fov/fov.h> int main(){ /*do stuff*/ return 0; }
--this page needs to be expanded!