.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   The RealBot 'Source' (http://forums.bots-united.com/forumdisplay.php?f=52)
-   -   File missing: LIBGEN.H (http://forums.bots-united.com/showthread.php?t=2246)

dstruct2k 09-07-2004 01:59

File missing: LIBGEN.H
 
It's an include in the "Bsp2Rbn" package, anyone know where a Win32 user can get a copy of LIBGEN.H? :)

dstruct2k 09-07-2004 02:12

Re: File missing: LIBGEN.H
 
As far as I can tell in the code, all it's needed for is dirname+basename... Is there any win32 include that has these?

EDIT:
There isn't... Can someone attach libgen.h?

Josh_Borke 09-07-2004 02:28

Re: File missing: LIBGEN.H
 
libgen.h is included to provide dirname/basename which is used to get the map name from your arguments. It is provided below
Code:

/* Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library 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
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, write to the Free
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
 #ifndef _LIBGEN_H
 #define _LIBGEN_H 1
 
 #include <features.h>
 
 __BEGIN_DECLS
 
 /* Return directory part of PATH or "." if none is available.  */
 extern char *dirname (char *__path) __THROW;
 
 /* Return final component of PATH.
 
    This is the weird XPG version of this function.  It sometimes will
    modify its argument.  Therefore we normally use the GNU version (in
    <string.h>) and only if this header is included make the XPG
    version available under the real name.  */
 extern char *__xpg_basename (char *__path) __THROW;
 #define basename  __xpg_basename
 
 __END_DECLS
 
 #endif /* libgen.h */

don't know that it will do you any good though...

dstruct2k 09-07-2004 03:07

Re: File missing: LIBGEN.H
 
Features.h... :D lol

Know what? Nevermind.

I'll just wait until Stefan alters this to be Win32 compatable.

evy 09-07-2004 09:44

Re: File missing: LIBGEN.H
 
Quote:

Originally Posted by dstruct2k
Features.h... :D lol

Know what? Nevermind.

I'll just wait until Stefan alters this to be Win32 compatable.

Humm... I'm afraid that I'll have to write some functions in util.cpp for WIN32 people :D

If someone knows C++ code for basename & dirname, please let me know

-eric

dstruct2k 09-07-2004 17:42

Re: File missing: LIBGEN.H
 
Give me an hour... I'll find somethng. :)

dstruct2k 09-07-2004 19:03

Re: File missing: LIBGEN.H
 
And still... Nothing. The only hint/suggestion I got was to search msdn.microsoft.com

Josh_Borke 09-07-2004 20:42

Re: File missing: LIBGEN.H
 
it's only used for path detection right? to get it for windows quickly, you could just require that the file be in the same directory as the executable and negate that requirement...

dstruct2k 10-07-2004 06:03

Re: File missing: LIBGEN.H
 
I'll give that a try...


So this package will generate an EXE file? I assumed it was another DLL for metamod.

dstruct2k 10-07-2004 06:11

Re: File missing: LIBGEN.H
 
Here's the output after attempting to remove basename and dirname from the code:

Code:

--------------------Configuration: Bsp2Rbn - Win32 Debug--------------------
Compiling...
Bsp2Rbn.cpp
bsp2rbn.cpp(226) : warning C4101: 'NextVertex' : unreferenced local variable
bsp2rbn.cpp(316) : warning C4101: 'v' : unreferenced local variable
bsp2rbn.cpp(317) : warning C4101: 'v_temp' : unreferenced local variable
bsp2rbn.cpp(317) : warning C4101: 'intersect_point' : unreferenced local variable
util.cpp
bsp2rbn.cpp(320) : warning C4700: local variable 'z_height' used without having been initialized
bsp2rbn.cpp(757) : warning C4715: 'main' : not all control paths return a value
util.cpp(541) : warning C4101: 'temp2' : unreferenced local variable
Linking...
Bsp2Rbn.obj : error LNK2001: unresolved external symbol "public: int __thiscall cNodeMachine::add(class Vector,int,struct edict_s *)" (?add@cNodeMachine@@QAEHVVector@@HPAUedict_s@@@Z)
Bsp2Rbn.obj : error LNK2001: unresolved external symbol "public: void __thiscall cNodeMachine::experience_save(void)" (?experience_save@cNodeMachine@@QAEXXZ)
Bsp2Rbn.obj : error LNK2001: unresolved external symbol "public: void __thiscall cNodeMachine::save(void)" (?save@cNodeMachine@@QAEXXZ)
Bsp2Rbn.obj : error LNK2001: unresolved external symbol "public: void __thiscall cNodeMachine::Draw(void)" (?Draw@cNodeMachine@@QAEXXZ)
Bsp2Rbn.obj : error LNK2001: unresolved external symbol "public: void __thiscall cNodeMachine::init(void)" (?init@cNodeMachine@@QAEXXZ)
cmdlib.obj : error LNK2001: unresolved external symbol "bool isWindowsApp" (?isWindowsApp@@3_NA)
util.obj : error LNK2001: unresolved external symbol "bool __cdecl FUNC_BotHoldsZoomWeapon(class cBot *)" (?FUNC_BotHoldsZoomWeapon@@YA_NPAVcBot@@@Z)
util.obj : error LNK2001: unresolved external symbol "bool __cdecl FUNC_IsOnLadder(struct edict_s *)" (?FUNC_IsOnLadder@@YA_NPAUedict_s@@@Z)
Debug/Bsp2Rbn.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.

Bsp2Rbn.exe - 9 error(s), 7 warning(s)


Josh_Borke 10-07-2004 06:22

Re: File missing: LIBGEN.H
 
yea, the warnings are fine, probably there just because it was copied straight out, i'm not sure about the unresolved external symbols though, it's the same thing i got
the only thing i can think of is to make sure that NodeMachine.obj is in the same directory as the other files? not sure.
i wanted to work on perhaps porting his code directly into realbot but i need to look over it more...

evy 11-07-2004 21:23

Re: File missing: LIBGEN.H
 
OK, just connecting from vacation over GSM :)

Indeed, Bsp2Rbn is assumed to become a .EXE in Windows. It is fully separated from Realbot DLL.

The Makefile and compilation work fine under Linux but I cannot test it on Windows (no compiler).

Also, for the unresolved symbols, Bsp2Rbn requires NodeMachine.o(bj) from the Realbot dll project. In the Makefile, it fetches the required object file from the upper directory (you may want to copy this file back from Release directory).

The long term goal is indeed to add the code into realbot DLL but as it is complex code, I was afraid to add it to the DLL :D This is why it is an external program for now.

-eric

V or 'Tex 12-07-2004 00:31

Re: File missing: LIBGEN.H
 
Can you upload the nodes you made from it, then?

Specifically... Aztec, Dust, Dust2, and Mindmaze2... thanks in advance. I'd like to see how well it does with all the choices in mm2.

Josh_Borke 12-07-2004 03:16

Re: File missing: LIBGEN.H
 
give me a link to mm2 and i'll create the stuff for ya

V or 'Tex 12-07-2004 06:13

Re: File missing: LIBGEN.H
 
http://www.students.hec.be/~evyncke/...mindmaze2.html


Click the "la carte"

dstruct2k 12-07-2004 09:46

Re: File missing: LIBGEN.H
 
So is there a fix for "basename" and "dirname" not existing in Windows?

Josh_Borke 12-07-2004 23:10

Re: File missing: LIBGEN.H
 
no fix yet, evy is on vacation
having trouble uploading the files...will continue to work on it. they are ready, just can't upload to the forum

V or 'Tex 13-07-2004 02:03

Re: File missing: LIBGEN.H
 
Email them to me, I will sned you a PM.

Josh_Borke 13-07-2004 16:49

Re: File missing: LIBGEN.H
 
evy, there seems to be a problem with the way the nodes are added/created or something.
i created the rbn and rbx files and when i load them in game, the bots don't get going at all. also when i do realbot nodes draw, all the nodes are numbered 0
HTH

V or 'Tex 13-07-2004 17:16

Re: File missing: LIBGEN.H
 
They worked for me, but I noticed quite a few connection issues where nodes would be created so close together that the bots would get stuck... like they couldn't tell whether they were at one or the other.

This particularly occured in MindMaze2 around and inside the buildings, which as I remember are octagons, and when they walked around the side of the octagons which was at an angle... There were many nodes close together sometimes almost right on top of eachother.

You might want to fix that scheme for node placement so that instead of creating a new node that close, it will move the original node in the vicinity by 50% so that you have one node which represents the mean of the 2+ nodes which may be placed against an odd-facing angle or corner.

This way would be much more efficient.


Edit: Aztec doesn't work... the nodes arent connecting the entire CT spawn, and there's no way for bots to get from the A site (furthest from spawn) to CT Spawn by the indoors route... the nodes stop just short of the final set of doors.

So I'd say 2^12 nodes isn't sufficient, I suggest an increase to 2^13, which would probably require nodemachine edits.

evy 17-07-2004 20:28

Re: File missing: LIBGEN.H
 
Quote:

Originally Posted by V or 'Tex
Can you upload the nodes you made from it, then?

Specifically... Aztec, Dust, Dust2, and Mindmaze2... thanks in advance. I'd like to see how well it does with all the choices in mm2.

A couple of nodes files (generated by Bsp2Rbn) are available from:
http://www.students.hec.be/~evyncke/cs/realbot/

Hope it helps

-eric

PS: back from vacation, so, I'll spend some more time on Bsp2Rbn in the coming evenings :D


All times are GMT +2. The time now is 01:21.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.