Page 2 of 2

Re: base.wz unused fields (3.1b7)

Posted: 10 Apr 2012, 11:11
by Duha
Some more question about code:


../warzone2100-3.1_beta7/lib/framework/types.h
typedef uint8_t UBYTE;
typedef int8_t SBYTE;
typedef uint16_t UWORD;
typedef int16_t SWORD;
typedef uint32_t UDWORD;
typedef int32_t SDWORD;


That the real numbers of this values?

Re: base.wz unused fields (3.1b7)

Posted: 10 Apr 2012, 11:49
by Reg312
Duha wrote:Some more question about code:


../warzone2100-3.1_beta7/lib/framework/types.h
typedef uint8_t UBYTE;
typedef int8_t SBYTE;
typedef uint16_t UWORD;
typedef int16_t SWORD;
typedef uint32_t UDWORD;
typedef int32_t SDWORD;

That the real numbers of this values?
it is not values, but its types
you need know minimum and maximum values for such types
typedef operator: http://msdn.microsoft.com/en-us/library ... s.71).aspx

typedef uint8_t UBYTE; - unsigned 8-bit integer (0 - 255)
typedef int8_t SBYTE; - signed 8-bit integer (-128 - 127)
.....

Re: base.wz unused fields (3.1b7)

Posted: 11 Apr 2012, 07:26
by Cyp
Note that the names UBYTE, SBYTE, UWORD, SWORD, UDWORD and SDWORD are archaic and hard to read, and shouldn't be used in any new code written this century.