mirror of
https://github.com/markdavidlong/AppleSAWS.git
synced 2025-02-16 11:30:26 +00:00
Fully replaced Memory class with AttributedMemory and removed all old references.
This commit is contained in:
parent
4800387ace
commit
9ab500ede5
@ -64,7 +64,6 @@ SOURCES += \
|
||||
src/ui/viewers/texthexdumpviewer.cpp \
|
||||
src/ui/viewers/mazeviewer.cpp \
|
||||
src/ui/viewers/charsetviewer.cpp \
|
||||
src/internals/memory.cxx \
|
||||
src/relocatablefile/relocatablefile.cxx \
|
||||
src/binaryfile/binaryfilemetadata.cpp \
|
||||
src/util/charset.cpp \
|
||||
@ -117,7 +116,6 @@ HEADERS += \
|
||||
src/ui/viewers/applesoftfileviewer.h \
|
||||
src/applesoftfile/applesoftformatter.h \
|
||||
src/applesoftfile/applesoftline.h \
|
||||
src/internals/memory.h \
|
||||
src/ui/viewers/disassemblerviewer.h \
|
||||
src/ui/viewers/hexdumpviewer.h \
|
||||
src/ui/viewers/texthexdumpviewer.h \
|
||||
|
@ -1,21 +0,0 @@
|
||||
#include "memory.h"
|
||||
#include <QDebug>
|
||||
|
||||
Memory::Memory()
|
||||
{
|
||||
quint8 zero = 0;
|
||||
for (int idx = 0; idx < 65536; idx++) {
|
||||
m_memory.append(zero);
|
||||
}
|
||||
}
|
||||
|
||||
bool Memory::addFile(QByteArray data, quint16 start)
|
||||
{
|
||||
if (start+data.length() > 65536) {
|
||||
qDebug() << "Memory overflow adding data."; return false;
|
||||
}
|
||||
|
||||
m_memory.replace(start,data.length(),data);
|
||||
|
||||
return true;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#ifndef MEMORY_H
|
||||
#define MEMORY_H
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
class Memory {
|
||||
public:
|
||||
Memory();
|
||||
|
||||
bool addFile(QByteArray data, quint16 start);
|
||||
|
||||
QByteArray &values() { return m_memory; }
|
||||
|
||||
quint8 at(quint16 addr) { return m_memory.at(addr); }
|
||||
|
||||
private:
|
||||
QByteArray m_memory;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -4,7 +4,6 @@
|
||||
#include <QWidget>
|
||||
#include <QByteArray>
|
||||
|
||||
//#include "memory.h"
|
||||
#include "attributedmemory.h"
|
||||
#include "binaryfile.h"
|
||||
#include "relocatablefile.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QImage>
|
||||
|
||||
#include "binaryfile.h"
|
||||
#include "memory.h"
|
||||
#include "attributedmemory.h"
|
||||
#include "fileviewerinterface.h"
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ public:
|
||||
private:
|
||||
QPixmap m_maze;
|
||||
BinaryFile *m_file;
|
||||
Memory mem;
|
||||
AttributedMemory mem;
|
||||
|
||||
bool cellHasWalls(int x, int y);
|
||||
bool cellHasNorthDoor(int x, int y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user