Differences From Artifact [a9d5711584]:
- File
src/worldio.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 10088) [annotate] [blame] [check-ins using]
To Artifact [7be3522f11]:
- File src/worldio.m — part of check-in [b5bfe2af86] at 2025-03-23 02:59:37 on branch trunk — Remove u{char,short,int} (user: js, size: 10112) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 | // worldio.cpp: loading & saving of maps and savegames #include "cube.h" #import "Entity.h" struct persistent_entity { short x, y, z; // cube aligned position short attr1; | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | // worldio.cpp: loading & saving of maps and savegames #include "cube.h" #import "Entity.h" struct persistent_entity { short x, y, z; // cube aligned position short attr1; unsigned char type; // type is one of the above unsigned char attr2, attr3, attr4; }; void backup(OFString *name, OFString *backupname) { [OFFileManager.defaultManager removeItemAtPath:backupname]; [OFFileManager.defaultManager moveItemAtPath:name toPath:backupname]; |
135 136 137 138 139 140 141 | } } } // these two are used by getmap/sendmap.. transfers compressed maps directly void | | | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | } } } // these two are used by getmap/sendmap.. transfers compressed maps directly void writemap(OFString *mname, int msize, unsigned char *mdata) { setnames(mname); backup(cgzname, bakname); FILE *f = fopen([cgzname cStringWithEncoding:OFLocale.encoding], "wb"); if (!f) { conoutf(@"could not write map to %@", cgzname); |