I'm not familiar with GBA (?) types, so I'll use the regular Delphi ones....
Code:
var
OAMCopySub: array[0..127] of SpriteEntry;
...
procedure UpdateOAM;
type
PLongs ^TLongs;
TLongs = array[0..MAXWORD-1] of Longword;
begin
for i := 0 to (128 * SizeOf(SpriteEntry) div SizeOf(Longword)) -1 do
begin
PLongs(OAM_SUB)^[i] := PLongs(@OAMCopySub)^[i];
end;
end;
if pu32 is ^Longword, then u32 should be a Longword and thus all you have to do is replace Longword by u32
on the other hand if you have a "Move" procedure at your disposal you could as well use it.....
Code:
Move(OAMCopySub, OAM_SUB^, SizeOf(OAMCopySub));
I think this is the easiest solution if it can be done...
Bookmarks