o: <[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 8:13 PM
Subject: Re: [hlcoders] string to #define
>
> Yes! I had given up on this idea, but I guess I didn't imagine it after
all
> :) This is exactly what I was thinking of.
>
> Thanks for finding this
>
> M
Yes! I had given up on this idea, but I guess I didn't imagine it after all
:) This is exactly what I was thinking of.
Thanks for finding this
Mugsy
>From: "Pat Magnan" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject:
that code appears to do.
Pat 'sluggo' Magnan
Tour of Duty Mod
http://www.tourofdutymod.com
- Original Message -
From: "Mugsy _" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 2:29 AM
Subject: Re: [hlcoders] string to #define
LOL exactly what I was going to post. I can really see how vital a Perl
version of the SDK could be!
Sebastian Steinlechner wrote:
>Actually, I guess he's trying to do something different, perhaps inspired
>from PHP or Perl. In these languages, you can do something like this:
>$foo = "What a ni
ing
> into a
> variable name directly.
>
> But I'm most likely on crack.
>
>
>
>> From: "Josh Coyne" <[EMAIL PROTECTED]>
>> Reply-To: [EMAIL PROTECTED]
>> To: <[EMAIL PROTECTED]>
>> Subject: Re: [hlcoders] string to #define
>&
esday, May 07, 2002 7:30 AM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] string to #define
> That still does a O(n) search with string compares.
>
> The one I'm dreaming of is different.
>
If you want fast string table lookups, might I suggest a Trie (i.e. a
tree
where each no
> That still does a O(n) search with string compares.
>
> The one I'm dreaming of is different.
>
If you want fast string table lookups, might I suggest a Trie (i.e. a tree
where each node has 26 children for each letter A-Z)...
http://www.mmi.ee/~enn/node38.html
...but it really seems like ove
That still does a O(n) search with string compares.
The one I'm dreaming of is different.
>From: "Josh Coyne" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Re: [hlcoders] string to #define
>Date: Tue, 7 M
do it...
- Original Message -
From: "Mugsy _" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 11:54 PM
Subject: Re: [hlcoders] string to #define
> I need to go the other way, from string to int.
>
>
> >From: "Josh Coyne&qu
atoi()?
- Original Message -
From: "Dynerman David M" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 07, 2002 6:29 AM
Subject: RE: [hlcoders] string to #define
> What about the engine functions MAKE_STRING() and STRING()?
>
> david
>
&
What about the engine functions MAKE_STRING() and STRING()?
david
-Original Message-
From: Mugsy _ [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 10:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] string to #define
I need to go the other way, from string to int.
>F
I need to go the other way, from string to int.
>From: "Josh Coyne" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Re: [hlcoders] string to #define
>Date: Mon, 6 May 2002 23:52:26 -0400
>
>well with the
n NULL;// or return "" or whatever u want
}
should give you an idea of what i mean by a list array
- Original Message -
From: "Mugsy _" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 11:40 PM
Subject: Re: [hlcoders] string to #define
ot;Josh Coyne" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Re: [hlcoders] string to #define
>Date: Mon, 6 May 2002 23:25:33 -0400
>
>hmm
>
>a possible idea could be a string table maybe
>
>an array of string/code
macros dont work in string blocks, at least not in MSVC
- Original Message -
From: "Dynerman David M" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 11:20 PM
Subject: RE: [hlcoders] string to #define
> That wasn't the question Ma
lt;[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 06, 2002 11:10 PM
Subject: RE: [hlcoders] string to #define
> Well they say when you're not sure try..so I did and Leon's right (at
> least with VC++)
>
> I'm not sure where I saw/read that it would scan
From: Marcelo de Paula Bezerra [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 10:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] string to #define
I believe it won't work.
This works about the same as #define WEAPON_GARAND 2,
you can't do things like
array["WEAPON_GARAND&qu
I believe it won't work.
This works about the same as #define WEAPON_GARAND 2,
you can't do things like
array["WEAPON_GARAND"].
Unfortunataly, the long if else block looks like the way to go.
On Mon, 2002-05-06 at 23:20, Mugsy _ wrote:
>
> It doesnt have to be a define, it can be an enumerated
literals or numbers, but not
mixing & matching.
david
-Original Message-
From: Leon Hartwig [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 9:50 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [hlcoders] string to #define
I'm sure it depends on which preprocessor is bein
I'm sure it depends on which preprocessor is being used, but I doubt most
modern ones do this.
> -Original Message-
> From: Dynerman David M [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 06, 2002 7:35 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [hlcoders] string to #
The pre-processors scan through source files replacing the define with
the value.
I'm not 100% sure, but about 95% that it looks in strings as well, so
someFuncThatTakesAString("WEAPON_GARAND");
will get changed to
someFuncThatTakesAString("2"); //constant string 2\0
before its compiled.
dav
It doesnt have to be a define, it can be an enumerated variable. ( since
#define names would probably be tossed in a compiled version )
enum
{
WEAPON_GARAND = 2
};
>From: "Mugsy _" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: [hlcoders] string to #define
22 matches
Mail list logo