mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
charstyle format depending on vernum
This commit is contained in:
parent
1b93ecd5a3
commit
ba91bea71c
15
config.cpp
15
config.cpp
@ -38,6 +38,8 @@ struct charstyle_old {
|
||||
};
|
||||
|
||||
void hread(hstream& hs, charstyle& cs) {
|
||||
// before 0xA61A there was no eyecolor
|
||||
if(hs.vernum < 0xA61A) {
|
||||
charstyle_old cso;
|
||||
hread_raw(hs, cso);
|
||||
cs.charid = cso.charid;
|
||||
@ -50,18 +52,11 @@ void hread(hstream& hs, charstyle& cs) {
|
||||
cs.uicolor = cso.uicolor;
|
||||
cs.lefthanded = cso.lefthanded;
|
||||
}
|
||||
else hread_raw(hs, cs);
|
||||
}
|
||||
|
||||
void hwrite(hstream& hs, const charstyle& cs) {
|
||||
charstyle_old cso;
|
||||
cso.charid = cs.charid;
|
||||
cso.skincolor = cs.skincolor;
|
||||
cso.haircolor = cs.haircolor;
|
||||
cso.dresscolor = cs.dresscolor;
|
||||
cso.swordcolor = cs.charid >= 4 ? cs.eyecolor : cs.swordcolor;
|
||||
cso.dresscolor2 = cs.dresscolor2;
|
||||
cso.uicolor = cs.uicolor;
|
||||
cso.lefthanded = cs.lefthanded;
|
||||
hwrite_raw(hs, cso);
|
||||
hwrite_raw(hs, cs);
|
||||
}
|
||||
|
||||
// void hread(hstream& hs, charstyle& cs) { hread_raw(hs, cs); }
|
||||
|
Loading…
Reference in New Issue
Block a user