Clean up some struct indentations

Also cleaned up the indentations of some variable declarations.
This commit is contained in:
Lioncash 2014-02-09 18:29:13 -05:00
parent 40182a48a5
commit ebb48d019e
50 changed files with 1357 additions and 1355 deletions

View File

@ -59,9 +59,9 @@ namespace File
struct FSTEntry struct FSTEntry
{ {
bool isDirectory; bool isDirectory;
u64 size; // file length or number of entries from children u64 size; // File length or number of entries from children
std::string physicalName; // name on disk std::string physicalName; // Name on disk
std::string virtualName; // name in FST names table std::string virtualName; // Name in FST names table
std::vector<FSTEntry> children; std::vector<FSTEntry> children;
}; };

View File

@ -161,8 +161,8 @@ struct PBDpopWM
struct PBVolumeEnvelope struct PBVolumeEnvelope
{ {
u16 cur_volume; // volume at start of frame u16 cur_volume; // Volume at start of frame
s16 cur_volume_delta; // signed per sample delta (96 samples per frame) s16 cur_volume_delta; // Signed per sample delta (96 samples per frame)
}; };
struct PBUnknown2 struct PBUnknown2

View File

@ -76,19 +76,19 @@ private:
struct Header { //Offset Size Description struct Header { //Offset Size Description
// Serial in libogc // Serial in libogc
u8 serial[12]; //0x0000 12 ? u8 serial[12]; //0x0000 12 ?
u64 formatTime; //0x000c 8 time of format (OSTime value) u64 formatTime; //0x000c 8 Time of format (OSTime value)
u32 SramBias; //0x0014 4 sram bias at time of format u32 SramBias; //0x0014 4 SRAM bias at time of format
u32 SramLang; //0x0018 4 sram language u32 SramLang; //0x0018 4 SRAM language
u8 Unk2[4]; //0x001c 4 ? almost always 0 u8 Unk2[4]; //0x001c 4 ? almost always 0
// end Serial in libogc // end Serial in libogc
u8 deviceID[2]; //0x0020 2 0 if formated in slot A 1 if formated in slot B u8 deviceID[2]; //0x0020 2 0 if formated in slot A 1 if formated in slot B
u8 SizeMb[2]; //0x0022 2 size of memcard in Mbits u8 SizeMb[2]; //0x0022 2 Size of memcard in Mbits
u16 Encoding; //0x0024 2 encoding (ASCII or japanese) u16 Encoding; //0x0024 2 Encoding (ASCII or japanese)
u8 Unused1[468]; //0x0026 468 unused (0xff) u8 Unused1[468]; //0x0026 468 Unused (0xff)
u16 UpdateCounter; //0x01fa 2 update Counter (?, probably unused) u16 UpdateCounter; //0x01fa 2 Update Counter (?, probably unused)
u16 Checksum; //0x01fc 2 Additive Checksum u16 Checksum; //0x01fc 2 Additive Checksum
u16 Checksum_Inv; //0x01fe 2 Inverse Checksum u16 Checksum_Inv; //0x01fe 2 Inverse Checksum
u8 Unused2[7680]; //0x0200 0x1e00 unused (0xff) u8 Unused2[7680]; //0x0200 0x1e00 Unused (0xff)
} hdr; } hdr;
struct DEntry struct DEntry
@ -97,7 +97,7 @@ private:
u8 Makercode[2]; //0x04 0x02 Makercode u8 Makercode[2]; //0x04 0x02 Makercode
u8 Unused1; //0x06 0x01 reserved/unused (always 0xff, has no effect) u8 Unused1; //0x06 0x01 reserved/unused (always 0xff, has no effect)
u8 BIFlags; //0x07 0x01 banner gfx format and icon animation (Image Key) u8 BIFlags; //0x07 0x01 banner gfx format and icon animation (Image Key)
// bit(s) description // Bit(s) Description
// 2 Icon Animation 0: forward 1: ping-pong // 2 Icon Animation 0: forward 1: ping-pong
// 1 [--0: No Banner 1: Banner present--] WRONG! YAGCD LIES! // 1 [--0: No Banner 1: Banner present--] WRONG! YAGCD LIES!
// 0 [--Banner Color 0: RGB5A3 1: CI8--] WRONG! YAGCD LIES! // 0 [--Banner Color 0: RGB5A3 1: CI8--] WRONG! YAGCD LIES!
@ -107,33 +107,33 @@ private:
// 10 RGB5A3 banner // 10 RGB5A3 banner
// 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner // 11 ? maybe ==00? Time Splitters 2 and 3 have it and don't have banner
// //
u8 Filename[DENTRY_STRLEN]; //0x08 0x20 filename u8 Filename[DENTRY_STRLEN]; //0x08 0x20 Filename
u8 ModTime[4]; //0x28 0x04 Time of file's last modification in seconds since 12am, January 1st, 2000 u8 ModTime[4]; //0x28 0x04 Time of file's last modification in seconds since 12am, January 1st, 2000
u8 ImageOffset[4]; //0x2c 0x04 image data offset u8 ImageOffset[4]; //0x2c 0x04 image data offset
u8 IconFmt[2]; //0x30 0x02 icon gfx format (2bits per icon) u8 IconFmt[2]; //0x30 0x02 icon gfx format (2bits per icon)
// bits Description // Bits Description
// 00 no icon // 00 No icon
// 01 CI8 with a shared color palette after the last frame // 01 CI8 with a shared color palette after the last frame
// 10 RGB5A3 // 10 RGB5A3
// 11 CI8 with a unique color palette after itself // 11 CI8 with a unique color palette after itself
// //
u8 AnimSpeed[2]; //0x32 0x02 animation speed (2bits per icon) (*1) u8 AnimSpeed[2]; //0x32 0x02 Animation speed (2bits per icon) (*1)
// bits Description // Bits Description
// 00 no icon // 00 No icon
// 01 Icon lasts for 4 frames // 01 Icon lasts for 4 frames
// 10 Icon lasts for 8 frames // 10 Icon lasts for 8 frames
// 11 Icon lasts for 12 frames // 11 Icon lasts for 12 frames
// //
u8 Permissions; //0x34 0x01 file-permissions u8 Permissions; //0x34 0x01 File-permissions
// bit permission Description // Bit Permission Description
// 4 no move File cannot be moved by the IPL // 4 no move File cannot be moved by the IPL
// 3 no copy File cannot be copied by the IPL // 3 no copy File cannot be copied by the IPL
// 2 public Can be read by any game // 2 public Can be read by any game
// //
u8 CopyCounter; //0x35 0x01 copy counter (*2) u8 CopyCounter; //0x35 0x01 Copy counter (*2)
u8 FirstBlock[2]; //0x36 0x02 block no of first block of file (0 == offset 0) u8 FirstBlock[2]; //0x36 0x02 Block no of first block of file (0 == offset 0)
u8 BlockCount[2]; //0x38 0x02 file-length (number of blocks in file) u8 BlockCount[2]; //0x38 0x02 File-length (number of blocks in file)
u8 Unused2[2]; //0x3a 0x02 reserved/unused (always 0xffff, has no effect) u8 Unused2[2]; //0x3a 0x02 Reserved/unused (always 0xffff, has no effect)
u8 CommentsAddr[4]; //0x3c 0x04 Address of the two comments within the file data (*3) u8 CommentsAddr[4]; //0x3c 0x04 Address of the two comments within the file data (*3)
}; };
@ -141,7 +141,7 @@ private:
{ {
DEntry Dir[DIRLEN]; //0x0000 Directory Entries (max 127) DEntry Dir[DIRLEN]; //0x0000 Directory Entries (max 127)
u8 Padding[0x3a]; u8 Padding[0x3a];
u16 UpdateCounter; //0x1ffa 2 update Counter u16 UpdateCounter; //0x1ffa 2 Update Counter
u16 Checksum; //0x1ffc 2 Additive Checksum u16 Checksum; //0x1ffc 2 Additive Checksum
u16 Checksum_Inv; //0x1ffe 2 Inverse Checksum u16 Checksum_Inv; //0x1ffe 2 Inverse Checksum
} dir, dir_backup; } dir, dir_backup;
@ -151,9 +151,9 @@ private:
{ {
u16 Checksum; //0x0000 2 Additive Checksum u16 Checksum; //0x0000 2 Additive Checksum
u16 Checksum_Inv; //0x0002 2 Inverse Checksum u16 Checksum_Inv; //0x0002 2 Inverse Checksum
u16 UpdateCounter; //0x0004 2 update Counter u16 UpdateCounter; //0x0004 2 Update Counter
u16 FreeBlocks; //0x0006 2 free Blocks u16 FreeBlocks; //0x0006 2 Free Blocks
u16 LastAllocated; //0x0008 2 last allocated Block u16 LastAllocated; //0x0008 2 Last allocated Block
u16 Map[BAT_SIZE]; //0x000a 0x1ff8 Map of allocated Blocks u16 Map[BAT_SIZE]; //0x000a 0x1ff8 Map of allocated Blocks
u16 GetNextBlock(u16 Block) const; u16 GetNextBlock(u16 Block) const;
u16 NextFreeBlock(u16 StartingBlock=MC_FST_BLOCKS) const; u16 NextFreeBlock(u16 StartingBlock=MC_FST_BLOCKS) const;

View File

@ -43,23 +43,23 @@ union SRAM
{ {
u8 p_SRAM[64]; u8 p_SRAM[64];
struct { // Stored configuration value from the system SRAM area struct { // Stored configuration value from the system SRAM area
u16 checksum; // holds the block checksum. u16 checksum; // Holds the block checksum.
u16 checksum_inv; // holds the inverse block checksum u16 checksum_inv; // Holds the inverse block checksum
u32 ead0; // unknown attribute u32 ead0; // Unknown attribute
u32 ead1; // unknown attribute u32 ead1; // Unknown attribute
u32 counter_bias; // bias value for the realtime clock u32 counter_bias; // Bias value for the realtime clock
s8 display_offsetH; // pixel offset for the VI s8 display_offsetH; // Pixel offset for the VI
u8 ntd; // unknown attribute u8 ntd; // Unknown attribute
u8 lang; // language of system u8 lang; // Language of system
u8 flags; // device and operations flag u8 flags; // Device and operations flag
// Stored configuration value from the extended SRAM area // Stored configuration value from the extended SRAM area
u8 flash_id[2][12]; // flash_id[2][12] 96bit memorycard unlock flash ID u8 flash_id[2][12]; // flash_id[2][12] 96bit memorycard unlock flash ID
u32 wirelessKbd_id; // Device ID of last connected wireless keyboard u32 wirelessKbd_id; // Device ID of last connected wireless keyboard
u16 wirelessPad_id[4]; // 16bit device ID of last connected pad. u16 wirelessPad_id[4]; // 16-bit device ID of last connected pad.
u8 dvderr_code; // last non-recoverable error from DVD interface u8 dvderr_code; // last non-recoverable error from DVD interface
u8 __padding0; // reserved u8 __padding0; // reserved
u8 flashID_chksum[2]; // 8bit checksum of unlock flash ID u8 flashID_chksum[2]; // 8-bit checksum of unlock flash ID
u32 __padding1; // padding u32 __padding1; // padding
}; };
}; };

View File

@ -386,19 +386,19 @@ struct nu_cal
u8 pad1; u8 pad1;
wm_accel cal_g; // g size wm_accel cal_g; // g size
u8 pad2; u8 pad2;
nu_js jx; // nu_js jx;
nu_js jy; // nu_js jy;
u8 sum[2]; u8 sum[2];
}; };
struct cc_cal struct cc_cal
{ {
nu_js Lx; // nu_js Lx;
nu_js Ly; // nu_js Ly;
nu_js Rx; // nu_js Rx;
nu_js Ry; // nu_js Ry;
cc_trigger Tl; // cc_trigger Tl;
cc_trigger Tr; // cc_trigger Tr;
}; };
struct gh3_cal struct gh3_cal

View File

@ -18,7 +18,8 @@ struct NANDStat
u32 Used_Inodes; u32 Used_Inodes;
}; };
enum { enum
{
FS_RESULT_OK = 0, FS_RESULT_OK = 0,
FS_INVALID = -4, FS_INVALID = -4,
FS_DIRFILE_NOT_FOUND = -6, FS_DIRFILE_NOT_FOUND = -6,

View File

@ -161,7 +161,8 @@ union UGeckoInstruction
}; };
struct struct
{ u32 : 10; {
u32 : 10;
// Overflow enable // Overflow enable
u32 OE : 1; u32 OE : 1;
// Special-purpose register // Special-purpose register

View File

@ -353,14 +353,14 @@ struct TevStageCombiner
// if mid, sw, tw, and addprev are 0, then no indirect stage is used, mask = 0x17fe00 // if mid, sw, tw, and addprev are 0, then no indirect stage is used, mask = 0x17fe00
struct struct
{ {
u32 bt : 2; // indirect tex stage ID u32 bt : 2; // Indirect tex stage ID
u32 fmt : 2; // format: ITF_X u32 fmt : 2; // Format: ITF_X
u32 bias : 3; // ITB_X u32 bias : 3; // ITB_X
u32 bs : 2; // ITBA_X, indicates which coordinate will become the 'bump alpha' u32 bs : 2; // ITBA_X, indicates which coordinate will become the 'bump alpha'
u32 mid : 4; // matrix id to multiply offsets with u32 mid : 4; // Matrix ID to multiply offsets with
u32 sw : 3; // ITW_X, wrapping factor for S of regular coord u32 sw : 3; // ITW_X, wrapping factor for S of regular coord
u32 tw : 3; // ITW_X, wrapping factor for T of regular coord u32 tw : 3; // ITW_X, wrapping factor for T of regular coord
u32 lb_utclod : 1; // use modified or unmodified texture coordinates for LOD computation u32 lb_utclod : 1; // Use modified or unmodified texture coordinates for LOD computation
u32 fb_addprev : 1; // 1 if the texture coordinate results from the previous TEV stage should be added u32 fb_addprev : 1; // 1 if the texture coordinate results from the previous TEV stage should be added
u32 pad0 : 3; u32 pad0 : 3;
u32 rid : 8; u32 rid : 8;
@ -378,7 +378,7 @@ struct TevStageCombiner
{ {
struct struct
{ {
u32 texmap0 : 3; // indirect tex stage texmap u32 texmap0 : 3; // Indirect tex stage texmap
u32 texcoord0 : 3; u32 texcoord0 : 3;
u32 enable0 : 1; // 1 if should read from texture u32 enable0 : 1; // 1 if should read from texture
u32 colorchan0 : 3; // RAS1_CC_X u32 colorchan0 : 3; // RAS1_CC_X
@ -404,10 +404,10 @@ union TEXSCALE
{ {
struct struct
{ {
u32 ss0 : 4; // indirect tex stage 0, 2^(-ss0) u32 ss0 : 4; // Indirect tex stage 0, 2^(-ss0)
u32 ts0 : 4; // indirect tex stage 0 u32 ts0 : 4; // Indirect tex stage 0
u32 ss1 : 4; // indirect tex stage 1 u32 ss1 : 4; // Indirect tex stage 1
u32 ts1 : 4; // indirect tex stage 1 u32 ts1 : 4; // Indirect tex stage 1
u32 pad : 8; u32 pad : 8;
u32 rid : 8; u32 rid : 8;
}; };
@ -421,8 +421,8 @@ union RAS1_IREF
{ {
struct struct
{ {
u32 bi0 : 3; // indirect tex stage 0 ntexmap u32 bi0 : 3; // Indirect tex stage 0 ntexmap
u32 bc0 : 3; // indirect tex stage 0 ntexcoord u32 bc0 : 3; // Indirect tex stage 0 ntexcoord
u32 bi1 : 3; u32 bi1 : 3;
u32 bc1 : 3; u32 bc1 : 3;
u32 bi2 : 3; u32 bi2 : 3;
@ -469,8 +469,8 @@ union TexImage0
{ {
struct struct
{ {
u32 width : 10; //actually w-1 u32 width : 10; // Actually w-1
u32 height : 10; //actually h-1 u32 height : 10; // Actually h-1
u32 format : 4; u32 format : 4;
}; };
u32 hex; u32 hex;
@ -479,7 +479,7 @@ union TexImage1
{ {
struct struct
{ {
u32 tmem_even : 15; // tmem line index for even LODs u32 tmem_even : 15; // TMEM line index for even LODs
u32 cache_width : 3; u32 cache_width : 3;
u32 cache_height : 3; u32 cache_height : 3;
u32 image_type : 1; // 1 if this texture is managed manually (0 means we'll autofetch the texture data whenever it changes) u32 image_type : 1; // 1 if this texture is managed manually (0 means we'll autofetch the texture data whenever it changes)