mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
charstyle format depending on vernum
This commit is contained in:
parent
1b93ecd5a3
commit
ba91bea71c
37
config.cpp
37
config.cpp
@ -38,30 +38,25 @@ struct charstyle_old {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void hread(hstream& hs, charstyle& cs) {
|
void hread(hstream& hs, charstyle& cs) {
|
||||||
charstyle_old cso;
|
// before 0xA61A there was no eyecolor
|
||||||
hread_raw(hs, cso);
|
if(hs.vernum < 0xA61A) {
|
||||||
cs.charid = cso.charid;
|
charstyle_old cso;
|
||||||
cs.skincolor = cso.skincolor;
|
hread_raw(hs, cso);
|
||||||
cs.haircolor = cso.haircolor;
|
cs.charid = cso.charid;
|
||||||
cs.dresscolor = cso.dresscolor;
|
cs.skincolor = cso.skincolor;
|
||||||
cs.swordcolor = cs.eyecolor = cso.swordcolor;
|
cs.haircolor = cso.haircolor;
|
||||||
if(cs.charid < 4) cs.eyecolor = 0;
|
cs.dresscolor = cso.dresscolor;
|
||||||
cs.dresscolor2 = cso.dresscolor2;
|
cs.swordcolor = cs.eyecolor = cso.swordcolor;
|
||||||
cs.uicolor = cso.uicolor;
|
if(cs.charid < 4) cs.eyecolor = 0;
|
||||||
cs.lefthanded = cso.lefthanded;
|
cs.dresscolor2 = cso.dresscolor2;
|
||||||
|
cs.uicolor = cso.uicolor;
|
||||||
|
cs.lefthanded = cso.lefthanded;
|
||||||
|
}
|
||||||
|
else hread_raw(hs, cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hwrite(hstream& hs, const charstyle& cs) {
|
void hwrite(hstream& hs, const charstyle& cs) {
|
||||||
charstyle_old cso;
|
hwrite_raw(hs, cs);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// void hread(hstream& hs, charstyle& cs) { hread_raw(hs, cs); }
|
// void hread(hstream& hs, charstyle& cs) { hread_raw(hs, cs); }
|
||||||
|
4
hyper.h
4
hyper.h
@ -2,8 +2,8 @@
|
|||||||
// It is quite chaotic.
|
// It is quite chaotic.
|
||||||
|
|
||||||
// version numbers
|
// version numbers
|
||||||
#define VER "11.0y"
|
#define VER "11.0z"
|
||||||
#define VERNUM_HEX 0xA619
|
#define VERNUM_HEX 0xA61A
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "hyper_function.h"
|
#include "hyper_function.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user