mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-05 11:12:49 +00:00
placed all extra hread/hwrite functions here
This commit is contained in:
parent
5403859b41
commit
82fcf76005
@ -8,11 +8,14 @@ namespace hr {
|
|||||||
|
|
||||||
using pcell = cell*;
|
using pcell = cell*;
|
||||||
|
|
||||||
void hwrite(hstream& hs, const pcell& c) {
|
inline void hread(hstream& hs, transmatrix& h) { for(int i=0; i<MDIM; i++) hread(hs, h[i]); }
|
||||||
|
inline void hwrite(hstream& hs, transmatrix h) { for(int i=0; i<MDIM; i++) hwrite(hs, h[i]); }
|
||||||
|
|
||||||
|
inline void hwrite(hstream& hs, const pcell& c) {
|
||||||
hs.write<int>(mapstream::cellids[c]);
|
hs.write<int>(mapstream::cellids[c]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hread(hstream& hs, pcell& c) {
|
inline void hread(hstream& hs, pcell& c) {
|
||||||
int32_t at = hs.get<int>();
|
int32_t at = hs.get<int>();
|
||||||
c = mapstream::cellbyid[at];
|
c = mapstream::cellbyid[at];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user