base.wz unused fields (3.1b7)

For code related discussions and questions
User avatar
Duha
Trained
Trained
Posts: 287
Joined: 25 Mar 2012, 20:05
Location: SPb, Russia

Re: base.wz unused fields (3.1b7)

Post 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?
http://addons.wz2100.net/ developer
Reg312
Regular
Regular
Posts: 681
Joined: 25 Mar 2011, 18:36

Re: base.wz unused fields (3.1b7)

Post 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)
.....
Cyp
Evitcani
Evitcani
Posts: 784
Joined: 17 Jan 2010, 23:35

Re: base.wz unused fields (3.1b7)

Post 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.