Difference between revisions of "Libfov"

From RogueBasin
Jump to navigation Jump to search
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
A field of view library - can be found here:
{{library| name = libfov
http://members.optusnet.com.au/puyo/libfov.html
|developer = blue.puyo
|released =
|updated = Sep 19, 2009 (1.0.4)
|dependencies =
|status =
|licensing = MIT License
|language = [[C]]
|platforms =
|site = http://code.google.com/p/libfov/
}}{{stub}}


 
Field of View library. See the [http://code.google.com/p/libfov/ libfov homepage] for all your libfov documentation, support, bugs, etc.
Some help from Radomir 'The Sheep' Dopieralski can be found on this rgrd thread:
[[category:FOV]]
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
 
Annoyances: although libfov is a c library, for some reason compiling a file that contains #include <fov/fov.h> need to be compiled as a c++ program and not as a c program.
''
For instance:''
A file containing the following:
<pre><nowiki>
#include <fov/fov.h>
 
int
main(){
    return 0;
}
</nowiki></pre>
 
will compile as libfov-test.cpp but if named libfov-test.c (and therefor compiled as a c file), gcc will produce the following error:
<pre><nowiki>
In file included from libfov-test.c:1:
/usr/local/include/fov/fov.h:68: error: syntax error before ‘bool’
/usr/local/include/fov/fov.h:83: error: syntax error before ‘}’ token
/usr/local/include/fov/fov.h:102: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:123: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:150: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:161: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:169: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:169: error: syntax error before ‘)’ token
/usr/local/include/fov/fov.h:177: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:177: error: syntax error before ‘)’ token
/usr/local/include/fov/fov.h:185: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:197: error: syntax error before ‘*’ token
/usr/local/include/fov/fov.h:218: error: syntax error before ‘*’ token
make: *** [libfov-test.o] Error 1
</nowiki></pre>
 
 
--this page needs to be expanded!

Latest revision as of 22:55, 9 March 2011

libfov
Library project
Developer blue.puyo
Released
Updated Sep 19, 2009 (1.0.4)
Status
Licensing MIT License
P. Language C
Platforms
Dependencies
Official site of libfov


Field of View library. See the libfov homepage for all your libfov documentation, support, bugs, etc.