|
This thread is locked; no one can reply to it. |
1
2
|
bitmap structure |
Thomas Fjellstrom
Member #476
June 2000
|
int will probablyt be 64 bit on most standard complient compilers, long is <= int, so long should probably be 32bit (I hope). -- |
ReyBrujo
Moderator
January 2001
|
Check the thread about Allegro 5 scrapped. Evert attached a document saying that long is 64 bits, int will stay at 32 bits. -- |
A J
Member #3,025
December 2002
|
i have read that mostly which means some (many) of the allegro structures will change size and or need padding. ___________________________ |
Tobias Dammers
Member #2,604
August 2002
|
...which is not really a problem, if sizeof() is used properly. There could be some problems with bitmaps and samples, though, but I'm pretty sure this can be solved with a few #defines once the conventions are clear about what will be what. --- |
A J
Member #3,025
December 2002
|
the allegro bmp file loader will break if re-compiled on 64bit (where LONG will be 64bits). ___________________________ |
Tobias Dammers
Member #2,604
August 2002
|
Maybe it will; it's a sorry mess anyway and needs to be cleaned up a bit. There are even divisions in it that should really be shifts, but that aside. --- |
Evert
Member #794
November 2000
|
Quote: the allegro bmp file loader will break if re-compiled on 64bit (where LONG will be 64bits).
It should be using ints rather than longs... |
A J
Member #3,025
December 2002
|
if you can write an "official" guide to which types need to be changed, i will do some code auditing. ___________________________ |
Bob
Free Market Evangelist
September 2000
|
Quote: Evert attached a document saying that long is 64 bits, int will stay at 32 bits. No, long may be 64-bits and int may be 32-bits. A perfectly conforming C implementation may have char = short = int = long = 128-bits, and long long = 256 bits. Different 64-bit platforms use different combinations of bit sizes for the standard types. For example, Alpha uses 64-bit ints and longs. GCC on AMD64 uses 32-bit ints and 64-bit longs. MSVC on AMD64 uses 32-bit ints and 32-bit longs, for backward compatibility. -- |
A J
Member #3,025
December 2002
|
this presents a bit of a problem for allegro, as it moves to 64bits. ___________________________ |
Evert
Member #794
November 2000
|
Basically, what needs to happen, is to find each location where Allegro uses a long int but assumes it to be 32 bit. |
Tobias Dammers
Member #2,604
August 2002
|
Quote:
this presents a bit of a problem for allegro, as it moves to 64bits.
In many cases, the actual size of a variable is not really important, provided it conforms to a given minimum size. For example, makecol() always returns an int, regardless of color format, and you can happily pass ints to the drawing functions even in 8bpp. You won't use more than 8 bits, but for that matter, you could pass the same value in 32, 64, or 2048 bits. --- |
|
1
2
|