Use a more 'C++' way of initializing member variables.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2674 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-03-14 13:22:26 +00:00
parent d9c05df0f2
commit 95f91262fd
2 changed files with 13 additions and 11 deletions

View File

@ -50,14 +50,14 @@ CartDebug::CartDebug(Debugger& dbg, Console& console, const OSystem& osystem)
// Banksizes greater than 4096 indicate multi-bank ROMs, but we handle only
// 4K pieces at a time
// Banksizes less than 4K use the actual value
BankInfo info;
info.start = info.end = info.offset = 0;
int banksize = 0;
myConsole.cartridge().getImage(banksize);
info.size = BSPF_min(banksize, 4096);
BankInfo info;
info.size = BSPF_min(banksize, 4096);
for(int i = 0; i < myConsole.cartridge().bankCount(); ++i)
myBankInfo.push_back(info);
info.size = 128; // ZP RAM
myBankInfo.push_back(info);

View File

@ -82,10 +82,10 @@ class CartDebug : public DebuggerSystem
bool hllabel;
};
typedef Common::Array<DisassemblyTag> DisassemblyList;
typedef struct {
struct Disassembly {
DisassemblyList list;
int fieldwidth;
} Disassembly;
};
public:
CartDebug(Debugger& dbg, Console& console, const OSystem& osystem);
@ -269,33 +269,35 @@ class CartDebug : public DebuggerSystem
};
AddrType addressType(uInt16 addr) const;
typedef struct {
struct DirectiveTag {
DisasmType type;
uInt16 start;
uInt16 end;
} DirectiveTag;
};
typedef list<uInt16> AddressList;
typedef list<DirectiveTag> DirectiveList;
typedef struct {
struct BankInfo {
uInt16 start; // start of address space
uInt16 end; // end of address space
uInt16 offset; // ORG value
uInt16 size; // size of a bank (in bytes)
AddressList addressList; // addresses which PC has hit
DirectiveList directiveList; // overrides for automatic code determination
} BankInfo;
BankInfo() : start(0), end(0), offset(0), size(0) { }
};
// Address type information determined by Distella
uInt8 myDisLabels[0x1000], myDisDirectives[0x1000];
// Information on equates used in the disassembly
typedef struct {
struct ReservedEquates {
bool TIARead[64];
bool TIAWrite[128];
bool IOReadWrite[24];
AddrToLabel Label;
} ReservedEquates;
};
ReservedEquates myReserved;
// Actually call DiStella to fill the DisassemblyList structure