mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-21 13:29:36 +00:00
Rez: don't get confused about ID -1 vs ID 65535
This commit is contained in:
parent
f549ead8ac
commit
036a45152e
@ -21,15 +21,15 @@ public:
|
|||||||
|
|
||||||
std::ostream& operator<<(std::ostream& out, ResType t);
|
std::ostream& operator<<(std::ostream& out, ResType t);
|
||||||
|
|
||||||
struct ResRef : public std::pair<ResType, int>
|
struct ResRef : public std::pair<ResType, short>
|
||||||
{
|
{
|
||||||
ResRef() : std::pair<ResType, int>(ResType(), 0) {}
|
ResRef() : std::pair<ResType, short>(ResType(), 0) {}
|
||||||
ResRef(ResType t, int id) : std::pair<ResType, int>(t,id) {}
|
ResRef(ResType t, int id) : std::pair<ResType, short>(t,id) {}
|
||||||
|
|
||||||
ResType& type() { return first; }
|
ResType& type() { return first; }
|
||||||
ResType type() const { return first; }
|
ResType type() const { return first; }
|
||||||
int& id() { return second; }
|
short& id() { return second; }
|
||||||
int id() const { return second; }
|
short id() const { return second; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // RESTYPE_H
|
#endif // RESTYPE_H
|
||||||
|
@ -133,7 +133,7 @@ Resources::Resources(std::istream &in)
|
|||||||
for(int j = 0; j < nRes; j++)
|
for(int j = 0; j < nRes; j++)
|
||||||
{
|
{
|
||||||
in.seekg(start + std::streampos(resmapOffset + typeListOffset + refListOffset + j * 12));
|
in.seekg(start + std::streampos(resmapOffset + typeListOffset + refListOffset + j * 12));
|
||||||
int id = word(in);
|
int id = (short) word(in);
|
||||||
int nameOffset = word(in);
|
int nameOffset = word(in);
|
||||||
int attr = byte(in);
|
int attr = byte(in);
|
||||||
int off1 = byte(in);
|
int off1 = byte(in);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
class Resource
|
class Resource
|
||||||
{
|
{
|
||||||
ResType type;
|
ResType type;
|
||||||
int id;
|
short id;
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string data;
|
std::string data;
|
||||||
int attr;
|
int attr;
|
||||||
|
Loading…
Reference in New Issue
Block a user