CodeBase - Get a negative value from a WORD.

Return to the CodeBase listing

Category: Input / Output

Version: 1.0

1
0

Information

Uploaded: 21st Apr 2012 10:39

Modified: 1st Jan 1970 01:00

Author:  RonsWare

Summary

The function below gets a' negative value like -512 from a WORD. This function is written thank's to the help of WLGfx. He is the best.

Full Description

I am working on a map editor voor WAD files.<br /> These WAD are used bij DOOM1 , DOOM2 sort of games.<br /> I do this to learn how ID software made it's WAD file directory structure.<br /> <br /> I needed a way to get the correct value's of coord's from the WAD file.<br /> The coord's are stored in 16 bits (2 bytes).<br /> <br /> But the only variable that can work with negative numbers is a INTEGER.<br /> Coord's can be 500 but also -500<br /> <br /> This function convert a 16 bits value from a WORD to a correct 32 bits negative value.<br /> <br /> This function is written thank's to the help of WLGfx.

Comments

No comments yet.