123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|333|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> Reading from a file?

Fri, 27 Jul 2007, 07:41
spinal
I am trying to convert some blitz code to C, and I'm not getting very far.
The code is supposed to read a 32bit int from a specific part of a .nds file header, then read the icon data starting at the location in the file the first number points to.

here is the blitz, working just fine.


here is the start of the C


However my first number seems to be different, although it should be the same (reading from the same location 0x068) in both codes.

Any help?

-=-=-
Check out my excellent homepage!
Sat, 28 Jul 2007, 23:34
Evil Roy Ferguso
I'm not familiar with your PA library or your u8 data type, but C arrays are 0-based, not 1-based, so the indices in an array with four elements are 0, 1, 2, 3, and not 1, 2, 3, 4 as you are using. That alone may not be enough to solve your problem but it ought to be a start.