Yeah, I'd want the conversion formula too.Spunkmeyer wrote:QUOTE (Spunkmeyer @ Mar 26 2013, 11:47 AM) I do have some some pre & defs memorized or otherwise referenced... as it's not immediately apparent to me how the numbers change from looking at the underlying bits (doesn't look like a simple LSB & MSB swap) I was saying if you could provide the conversion formula, then I could quickly revise my lists to refer to the new, accurate numbers.
Diff cores
-
- Posts: 1460
- Joined: Thu Dec 06, 2007 3:18 am
- Location: Melbourne, Aus
QUOTE (Randall Munroe)14.2: Turkey consumption rate of the average American in milligrams per minute[/quote]
I'll do this in 2 steps:
1st i'll change Coredump to be consistent with ICE.
2nd i'll fix ICE to be consistent with IGCLib and the game and revert Coredump. this could take a while as I want to review and change a lof of internal code in ICE.
as for the conversion function:
pre/def numbers (called TechTreeBitMask in the game code) are coded using 400 boolean values stored as a bitarray.
These boolean values are referenced with their indexes in the array starting from 0 to 399.
both in game and ICE, the bitarray is reprensented using a 50 bytes array (since 50x8 = 400).
The value of the Nth bool in the bitarray is stored in the N%8 bit of the (N/8)th byte.
where ICE and game code differs is on the endianness of the bytes.
for ICE the 1st bit in the byte is the left most.
for the game code it's the right most.
we get :
when ICE displays 13 , Coredump displays 10 for the same bit.
the conversion formula is :
the same formula works both ways.
1st i'll change Coredump to be consistent with ICE.
2nd i'll fix ICE to be consistent with IGCLib and the game and revert Coredump. this could take a while as I want to review and change a lof of internal code in ICE.
as for the conversion function:
pre/def numbers (called TechTreeBitMask in the game code) are coded using 400 boolean values stored as a bitarray.
These boolean values are referenced with their indexes in the array starting from 0 to 399.
both in game and ICE, the bitarray is reprensented using a 50 bytes array (since 50x8 = 400).
The value of the Nth bool in the bitarray is stored in the N%8 bit of the (N/8)th byte.
where ICE and game code differs is on the endianness of the bytes.
for ICE the 1st bit in the byte is the left most.
for the game code it's the right most.
we get :
Code: Select all
ICE 0 1 2 3 4 5 6 7 | 8 9 10 11 12 13 14 15 | ... | 392 393 394 395 396 397 398 399
GAME 7 6 5 4 3 2 1 0 | 15 14 13 12 11 10 9 8 | ... | 399 398 397 396 395 394 393 392
the conversion formula is :
Code: Select all
(N/8)*8 + 7-N%8
Last edited by KGJV on Tue Mar 26, 2013 5:38 pm, edited 1 time in total.
ok coredump is updated on the site as well as its source.
changes:
- display TechTreeBitMask like ICE does
- added DataExpendableTypeIGC objects (mines,chaffs,missiles,probes) and DataLauncherTypeIGC objects.
some others flag values that use bitmasks may differ from ICE too. i'll treat these on demand only.
changes:
- display TechTreeBitMask like ICE does
- added DataExpendableTypeIGC objects (mines,chaffs,missiles,probes) and DataLauncherTypeIGC objects.
some others flag values that use bitmasks may differ from ICE too. i'll treat these on demand only.
-
- Posts: 2013
- Joined: Fri Jun 27, 2003 7:00 am
- Location: Contact me regarding: CC, Slayer and AllegWiki.
finally acks a bitmask problem in ice
These bugs haven't been fixed yet because don't have any developers interested in fixing them up. --Tigereye
Imago's stupid-sensor is supersensitive. --RealPandemonium
The art is managing the flow of the drama to achieve the desired results. --Big_Beta_Tester
joeld wrote:But we’ve been amazed at the level to which some of the Allegiance fans have remained hard-core.