<MICHAEL.MCALEA@[EMAIL PROTECTED]
> wrote in message
news:9b82e4ce-d10c-4ebc-bc73-2cdb974a6836@[EMAIL PROTECTED]
> I'm having a little trouble getting the star system generator
> (Generate_StarSector function) to produce the 'correct' co-ordinate
> results as seen on the ffe starsys map, does anyone have a list of
> generated star co-ordinates (Not the known system list) so that I can
> compare the co-ordinates generated by my system with the co-ords
> generated in the real system? Just a few sectors star co-ords would be
> useful. Thanks
That might be related to the bit-****fting (lrotl, rrotl(?)) in the main
generate routine. Older compilers use 16 bit rotations (even in 32 bit
mode), but (f.e.) the latest Visual Studio uses 32 bit rotates, so the
routine suddenly fails.
Try this:
#define SHUFFLEWORD(x,val) (((x) & 0xffff)<<(val)) | (((x) &
0xffff)>>(16-val))
-- a manual 16 bit rotate -- and use it instead of the stdlib rotates.
Invert (val) / (16-val) to rotate right instead of left :-)
<reminder>To Self: PUT IT ON THE PAGE </reminder>
As for your debugging: FFE Starsys displays the same stars as FFE. ...
I've
checked maybe hundreds of sectors manually, and haven't even seen it
behave
wrong once, the past 3 or 4 years. So, if your code gives different
results
from Starsys, it will also be different for FFE.
The original code was in assembly, my conversion was to C (which
introduced
a few artefacts), and now you're trying it in C#. There might be all kinds
of weird effects lurking in the dark ...
[Jongware]


|