-
Notifications
You must be signed in to change notification settings - Fork 0
/
c64disksector.cpp
60 lines (47 loc) · 1.27 KB
/
c64disksector.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "c64disksector.h"
#include "c64disktrack.h"
#include "c64disk.h"
#include "c64diskbam.h"
#include "c64diskheader.h"
#include "c64diskdirentries.h"
#include "c64diskgeosinfo.h"
#include "c64diskgeosrecord.h"
C64DiskSector::C64DiskSector(C64DiskTrack *parent, int id, char *data) {
this->Parent = parent;
this->ID = id;
this->Data = data;
this->Block = new C64DiskBlock(this, this->Data);
this->parent()->parent()->appendBlock(this->Block);
}
C64DiskSector::~C64DiskSector() {
}
C64DiskTrack *C64DiskSector::parent() {
return this->Parent;
}
int C64DiskSector::id() {
return this->ID;
}
int C64DiskSector::nextTrack() {
return this->Block->nextTrack();
}
int C64DiskSector::nextSector() {
return this->Block->nextSector();
}
C64DiskBlock *C64DiskSector::toBlock() {
return this->Block;
}
C64DiskBAM *C64DiskSector::toBAM() {
return (C64DiskBAM *)this->Block;
}
C64DiskHeader *C64DiskSector::toHeader() {
return (C64DiskHeader *)this->Block;
}
C64DiskDirEntries *C64DiskSector::toDirEntries() {
return (C64DiskDirEntries *)this->Block;
}
C64DiskGeosInfo *C64DiskSector::toGeosInfo() {
return (C64DiskGeosInfo *)this->Block;
}
C64DiskGeosRecord *C64DiskSector::toGeosRecord() {
return (C64DiskGeosRecord *)this->Block;
}