Skip to content

Commit

Permalink
Added VERSION_INFO
Browse files Browse the repository at this point in the history
  • Loading branch information
betajaen committed Nov 21, 2020
1 parent 0e7a011 commit 5770c27
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
18 changes: 8 additions & 10 deletions Code/Documentation/Development/version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,17 @@ of commits reaches 65,535.

## C Implementation

Internally a GAME_VERSION union is used which is represents
Internally a VERSION_INFO union is used which is represents
a version number as a C Struct or a ULONG (in Big Endian)

struct GAME_VERSION_STRUCT
union VERSION_INFO
{
UBYTE gv_Game;
UBYTE gv_Feature;
UWROD gv_Build;
};

union GAME_VERSION
{
struct GAME_VERSION_STRUCT gv_Version;
struct
{
UBYTE gv_Game;
UBYTE gv_Feature;
UBYTE gv_Build;
} gv_Version;
ULONG gv_Num;
};

Expand Down
21 changes: 19 additions & 2 deletions Code/Include/Parrot/Parrot.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,27 @@
list.mlh_TailPred = (struct MinNode*) &list.mlh_Head;

#define MAKE_NODE_ID(a,b,c,d) \
((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))
((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d))

#define MAKE_ENTITY_ID(a,b) \
((USHORT) (a)<<8 | (USHORT) (b))
((USHORT) (a)<<8 | (USHORT) (b))

/*
Version
*/

struct VERSION_PARTS_INFO
{
UBYTE gv_Game;
UBYTE gv_Feature;
UBYTE gv_Build;
};

union VERSION_INFO
{
struct VERSION_PARTS_INFO gv_Version;
ULONG gv_Num;
};

/**
SDL Banned Functions
Expand Down

0 comments on commit 5770c27

Please sign in to comment.