ROM Hack How to use pack(CodeWarrior)

  • Thread starter Thread starter wannya
  • Start date Start date
  • Views Views 4,122
  • Replies Replies 1

wannya

Active Member
Newcomer
Joined
Sep 17, 2007
Messages
37
Reaction score
2
Trophies
1
Website
www.angeleden.net
XP
127
Country
Switzerland
Google(Very Sorry)

Metrowerks CodeWarrior for Nintendo DS

How to use pre-compiled instruction pack

__attribute__ ((packed))
# pragma pack (1)
# pragma options align = packed
Have failed
 
Examples for porting PC to codewarrior are...
Code:
#pragma options align=packed
typedef struct
{
ÂÂÂÂchar foo;
ÂÂÂÂshort bar;
} foobar;
#pragma options align=reset
Code:
#pragma pack(push, 1)
typedef struct
{
ÂÂÂÂchar foo;
ÂÂÂÂshort bar;
} foobar;
#pragma pack(pop)
This is for struct alignment in memory only. Not the same as GCC "__attribute__ ((packed))" when using sizeof() which as far as I can tell has no equal in codewarrior compilers.

Search your local headers for the toolchain to see if there are any "pack" used? I've never seen the DS official versions myself. Hope that helps...
 

Site & Scene News

Popular threads in this forum