mirror of https://github.com/stella-emu/stella.git
I decided to turn on '-Weverything' compiler flag in Clang++ to
see what errors are present in the code. This is the first pass in cleaning up the errors it found. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3203 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
5620c270bc
commit
f539cef173
|
@ -58,7 +58,7 @@ class CheatManager
|
||||||
/**
|
/**
|
||||||
Remove the cheat at 'idx' from the cheat list(s).
|
Remove the cheat at 'idx' from the cheat list(s).
|
||||||
|
|
||||||
@param index Location in myCheatList of the cheat to remove
|
@param idx Location in myCheatList of the cheat to remove
|
||||||
*/
|
*/
|
||||||
void remove(int idx);
|
void remove(int idx);
|
||||||
|
|
||||||
|
|
|
@ -60,13 +60,13 @@ class Variant
|
||||||
const string& toString() const { return data; }
|
const string& toString() const { return data; }
|
||||||
const char* toCString() const { return data.c_str(); }
|
const char* toCString() const { return data.c_str(); }
|
||||||
const Int32 toInt() const { return atoi(data.c_str()); }
|
const Int32 toInt() const { return atoi(data.c_str()); }
|
||||||
const float toFloat() const { return atof(data.c_str()); }
|
const float toFloat() const { return float(atof(data.c_str())); }
|
||||||
const bool toBool() const { return data == "1" || data == "true"; }
|
const bool toBool() const { return data == "1" || data == "true"; }
|
||||||
const GUI::Size toSize() const { return GUI::Size(data); }
|
const GUI::Size toSize() const { return GUI::Size(data); }
|
||||||
|
|
||||||
// Comparison
|
// Comparison
|
||||||
bool operator==(const Variant& v) const { return data == v.data; };
|
bool operator==(const Variant& v) const { return data == v.data; }
|
||||||
bool operator!=(const Variant& v) const { return data != v.data; };
|
bool operator!=(const Variant& v) const { return data != v.data; }
|
||||||
|
|
||||||
friend ostream& operator<<(ostream& os, const Variant& v) {
|
friend ostream& operator<<(ostream& os, const Variant& v) {
|
||||||
return os << v.data;
|
return os << v.data;
|
||||||
|
@ -85,7 +85,7 @@ namespace VarList {
|
||||||
{
|
{
|
||||||
list.emplace_back(name.toString(), tag);
|
list.emplace_back(name.toString(), tag);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
static const VariantList EmptyVarList;
|
static const VariantList EmptyVarList;
|
||||||
|
|
|
@ -158,7 +158,7 @@ inline size_t BSPF_findIgnoreCase(const string& s1, const string& s2, int startp
|
||||||
{
|
{
|
||||||
auto pos = std::search(s1.begin()+startpos, s1.end(),
|
auto pos = std::search(s1.begin()+startpos, s1.end(),
|
||||||
s2.begin(), s2.end(), [](char ch1, char ch2) {
|
s2.begin(), s2.end(), [](char ch1, char ch2) {
|
||||||
return toupper((uInt8)ch1) == toupper((uInt8)ch2);
|
return toupper(uInt8(ch1)) == toupper(uInt8(ch2));
|
||||||
});
|
});
|
||||||
return pos == s1.end() ? string::npos : pos - (s1.begin()+startpos);
|
return pos == s1.end() ? string::npos : pos - (s1.begin()+startpos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,7 +230,7 @@ bool CartDebug::disassemble(bool force)
|
||||||
bool bankChanged = myConsole.cartridge().bankChanged();
|
bool bankChanged = myConsole.cartridge().bankChanged();
|
||||||
uInt16 PC = myDebugger.cpuDebug().pc();
|
uInt16 PC = myDebugger.cpuDebug().pc();
|
||||||
int pcline = addressToLine(PC);
|
int pcline = addressToLine(PC);
|
||||||
bool pcfound = (pcline != -1) && ((uInt32)pcline < myDisassembly.list.size()) &&
|
bool pcfound = (pcline != -1) && (uInt32(pcline) < myDisassembly.list.size()) &&
|
||||||
(myDisassembly.list[pcline].disasm[0] != '.');
|
(myDisassembly.list[pcline].disasm[0] != '.');
|
||||||
bool pagedirty = (PC & 0x1000) ? mySystem.isPageDirty(0x1000, 0x1FFF) :
|
bool pagedirty = (PC & 0x1000) ? mySystem.isPageDirty(0x1000, 0x1FFF) :
|
||||||
mySystem.isPageDirty(0x80, 0xFF);
|
mySystem.isPageDirty(0x80, 0xFF);
|
||||||
|
@ -339,7 +339,7 @@ string CartDebug::disassemble(uInt16 start, uInt16 lines) const
|
||||||
ostringstream buffer;
|
ostringstream buffer;
|
||||||
|
|
||||||
// First find the lines in the range, and determine the longest string
|
// First find the lines in the range, and determine the longest string
|
||||||
uInt32 list_size = (int)myDisassembly.list.size();
|
uInt32 list_size = uInt32(myDisassembly.list.size());
|
||||||
uInt32 begin = list_size, end = 0, length = 0;
|
uInt32 begin = list_size, end = 0, length = 0;
|
||||||
for(end = 0; end < list_size && lines > 0; ++end)
|
for(end = 0; end < list_size && lines > 0; ++end)
|
||||||
{
|
{
|
||||||
|
@ -348,7 +348,7 @@ string CartDebug::disassemble(uInt16 start, uInt16 lines) const
|
||||||
{
|
{
|
||||||
if(begin == list_size) begin = end;
|
if(begin == list_size) begin = end;
|
||||||
if(tag.type != CartDebug::ROW)
|
if(tag.type != CartDebug::ROW)
|
||||||
length = BSPF_max(length, (uInt32)tag.disasm.length());
|
length = BSPF_max(length, uInt32(tag.disasm.length()));
|
||||||
|
|
||||||
--lines;
|
--lines;
|
||||||
}
|
}
|
||||||
|
@ -382,7 +382,7 @@ bool CartDebug::addDirective(CartDebug::DisasmType type,
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(bank < 0) // Do we want the current bank or ZP RAM?
|
if(bank < 0) // Do we want the current bank or ZP RAM?
|
||||||
bank = (myDebugger.cpuDebug().pc() & 0x1000) ? getBank() : (int)myBankInfo.size()-1;
|
bank = (myDebugger.cpuDebug().pc() & 0x1000) ? getBank() : int(myBankInfo.size())-1;
|
||||||
|
|
||||||
bank = BSPF_min(bank, bankCount());
|
bank = BSPF_min(bank, bankCount());
|
||||||
BankInfo& info = myBankInfo[bank];
|
BankInfo& info = myBankInfo[bank];
|
||||||
|
@ -516,7 +516,7 @@ bool CartDebug::addLabel(const string& label, uInt16 address)
|
||||||
removeLabel(label);
|
removeLabel(label);
|
||||||
myUserAddresses.insert(make_pair(label, address));
|
myUserAddresses.insert(make_pair(label, address));
|
||||||
myUserLabels.insert(make_pair(address, label));
|
myUserLabels.insert(make_pair(address, label));
|
||||||
myLabelLength = BSPF_max(myLabelLength, (uInt16)label.size());
|
myLabelLength = BSPF_max(myLabelLength, uInt16(label.size()));
|
||||||
mySystem.setDirtyPage(address);
|
mySystem.setDirtyPage(address);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -714,7 +714,7 @@ string CartDebug::loadListFile()
|
||||||
if(addr_s.length() == 0)
|
if(addr_s.length() == 0)
|
||||||
continue;
|
continue;
|
||||||
const char* p = addr_s[0] == 'U' ? addr_s.c_str() + 1 : addr_s.c_str();
|
const char* p = addr_s[0] == 'U' ? addr_s.c_str() + 1 : addr_s.c_str();
|
||||||
addr = (int)strtoul(p, NULL, 16);
|
addr = int(strtoul(p, NULL, 16));
|
||||||
|
|
||||||
// For now, completely ignore ROM addresses
|
// For now, completely ignore ROM addresses
|
||||||
if(!(addr & 0x1000))
|
if(!(addr & 0x1000))
|
||||||
|
@ -1136,7 +1136,7 @@ string CartDebug::saveDisassembly()
|
||||||
<< ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n";
|
<< ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n\n";
|
||||||
int max_len = 0;
|
int max_len = 0;
|
||||||
for(const auto& iter: myUserLabels)
|
for(const auto& iter: myUserLabels)
|
||||||
max_len = BSPF_max(max_len, (int)iter.second.size());
|
max_len = BSPF_max(max_len, int(iter.second.size()));
|
||||||
for(const auto& iter: myUserLabels)
|
for(const auto& iter: myUserLabels)
|
||||||
out << ALIGN(max_len) << iter.second << " = $" << iter.first << "\n";
|
out << ALIGN(max_len) << iter.second << " = $" << iter.first << "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ class Debugger : public DialogContainer
|
||||||
that don't have access to EventHandler.
|
that don't have access to EventHandler.
|
||||||
|
|
||||||
@param message Message to display when entering debugger
|
@param message Message to display when entering debugger
|
||||||
@param data An address associated with the message
|
@param address An address associated with the message
|
||||||
*/
|
*/
|
||||||
bool start(const string& message = "", int address = -1);
|
bool start(const string& message = "", int address = -1);
|
||||||
bool startWithFatalError(const string& message = "");
|
bool startWithFatalError(const string& message = "");
|
||||||
|
@ -164,7 +164,7 @@ class Debugger : public DialogContainer
|
||||||
/**
|
/**
|
||||||
The current cycle count of the System.
|
The current cycle count of the System.
|
||||||
*/
|
*/
|
||||||
int cycles() const { return mySystem.cycles(); }
|
int cycles() const { return int(mySystem.cycles()); }
|
||||||
|
|
||||||
string autoExec();
|
string autoExec();
|
||||||
|
|
||||||
|
|
|
@ -546,7 +546,7 @@ string DebuggerParser::eval()
|
||||||
buf << "$" << Base::toString(args[i], Base::F_16_4)
|
buf << "$" << Base::toString(args[i], Base::F_16_4)
|
||||||
<< " %" << Base::toString(args[i], Base::F_2_16);
|
<< " %" << Base::toString(args[i], Base::F_2_16);
|
||||||
|
|
||||||
buf << " #" << (int) args[i];
|
buf << " #" << int(args[i]);
|
||||||
if(i != argCount - 1)
|
if(i != argCount - 1)
|
||||||
buf << endl;
|
buf << endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ class DebuggerParser
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
kNumCommands = 70,
|
kNumCommands = 70
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constants for argument processing
|
// Constants for argument processing
|
||||||
|
|
|
@ -257,14 +257,14 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
bool isPGfx = check_bit(myPC, CartDebug::PGFX);
|
bool isPGfx = check_bit(myPC, CartDebug::PGFX);
|
||||||
const string& bit_string = isPGfx ? "\x1f" : "\x1e";
|
const string& bit_string = isPGfx ? "\x1f" : "\x1e";
|
||||||
uInt8 byte = Debugger::debugger().peek(myPC+myOffset);
|
uInt8 byte = Debugger::debugger().peek(myPC+myOffset);
|
||||||
myDisasmBuf << ".byte $" << Base::HEX2 << (int)byte << " |";
|
myDisasmBuf << ".byte $" << Base::HEX2 << int(byte) << " |";
|
||||||
for(uInt8 i = 0, c = byte; i < 8; ++i, c <<= 1)
|
for(uInt8 i = 0, c = byte; i < 8; ++i, c <<= 1)
|
||||||
myDisasmBuf << ((c > 127) ? bit_string : " ");
|
myDisasmBuf << ((c > 127) ? bit_string : " ");
|
||||||
myDisasmBuf << "| $" << Base::HEX4 << myPC+myOffset << "'";
|
myDisasmBuf << "| $" << Base::HEX4 << myPC+myOffset << "'";
|
||||||
if(mySettings.gfx_format == Base::F_2)
|
if(mySettings.gfx_format == Base::F_2)
|
||||||
myDisasmBuf << Base::toString(byte, Base::F_2_8);
|
myDisasmBuf << Base::toString(byte, Base::F_2_8);
|
||||||
else
|
else
|
||||||
myDisasmBuf << Base::HEX2 << (int)byte;
|
myDisasmBuf << Base::HEX2 << int(byte);
|
||||||
addEntry(isPGfx ? CartDebug::PGFX : CartDebug::GFX);
|
addEntry(isPGfx ? CartDebug::PGFX : CartDebug::GFX);
|
||||||
}
|
}
|
||||||
myPC++;
|
myPC++;
|
||||||
|
@ -282,9 +282,9 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
myDisasmBuf << Base::HEX4 << myPC+myOffset << "' '";
|
myDisasmBuf << Base::HEX4 << myPC+myOffset << "' '";
|
||||||
|
|
||||||
uInt8 byte = Debugger::debugger().peek(myPC+myOffset);
|
uInt8 byte = Debugger::debugger().peek(myPC+myOffset);
|
||||||
myDisasmBuf << ".byte $" << Base::HEX2 << (int)byte << " $"
|
myDisasmBuf << ".byte $" << Base::HEX2 << int(byte) << " $"
|
||||||
<< Base::HEX4 << myPC+myOffset << "'"
|
<< Base::HEX4 << myPC+myOffset << "'"
|
||||||
<< Base::HEX2 << (int)byte;
|
<< Base::HEX2 << int(byte);
|
||||||
addEntry(CartDebug::DATA);
|
addEntry(CartDebug::DATA);
|
||||||
}
|
}
|
||||||
myPC++;
|
myPC++;
|
||||||
|
@ -311,14 +311,14 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
|
|
||||||
myDisasmBuf << Base::HEX4 << myPC+myOffset << "'L" << Base::HEX4
|
myDisasmBuf << Base::HEX4 << myPC+myOffset << "'L" << Base::HEX4
|
||||||
<< myPC+myOffset << "'.byte " << "$" << Base::HEX2
|
<< myPC+myOffset << "'.byte " << "$" << Base::HEX2
|
||||||
<< (int)Debugger::debugger().peek(myPC+myOffset);
|
<< int(Debugger::debugger().peek(myPC+myOffset));
|
||||||
myPC++;
|
myPC++;
|
||||||
bytes = 1;
|
bytes = 1;
|
||||||
line_empty = false;
|
line_empty = false;
|
||||||
}
|
}
|
||||||
else if(line_empty) // start a new line without a label
|
else if(line_empty) // start a new line without a label
|
||||||
{
|
{
|
||||||
myDisasmBuf << " ' '.byte $" << Base::HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
myDisasmBuf << " ' '.byte $" << Base::HEX2 << int(Debugger::debugger().peek(myPC+myOffset));
|
||||||
myPC++;
|
myPC++;
|
||||||
bytes = 1;
|
bytes = 1;
|
||||||
line_empty = false;
|
line_empty = false;
|
||||||
|
@ -331,7 +331,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myDisasmBuf << ",$" << Base::HEX2 << (int)Debugger::debugger().peek(myPC+myOffset);
|
myDisasmBuf << ",$" << Base::HEX2 << int(Debugger::debugger().peek(myPC+myOffset));
|
||||||
myPC++;
|
myPC++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
addr_mode = IMPLIED;
|
addr_mode = IMPLIED;
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
nextline << ".byte $" << Base::HEX2 << (int)op << " ;";
|
nextline << ".byte $" << Base::HEX2 << int(op) << " ;";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pass == 1)
|
if (pass == 1)
|
||||||
|
@ -398,7 +398,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
else if (pass == 3)
|
else if (pass == 3)
|
||||||
{
|
{
|
||||||
nextline << ourLookup[op].mnemonic;
|
nextline << ourLookup[op].mnemonic;
|
||||||
nextlinebytes << Base::HEX2 << (int)op << " ";
|
nextlinebytes << Base::HEX2 << int(op) << " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add operand(s) for PC values outside the app data range
|
// Add operand(s) for PC values outside the app data range
|
||||||
|
@ -419,9 +419,9 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
/* Line information is already printed; append .byte since last
|
/* Line information is already printed; append .byte since last
|
||||||
instruction will put recompilable object larger that original
|
instruction will put recompilable object larger that original
|
||||||
binary file */
|
binary file */
|
||||||
myDisasmBuf << ".byte $" << Base::HEX2 << (int)op << " $"
|
myDisasmBuf << ".byte $" << Base::HEX2 << int(op) << " $"
|
||||||
<< Base::HEX4 << myPC+myOffset << "'"
|
<< Base::HEX4 << myPC+myOffset << "'"
|
||||||
<< Base::HEX2 << (int)op;
|
<< Base::HEX2 << int(op);
|
||||||
addEntry(CartDebug::DATA);
|
addEntry(CartDebug::DATA);
|
||||||
|
|
||||||
if (myPC == myAppData.end)
|
if (myPC == myAppData.end)
|
||||||
|
@ -432,9 +432,9 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
myDisasmBuf << Base::HEX4 << myPC+myOffset << "' '";
|
myDisasmBuf << Base::HEX4 << myPC+myOffset << "' '";
|
||||||
|
|
||||||
op = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
op = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
||||||
myDisasmBuf << ".byte $" << Base::HEX2 << (int)op << " $"
|
myDisasmBuf << ".byte $" << Base::HEX2 << int(op) << " $"
|
||||||
<< Base::HEX4 << myPC+myOffset << "'"
|
<< Base::HEX4 << myPC+myOffset << "'"
|
||||||
<< Base::HEX2 << (int)op;
|
<< Base::HEX2 << int(op);
|
||||||
addEntry(CartDebug::DATA);
|
addEntry(CartDebug::DATA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -454,7 +454,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
/* Line information is already printed, but we can remove the
|
/* Line information is already printed, but we can remove the
|
||||||
Instruction (i.e. BMI) by simply clearing the buffer to print */
|
Instruction (i.e. BMI) by simply clearing the buffer to print */
|
||||||
myDisasmBuf << ".byte $" << Base::HEX2 << (int)op;
|
myDisasmBuf << ".byte $" << Base::HEX2 << int(op);
|
||||||
addEntry(CartDebug::ROW);
|
addEntry(CartDebug::ROW);
|
||||||
nextline.str("");
|
nextline.str("");
|
||||||
nextlinebytes.str("");
|
nextlinebytes.str("");
|
||||||
|
@ -522,7 +522,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (labfound == 1)
|
if (labfound == 1)
|
||||||
{
|
{
|
||||||
LABEL_A12_HIGH(ad);
|
LABEL_A12_HIGH(ad);
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
else if (labfound == 4)
|
else if (labfound == 4)
|
||||||
{
|
{
|
||||||
|
@ -530,18 +530,18 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
int tmp = (ad & myAppData.end)+myOffset;
|
int tmp = (ad & myAppData.end)+myOffset;
|
||||||
LABEL_A12_HIGH(tmp);
|
LABEL_A12_HIGH(tmp);
|
||||||
nextlinebytes << Base::HEX2 << (int)(tmp&0xff) << " " << Base::HEX2 << (int)(tmp>>8);
|
nextlinebytes << Base::HEX2 << int(tmp&0xff) << " " << Base::HEX2 << int(tmp>>8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nextline << "$" << Base::HEX4 << ad;
|
nextline << "$" << Base::HEX4 << ad;
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LABEL_A12_LOW(ad);
|
LABEL_A12_LOW(ad);
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -554,8 +554,8 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
nextline << " ";
|
nextline << " ";
|
||||||
LABEL_A12_LOW((int)d1);
|
LABEL_A12_LOW(int(d1));
|
||||||
nextlinebytes << Base::HEX2 << (int)d1;
|
nextlinebytes << Base::HEX2 << int(d1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -565,8 +565,8 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
d1 = Debugger::debugger().peek(myPC+myOffset); myPC++;
|
||||||
if (pass == 3)
|
if (pass == 3)
|
||||||
{
|
{
|
||||||
nextline << " #$" << Base::HEX2 << (int)d1 << " ";
|
nextline << " #$" << Base::HEX2 << int(d1) << " ";
|
||||||
nextlinebytes << Base::HEX2 << (int)d1;
|
nextlinebytes << Base::HEX2 << int(d1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -594,7 +594,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
LABEL_A12_HIGH(ad);
|
LABEL_A12_HIGH(ad);
|
||||||
nextline << ",X";
|
nextline << ",X";
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
else if (labfound == 4)
|
else if (labfound == 4)
|
||||||
{
|
{
|
||||||
|
@ -603,19 +603,19 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
int tmp = (ad & myAppData.end)+myOffset;
|
int tmp = (ad & myAppData.end)+myOffset;
|
||||||
LABEL_A12_HIGH(tmp);
|
LABEL_A12_HIGH(tmp);
|
||||||
nextline << ",X";
|
nextline << ",X";
|
||||||
nextlinebytes << Base::HEX2 << (int)(tmp&0xff) << " " << Base::HEX2 << (int)(tmp>>8);
|
nextlinebytes << Base::HEX2 << int(tmp&0xff) << " " << Base::HEX2 << int(tmp>>8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nextline << "$" << Base::HEX4 << ad << ",X";
|
nextline << "$" << Base::HEX4 << ad << ",X";
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LABEL_A12_LOW(ad);
|
LABEL_A12_LOW(ad);
|
||||||
nextline << ",X";
|
nextline << ",X";
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -644,7 +644,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
LABEL_A12_HIGH(ad);
|
LABEL_A12_HIGH(ad);
|
||||||
nextline << ",Y";
|
nextline << ",Y";
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
else if (labfound == 4)
|
else if (labfound == 4)
|
||||||
{
|
{
|
||||||
|
@ -653,19 +653,19 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
int tmp = (ad & myAppData.end)+myOffset;
|
int tmp = (ad & myAppData.end)+myOffset;
|
||||||
LABEL_A12_HIGH(tmp);
|
LABEL_A12_HIGH(tmp);
|
||||||
nextline << ",Y";
|
nextline << ",Y";
|
||||||
nextlinebytes << Base::HEX2 << (int)(tmp&0xff) << " " << Base::HEX2 << (int)(tmp>>8);
|
nextlinebytes << Base::HEX2 << int(tmp&0xff) << " " << Base::HEX2 << int(tmp>>8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nextline << "$" << Base::HEX4 << ad << ",Y";
|
nextline << "$" << Base::HEX4 << ad << ",Y";
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LABEL_A12_LOW(ad);
|
LABEL_A12_LOW(ad);
|
||||||
nextline << ",Y";
|
nextline << ",Y";
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -680,7 +680,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
nextline << " (";
|
nextline << " (";
|
||||||
LABEL_A12_LOW(d1);
|
LABEL_A12_LOW(d1);
|
||||||
nextline << ",X)";
|
nextline << ",X)";
|
||||||
nextlinebytes << Base::HEX2 << (int)d1;
|
nextlinebytes << Base::HEX2 << int(d1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -694,7 +694,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
nextline << " (";
|
nextline << " (";
|
||||||
LABEL_A12_LOW(d1);
|
LABEL_A12_LOW(d1);
|
||||||
nextline << "),Y";
|
nextline << "),Y";
|
||||||
nextlinebytes << Base::HEX2 << (int)d1;
|
nextlinebytes << Base::HEX2 << int(d1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -709,7 +709,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
LABEL_A12_LOW(d1);
|
LABEL_A12_LOW(d1);
|
||||||
nextline << ",X";
|
nextline << ",X";
|
||||||
}
|
}
|
||||||
nextlinebytes << Base::HEX2 << (int)d1;
|
nextlinebytes << Base::HEX2 << int(d1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -723,7 +723,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
LABEL_A12_LOW(d1);
|
LABEL_A12_LOW(d1);
|
||||||
nextline << ",Y";
|
nextline << ",Y";
|
||||||
}
|
}
|
||||||
nextlinebytes << Base::HEX2 << (int)d1;
|
nextlinebytes << Base::HEX2 << int(d1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
else
|
else
|
||||||
nextline << " $" << Base::HEX4 << ad;
|
nextline << " $" << Base::HEX4 << ad;
|
||||||
|
|
||||||
nextlinebytes << Base::HEX2 << (int)d1;
|
nextlinebytes << Base::HEX2 << int(d1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -792,7 +792,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
nextline << ")";
|
nextline << ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
nextlinebytes << Base::HEX2 << (int)(ad&0xff) << " " << Base::HEX2 << (int)(ad>>8);
|
nextlinebytes << Base::HEX2 << int(ad&0xff) << " " << Base::HEX2 << int(ad>>8);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -816,7 +816,7 @@ void DiStella::disasm(uInt32 distart, int pass)
|
||||||
{
|
{
|
||||||
// A complete line of disassembly (text, cycle count, and bytes)
|
// A complete line of disassembly (text, cycle count, and bytes)
|
||||||
myDisasmBuf << nextline.str() << "'"
|
myDisasmBuf << nextline.str() << "'"
|
||||||
<< ";" << dec << (int)ourLookup[op].cycles << "'"
|
<< ";" << dec << int(ourLookup[op].cycles) << "'"
|
||||||
<< nextlinebytes.str();
|
<< nextlinebytes.str();
|
||||||
addEntry(CartDebug::CODE);
|
addEntry(CartDebug::CODE);
|
||||||
if (op == 0x40 || op == 0x60)
|
if (op == 0x40 || op == 0x60)
|
||||||
|
|
|
@ -189,7 +189,7 @@ void TIADebug::saveOldState()
|
||||||
bool TIADebug::vdelP0(int newVal)
|
bool TIADebug::vdelP0(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(VDELP0, ((bool)newVal));
|
mySystem.poke(VDELP0, bool(newVal));
|
||||||
|
|
||||||
return myTIA.myVDELP0;
|
return myTIA.myVDELP0;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ bool TIADebug::vdelP0(int newVal)
|
||||||
bool TIADebug::vdelP1(int newVal)
|
bool TIADebug::vdelP1(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(VDELP1, ((bool)newVal));
|
mySystem.poke(VDELP1, bool(newVal));
|
||||||
|
|
||||||
return myTIA.myVDELP1;
|
return myTIA.myVDELP1;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ bool TIADebug::vdelP1(int newVal)
|
||||||
bool TIADebug::vdelBL(int newVal)
|
bool TIADebug::vdelBL(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(VDELBL, ((bool)newVal));
|
mySystem.poke(VDELBL, bool(newVal));
|
||||||
|
|
||||||
return myTIA.myVDELBL;
|
return myTIA.myVDELBL;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ bool TIADebug::vdelBL(int newVal)
|
||||||
bool TIADebug::enaM0(int newVal)
|
bool TIADebug::enaM0(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(ENAM0, ((bool)newVal) << 1);
|
mySystem.poke(ENAM0, bool(newVal) << 1);
|
||||||
|
|
||||||
return myTIA.myENAM0;
|
return myTIA.myENAM0;
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ bool TIADebug::enaM0(int newVal)
|
||||||
bool TIADebug::enaM1(int newVal)
|
bool TIADebug::enaM1(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(ENAM1, ((bool)newVal) << 1);
|
mySystem.poke(ENAM1, bool(newVal) << 1);
|
||||||
|
|
||||||
return myTIA.myENAM1;
|
return myTIA.myENAM1;
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ bool TIADebug::enaM1(int newVal)
|
||||||
bool TIADebug::enaBL(int newVal)
|
bool TIADebug::enaBL(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(ENABL, ((bool)newVal) << 1);
|
mySystem.poke(ENABL, bool(newVal) << 1);
|
||||||
|
|
||||||
return myTIA.myENABL;
|
return myTIA.myENABL;
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ bool TIADebug::enaBL(int newVal)
|
||||||
bool TIADebug::resMP0(int newVal)
|
bool TIADebug::resMP0(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(RESMP0, ((bool)newVal) << 1);
|
mySystem.poke(RESMP0, bool(newVal) << 1);
|
||||||
|
|
||||||
return myTIA.myRESMP0;
|
return myTIA.myRESMP0;
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ bool TIADebug::resMP0(int newVal)
|
||||||
bool TIADebug::resMP1(int newVal)
|
bool TIADebug::resMP1(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(RESMP1, ((bool)newVal) << 1);
|
mySystem.poke(RESMP1, bool(newVal) << 1);
|
||||||
|
|
||||||
return myTIA.myRESMP1;
|
return myTIA.myRESMP1;
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@ bool TIADebug::resMP1(int newVal)
|
||||||
bool TIADebug::refP0(int newVal)
|
bool TIADebug::refP0(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(REFP0, ((bool)newVal) << 3);
|
mySystem.poke(REFP0, bool(newVal) << 3);
|
||||||
|
|
||||||
return myTIA.myREFP0;
|
return myTIA.myREFP0;
|
||||||
}
|
}
|
||||||
|
@ -270,7 +270,7 @@ bool TIADebug::refP0(int newVal)
|
||||||
bool TIADebug::refP1(int newVal)
|
bool TIADebug::refP1(int newVal)
|
||||||
{
|
{
|
||||||
if(newVal > -1)
|
if(newVal > -1)
|
||||||
mySystem.poke(REFP1, ((bool)newVal) << 3);
|
mySystem.poke(REFP1, bool(newVal) << 3);
|
||||||
|
|
||||||
return myTIA.myREFP1;
|
return myTIA.myREFP1;
|
||||||
}
|
}
|
||||||
|
@ -741,7 +741,7 @@ string TIADebug::toString()
|
||||||
buf << "00: ";
|
buf << "00: ";
|
||||||
for (uInt8 j = 0; j < 0x010; j++)
|
for (uInt8 j = 0; j < 0x010; j++)
|
||||||
{
|
{
|
||||||
buf << Common::Base::HEX2 << (int)mySystem.peek(j) << " ";
|
buf << Common::Base::HEX2 << int(mySystem.peek(j)) << " ";
|
||||||
if(j == 0x07) buf << "- ";
|
if(j == 0x07) buf << "- ";
|
||||||
}
|
}
|
||||||
buf << endl;
|
buf << endl;
|
||||||
|
@ -837,15 +837,15 @@ string TIADebug::toString()
|
||||||
<< endl << " "
|
<< endl << " "
|
||||||
<< booleanWithLabel("m0_m1 ", collM0_M1())
|
<< booleanWithLabel("m0_m1 ", collM0_M1())
|
||||||
<< endl
|
<< endl
|
||||||
<< "AUDF0: $" << Common::Base::HEX2 << (int)myTIA.myAUDF0
|
<< "AUDF0: $" << Common::Base::HEX2 << int(myTIA.myAUDF0)
|
||||||
<< "/" << audFreq(myTIA.myAUDF0) << " "
|
<< "/" << audFreq(myTIA.myAUDF0) << " "
|
||||||
<< "AUDC0: $" << Common::Base::HEX2 << (int)myTIA.myAUDC0 << " "
|
<< "AUDC0: $" << Common::Base::HEX2 << int(myTIA.myAUDC0) << " "
|
||||||
<< "AUDV0: $" << Common::Base::HEX2 << (int)myTIA.myAUDV0
|
<< "AUDV0: $" << Common::Base::HEX2 << int(myTIA.myAUDV0)
|
||||||
<< endl
|
<< endl
|
||||||
<< "AUDF1: $" << Common::Base::HEX2 << (int)myTIA.myAUDF1
|
<< "AUDF1: $" << Common::Base::HEX2 << int(myTIA.myAUDF1)
|
||||||
<< "/" << audFreq(myTIA.myAUDF1) << " "
|
<< "/" << audFreq(myTIA.myAUDF1) << " "
|
||||||
<< "AUDC1: $" << Common::Base::HEX2 << (int)myTIA.myAUDC1 << " "
|
<< "AUDC1: $" << Common::Base::HEX2 << int(myTIA.myAUDC1) << " "
|
||||||
<< "AUDV1: $" << Common::Base::HEX2 << (int)myTIA.myAUDV1
|
<< "AUDV1: $" << Common::Base::HEX2 << int(myTIA.myAUDV1)
|
||||||
;
|
;
|
||||||
// note: last line should not contain \n, caller will add.
|
// note: last line should not contain \n, caller will add.
|
||||||
return buf.str();
|
return buf.str();
|
||||||
|
|
|
@ -48,7 +48,7 @@ class CartDebugWidget : public Widget, public CommandSender
|
||||||
myButtonHeight(myLineHeight + 4),
|
myButtonHeight(myLineHeight + 4),
|
||||||
myDesc(nullptr) { }
|
myDesc(nullptr) { }
|
||||||
|
|
||||||
virtual ~CartDebugWidget() { };
|
virtual ~CartDebugWidget() { }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int addBaseInformation(int bytes, const string& manufacturer,
|
int addBaseInformation(int bytes, const string& manufacturer,
|
||||||
|
@ -82,7 +82,7 @@ class CartDebugWidget : public Widget, public CommandSender
|
||||||
|
|
||||||
StringParser bs(desc, (fwidth - kScrollBarWidth) / myFontWidth - 4);
|
StringParser bs(desc, (fwidth - kScrollBarWidth) / myFontWidth - 4);
|
||||||
const StringList& sl = bs.stringList();
|
const StringList& sl = bs.stringList();
|
||||||
uInt32 lines = (uInt32)sl.size();
|
uInt32 lines = uInt32(sl.size());
|
||||||
if(lines < 3) lines = 3;
|
if(lines < 3) lines = 3;
|
||||||
if(lines > maxlines) lines = maxlines;
|
if(lines > maxlines) lines = maxlines;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ class CartDebugWidget : public Widget, public CommandSender
|
||||||
virtual void saveOldState() { }
|
virtual void saveOldState() { }
|
||||||
|
|
||||||
virtual void loadConfig() override { myDesc->setSelected(0); }
|
virtual void loadConfig() override { myDesc->setSelected(0); }
|
||||||
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) override { };
|
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) override { }
|
||||||
|
|
||||||
// Query internal state of the cart (usually just bankswitching info)
|
// Query internal state of the cart (usually just bankswitching info)
|
||||||
virtual string bankState() { return "0 (non-bankswitched)"; }
|
virtual string bankState() { return "0 (non-bankswitched)"; }
|
||||||
|
@ -121,8 +121,8 @@ class CartDebugWidget : public Widget, public CommandSender
|
||||||
virtual string internalRamDescription() { return EmptyString; }
|
virtual string internalRamDescription() { return EmptyString; }
|
||||||
virtual const ByteArray& internalRamOld(int start, int count) { return myRamOld; }
|
virtual const ByteArray& internalRamOld(int start, int count) { return myRamOld; }
|
||||||
virtual const ByteArray& internalRamCurrent(int start, int count) { return myRamCurrent; }
|
virtual const ByteArray& internalRamCurrent(int start, int count) { return myRamCurrent; }
|
||||||
virtual void internalRamSetValue(int addr, uInt8 value) { };
|
virtual void internalRamSetValue(int addr, uInt8 value) { }
|
||||||
virtual uInt8 internalRamGetValue(int addr) { return 0; };
|
virtual uInt8 internalRamGetValue(int addr) { return 0; }
|
||||||
virtual string internalRamLabel(int addr) { return "Not available/applicable"; }
|
virtual string internalRamLabel(int addr) { return "Not available/applicable"; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -154,7 +154,7 @@ class Console : public Serializable
|
||||||
/**
|
/**
|
||||||
Set the properties to those given
|
Set the properties to those given
|
||||||
|
|
||||||
@param The properties to use for the current game
|
@param props The properties to use for the current game
|
||||||
*/
|
*/
|
||||||
void setProperties(const Properties& props);
|
void setProperties(const Properties& props);
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ class Controller : public Serializable
|
||||||
@param pin The pin of the controller jack to write to
|
@param pin The pin of the controller jack to write to
|
||||||
@param value The value to write to the pin
|
@param value The value to write to the pin
|
||||||
*/
|
*/
|
||||||
virtual void write(DigitalPin pin, bool value) { };
|
virtual void write(DigitalPin pin, bool value) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Called after *all* digital pins have been written on Port A.
|
Called after *all* digital pins have been written on Port A.
|
||||||
|
@ -163,7 +163,7 @@ class Controller : public Serializable
|
||||||
|
|
||||||
@param value The entire contents of the SWCHA register
|
@param value The entire contents of the SWCHA register
|
||||||
*/
|
*/
|
||||||
virtual void controlWrite(uInt8 value) { };
|
virtual void controlWrite(uInt8 value) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Update the entire digital and analog pin state according to the
|
Update the entire digital and analog pin state according to the
|
||||||
|
@ -176,7 +176,7 @@ class Controller : public Serializable
|
||||||
system resets its cycle counter to zero. It may be necessary
|
system resets its cycle counter to zero. It may be necessary
|
||||||
to override this method for controllers that remember cycle counts.
|
to override this method for controllers that remember cycle counts.
|
||||||
*/
|
*/
|
||||||
virtual void systemCyclesReset() { };
|
virtual void systemCyclesReset() { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Determines how this controller will treat values received from the
|
Determines how this controller will treat values received from the
|
||||||
|
|
|
@ -282,7 +282,7 @@ class EventHandler
|
||||||
@param event The event we are remapping
|
@param event The event we are remapping
|
||||||
@param mode The mode where this event is active
|
@param mode The mode where this event is active
|
||||||
@param stick The joystick number
|
@param stick The joystick number
|
||||||
@param axis The joystick hat
|
@param hat The joystick hat
|
||||||
@param value The value on the given hat
|
@param value The value on the given hat
|
||||||
@param updateMenus Whether to update the action mappings (normally
|
@param updateMenus Whether to update the action mappings (normally
|
||||||
we want to do this, unless there are a batch of
|
we want to do this, unless there are a batch of
|
||||||
|
|
|
@ -57,8 +57,6 @@ class FBSurface
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Creates a new FBSurface object
|
Creates a new FBSurface object
|
||||||
|
|
||||||
@param data If non-null, the data values to use as a static surface
|
|
||||||
*/
|
*/
|
||||||
FBSurface();
|
FBSurface();
|
||||||
|
|
||||||
|
@ -155,9 +153,10 @@ class FBSurface
|
||||||
data into a FrameBuffer surface. The pixels must already be in the
|
data into a FrameBuffer surface. The pixels must already be in the
|
||||||
format used by the surface.
|
format used by the surface.
|
||||||
|
|
||||||
@param data The data in uInt8 R/G/B format
|
@param data The data in uInt8 R/G/B format
|
||||||
@param row The row of the surface the data should be placed in
|
@param x The destination x-location to start drawing pixels
|
||||||
@param rowbytes The number of bytes in row of 'data'
|
@param y The destination y-location to start drawing pixels
|
||||||
|
@param numpixels The number of pixels to draw
|
||||||
*/
|
*/
|
||||||
virtual void drawPixels(uInt32* data, uInt32 x, uInt32 y, uInt32 numpixels);
|
virtual void drawPixels(uInt32* data, uInt32 x, uInt32 y, uInt32 numpixels);
|
||||||
|
|
||||||
|
@ -193,14 +192,13 @@ class FBSurface
|
||||||
This method should be called to draw the specified string.
|
This method should be called to draw the specified string.
|
||||||
|
|
||||||
@param font The font to draw the string with
|
@param font The font to draw the string with
|
||||||
@param str The string to draw
|
@param s The string to draw
|
||||||
@param x The x coordinate
|
@param x The x coordinate
|
||||||
@param y The y coordinate
|
@param y The y coordinate
|
||||||
@param w The width of the string area
|
@param w The width of the string area
|
||||||
@param h The height of the string area
|
|
||||||
@param color The color of the text
|
@param color The color of the text
|
||||||
@param align The alignment of the text in the string width area
|
@param align The alignment of the text in the string width area
|
||||||
@param deltax
|
@param deltax FIXME
|
||||||
@param useEllipsis Whether to use '...' when the string is too long
|
@param useEllipsis Whether to use '...' when the string is too long
|
||||||
*/
|
*/
|
||||||
virtual void drawString(
|
virtual void drawString(
|
||||||
|
|
|
@ -42,7 +42,7 @@ enum FBInitStatus {
|
||||||
kSuccess,
|
kSuccess,
|
||||||
kFailComplete,
|
kFailComplete,
|
||||||
kFailTooLarge,
|
kFailTooLarge,
|
||||||
kFailNotSupported,
|
kFailNotSupported
|
||||||
};
|
};
|
||||||
|
|
||||||
// Positions for onscreen/overlaid messages
|
// Positions for onscreen/overlaid messages
|
||||||
|
@ -287,7 +287,7 @@ class FrameBuffer
|
||||||
/**
|
/**
|
||||||
Set up the TIA/emulation palette for a screen of any depth > 8.
|
Set up the TIA/emulation palette for a screen of any depth > 8.
|
||||||
|
|
||||||
@param palette The array of colors in R/G/B format
|
@param raw_palette The array of colors in R/G/B format
|
||||||
*/
|
*/
|
||||||
void setPalette(const uInt32* raw_palette);
|
void setPalette(const uInt32* raw_palette);
|
||||||
|
|
||||||
|
@ -434,8 +434,8 @@ class FrameBuffer
|
||||||
Returns an appropriate video mode based on the current eventhandler
|
Returns an appropriate video mode based on the current eventhandler
|
||||||
state, taking into account the maximum size of the window.
|
state, taking into account the maximum size of the window.
|
||||||
|
|
||||||
@param full Whether to use a windowed or fullscreen mode
|
@param fullscreen Whether to use a windowed or fullscreen mode
|
||||||
@return A valid VideoMode for this framebuffer
|
@return A valid VideoMode for this framebuffer
|
||||||
*/
|
*/
|
||||||
const VideoMode& getSavedVidMode(bool fullscreen);
|
const VideoMode& getSavedVidMode(bool fullscreen);
|
||||||
|
|
||||||
|
|
|
@ -342,7 +342,7 @@ class M6502 : public Serializable
|
||||||
return i;
|
return i;
|
||||||
|
|
||||||
return -1; // no break hit
|
return -1; // no break hit
|
||||||
};
|
}
|
||||||
|
|
||||||
/// Pointer to the debugger for this processor or the null pointer
|
/// Pointer to the debugger for this processor or the null pointer
|
||||||
Debugger* myDebugger;
|
Debugger* myDebugger;
|
||||||
|
|
|
@ -99,14 +99,16 @@ class Properties
|
||||||
/**
|
/**
|
||||||
Load properties from the specified input stream
|
Load properties from the specified input stream
|
||||||
|
|
||||||
@param in The input stream to use
|
@param is The input stream to use
|
||||||
|
@param p The Properties object to write to
|
||||||
*/
|
*/
|
||||||
friend istream& operator>>(istream& is, Properties& p);
|
friend istream& operator>>(istream& is, Properties& p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Save properties to the specified output stream
|
Save properties to the specified output stream
|
||||||
|
|
||||||
@param out The output stream to use
|
@param os The output stream to use
|
||||||
|
@param p The Properties object to read from
|
||||||
*/
|
*/
|
||||||
friend ostream& operator<<(ostream& os, const Properties& p);
|
friend ostream& operator<<(ostream& os, const Properties& p);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Random
|
||||||
*/
|
*/
|
||||||
void initSeed()
|
void initSeed()
|
||||||
{
|
{
|
||||||
myValue = (uInt32) myOSystem.getTicks();
|
myValue = uInt32(myOSystem.getTicks());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -83,7 +83,7 @@ class Dialog : public GuiObject
|
||||||
void addSurface(shared_ptr<FBSurface> surface);
|
void addSurface(shared_ptr<FBSurface> surface);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void draw() override { };
|
virtual void draw() override { }
|
||||||
void releaseFocus() override;
|
void releaseFocus() override;
|
||||||
|
|
||||||
virtual void handleText(char text);
|
virtual void handleText(char text);
|
||||||
|
|
|
@ -120,7 +120,7 @@ class DialogContainer
|
||||||
Handle a joystick hat event.
|
Handle a joystick hat event.
|
||||||
|
|
||||||
@param stick The joystick number
|
@param stick The joystick number
|
||||||
@param axis The joystick hat
|
@param hat The joystick hat
|
||||||
@param value Value associated with given hat
|
@param value Value associated with given hat
|
||||||
*/
|
*/
|
||||||
void handleJoyHatEvent(int stick, int hat, JoyHat value);
|
void handleJoyHatEvent(int stick, int hat, JoyHat value);
|
||||||
|
|
|
@ -37,9 +37,9 @@ struct Point
|
||||||
int x; //!< The horizontal part of the point
|
int x; //!< The horizontal part of the point
|
||||||
int y; //!< The vertical part of the point
|
int y; //!< The vertical part of the point
|
||||||
|
|
||||||
Point() : x(0), y(0) { };
|
Point() : x(0), y(0) { }
|
||||||
Point(const Point& p) : x(p.x), y(p.y) { };
|
Point(const Point& p) : x(p.x), y(p.y) { }
|
||||||
explicit Point(int x1, int y1) : x(x1), y(y1) { };
|
explicit Point(int x1, int y1) : x(x1), y(y1) { }
|
||||||
Point(const string& p) {
|
Point(const string& p) {
|
||||||
char c = '\0';
|
char c = '\0';
|
||||||
x = y = -1;
|
x = y = -1;
|
||||||
|
@ -48,9 +48,9 @@ struct Point
|
||||||
if(c != 'x')
|
if(c != 'x')
|
||||||
x = y = 0;
|
x = y = 0;
|
||||||
}
|
}
|
||||||
Point& operator=(const Point & p) { x = p.x; y = p.y; return *this; };
|
Point& operator=(const Point & p) { x = p.x; y = p.y; return *this; }
|
||||||
bool operator==(const Point & p) const { return x == p.x && y == p.y; };
|
bool operator==(const Point & p) const { return x == p.x && y == p.y; }
|
||||||
bool operator!=(const Point & p) const { return x != p.x || y != p.y; };
|
bool operator!=(const Point & p) const { return x != p.x || y != p.y; }
|
||||||
|
|
||||||
friend ostream& operator<<(ostream& os, const Point& p) {
|
friend ostream& operator<<(ostream& os, const Point& p) {
|
||||||
os << p.x << "x" << p.y;
|
os << p.x << "x" << p.y;
|
||||||
|
@ -63,9 +63,9 @@ struct Size
|
||||||
uInt32 w; //!< The width part of the size
|
uInt32 w; //!< The width part of the size
|
||||||
uInt32 h; //!< The height part of the size
|
uInt32 h; //!< The height part of the size
|
||||||
|
|
||||||
Size() : w(0), h(0) { };
|
Size() : w(0), h(0) { }
|
||||||
Size(const Size& s) : w(s.w), h(s.h) { };
|
Size(const Size& s) : w(s.w), h(s.h) { }
|
||||||
explicit Size(uInt32 w1, uInt32 h1) : w(w1), h(h1) { };
|
explicit Size(uInt32 w1, uInt32 h1) : w(w1), h(h1) { }
|
||||||
Size(const string& s) {
|
Size(const string& s) {
|
||||||
char c = '\0';
|
char c = '\0';
|
||||||
w = h = 0;
|
w = h = 0;
|
||||||
|
@ -76,13 +76,13 @@ struct Size
|
||||||
}
|
}
|
||||||
bool valid() const { return w > 0 && h > 0; }
|
bool valid() const { return w > 0 && h > 0; }
|
||||||
|
|
||||||
Size& operator=(const Size& s) { w = s.w; h = s.h; return *this; };
|
Size& operator=(const Size& s) { w = s.w; h = s.h; return *this; }
|
||||||
bool operator==(const Size& s) const { return w == s.w && h == s.h; };
|
bool operator==(const Size& s) const { return w == s.w && h == s.h; }
|
||||||
bool operator!=(const Size& s) const { return w != s.w || h != s.h; };
|
bool operator!=(const Size& s) const { return w != s.w || h != s.h; }
|
||||||
bool operator<(const Size& s) const { return w < s.w && h < s.h; };
|
bool operator<(const Size& s) const { return w < s.w && h < s.h; }
|
||||||
bool operator<=(const Size& s) const { return w <= s.w && h <= s.h; };
|
bool operator<=(const Size& s) const { return w <= s.w && h <= s.h; }
|
||||||
bool operator>(const Size& s) const { return w > s.w && h > s.h; };
|
bool operator>(const Size& s) const { return w > s.w && h > s.h; }
|
||||||
bool operator>=(const Size& s) const { return w >= s.w && h >= s.h; };
|
bool operator>=(const Size& s) const { return w >= s.w && h >= s.h; }
|
||||||
|
|
||||||
friend ostream& operator<<(ostream& os, const Size& s) {
|
friend ostream& operator<<(ostream& os, const Size& s) {
|
||||||
os << s.w << "x" << s.h;
|
os << s.w << "x" << s.h;
|
||||||
|
|
|
@ -88,7 +88,7 @@ class Widget : public GuiObject
|
||||||
void addFocusWidget(Widget* w) override { _focusList.push_back(w); }
|
void addFocusWidget(Widget* w) override { _focusList.push_back(w); }
|
||||||
void addToFocusList(WidgetArray& list) override {
|
void addToFocusList(WidgetArray& list) override {
|
||||||
Vec::append(_focusList, list);
|
Vec::append(_focusList, list);
|
||||||
};
|
}
|
||||||
|
|
||||||
/** Set/clear WIDGET_ENABLED flag */
|
/** Set/clear WIDGET_ENABLED flag */
|
||||||
void setEnabled(bool e);
|
void setEnabled(bool e);
|
||||||
|
|
Loading…
Reference in New Issue