![]() |
Question about far pointers
I've been using the (excellent) bot templates to write bots, but those templates lack a bit of structure. I really can't stand that procedural code (no offense) as I came from Java.
So I decided to start from scratch and only keep the stuff I really need. I stumbled upon this code in bot.h Code:
#ifndef __linux__ "The far qualifier when used in 16 bit compilers results in a 32 bit pointer." So I assume I can safely remove that keyword, or does FAR have another more obscure significance aswell? I'm not concerned with portability as I have no experience with other OSes besides Windows. [MODS: I hope this is the right forum for this thread] |
Re: Question about far pointers
Yes, I think you can remove "FAR" from the code. Botman could probably tell us more about this since it's his code (or does this part come straight from the HL SDK ? can't remember).
|
Re: Question about far pointers
in good ol times there was a different between near and far pointer, but on current pc systems there isnt ( well, internally, it still is ... ). near pointer were just in a segment, thus saving mem bandwidth and delays in the mem unit. today most stuff is plain 32 bit pointers, no more real use to use near etc.
maybe that's still a quake1 relict ... but lets wait for botman :) |
Re: Question about far pointers
The 'FAR' in the above definitions satisfy the "CALLBACK" type on the GetProcAddress() function.
http://msdn.microsoft.com/library/de...rocaddress.asp You can try to remove it and see if it compiles (but I'd be willing to bet that the C++ complier complains about a type conversion error). botman |
Re: Question about far pointers
It compiles fine without the keyword, so I'll just leave it out. Thanks for the replies.
|
All times are GMT +2. The time now is 02:18. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.