Overview
Comment: | Migrate to OFOptionsParser |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
f642e9dfbf67a6be7bf37d9df2cf3b03 |
User & Date: | js on 2025-03-02 14:42:43 |
Other Links: | manifest | tags |
Context
2025-03-02
| ||
14:56 | Clean up enqueueInit check-in: d4f57c85c4 user: js tags: trunk | |
14:42 | Migrate to OFOptionsParser check-in: f642e9dfbf user: js tags: trunk | |
14:02 | Migrate to OFApplicationDelegate check-in: 9432e52ca0 user: js tags: trunk | |
Changes
Modified src/.clang-format from [c1e6bd9906] to [a045e80592].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 | + + | class, direct, readonly, readwrite, nullable, nonnull, null_resettable, null_unspecified, assign, retain, strong, copy, weak, unsafe_unretained, atomic, nonatomic, getter, setter ] IndentPPDirectives: AfterHash PPIndentWidth: 1 |
Modified src/Cube.mm from [73cd19e8dc] to [d73ec16894].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - - + + - + - + - + - - + + | // main.cpp: initialisation & main loop #include "cube.h" OF_APPLICATION_DELEGATE(Cube) @implementation Cube |
︙ | |||
94 95 96 97 98 99 100 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - - + - - + + - - - + - - + - - - - - - + + + + + + + + + - - + + - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + - - + - - - - - + + + - - - - - - - - + + + + + + + + + - - + + - + + | SDL_EnableKeyRepeat( on ? SDL_DEFAULT_REPEAT_DELAY : 0, SDL_DEFAULT_REPEAT_INTERVAL); } VARF(gamespeed, 10, 100, 1000, if (multiplayer()) gamespeed = 100); VARP(minmillis, 0, 5, 1000); |
︙ |
Modified src/console.mm from [1df29be187] to [74e953a174].
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - - + + | strn0cpy(hdr.maptitle, s, 128); }; COMMAND(saycommand, ARG_VARI); COMMAND(mapmsg, ARG_1STR); #ifndef _WIN32 |
︙ |
Modified src/cube.h from [7ef12d6e13] to [9f2d7242ba].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | // one big bad include file for the whole engine... nasty! #import <ObjFW/ObjFW.h> #include "tools.h" |
︙ | |||
442 443 444 445 446 447 448 | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | - - - - + + + + - + | }); \ } \ void var_##name() { body; } #define ATOI(s) strtol(s, NULL, 0) // supports hexadecimal numbers #ifdef WIN32 |
︙ |
Modified src/protos.h from [93475710ee] to [615b9acb31].
︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | - - + + - + - + | // rendermd2 extern void rendermodel(char *mdl, int frame, int range, int tex, float rad, float x, float y, float z, float yaw, float pitch, bool teammate, float scale, float speed, int snap = 0, int basetime = 0); extern mapmodelinfo *getmminfo(int i); // server |
︙ |
Modified src/rendergl.mm from [155f47c457] to [a9494ec649].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - - - - - + + + + + | // rendergl.cpp: core opengl rendering stuff #include "cube.h" #ifdef DARWIN |
︙ |
Modified src/savegamedemo.mm from [5f329655d6] to [7d18bd49dc].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | + - + + + + | // loading and saving of savegames & demos, dumps the spawn state of all // mapents, the full state of all dynents (monsters + player) #include "cube.h" #ifdef OF_BIG_ENDIAN |
︙ |
Modified src/server.mm from [d64f08d11a] to [9a377d37ce].
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | sents[i].spawnsecs = 0; }; }; int interm = 0, minremain = 0, mapend = 0; bool mapreload = false; |
︙ | |||
304 305 306 307 308 309 310 | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | - + | enet_packet_create(NULL, MAXTRANS, ENET_PACKET_FLAG_RELIABLE); uchar *start = packet->data; uchar *p = start + 2; putint(p, SV_INITS2C); putint(p, n); putint(p, PROTOCOL_VERSION); putint(p, smapname[0]); |
︙ | |||
505 506 507 508 509 510 511 | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | - - + + | client &c = addclient(); c.type = ST_LOCAL; strcpy_s(c.hostname, "local"); send_welcome(&c - &clients[0]); }; void |
︙ |
Modified src/serverms.mm from [c3c33d8055] to [f8b6105f9f].
︙ | |||
143 144 145 146 147 148 149 | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - + | sendstring(serverdesc, p); buf.dataLength = p - pong; enet_socket_send(pongsock, &addr, &buf, 1); }; }; void |
︙ |
Modified src/serverutil.mm from [5e922bff35] to [8452aaaef1].
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + | n |= *p++ << 16; return n | (*p++ << 24); } else return c; }; void |
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 | - + - + | default: printf("WARNING: unknown commandline option\n"); }; }; if (enet_initialize() < 0) fatal("Unable to initialise network module"); |
Modified src/sound.mm from [da17c5965d] to [1b753dcafe].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - - + + - - + + | struct soundloc { vec loc; bool inuse; } soundlocs[MAXCHAN]; #ifdef USE_MIXER |
︙ |
Modified src/tools.h from [5a12c43f73] to [900cc870ab].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - + - + - + - + | // generic useful stuff for any C++ program #ifndef _TOOLS_H #define _TOOLS_H #ifdef __GNUC__ |
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | - + - + - - - + + + | #define loop(v, m) for (int v = 0; v < (m); v++) #define loopi(m) loop(i, m) #define loopj(m) loop(j, m) #define loopk(m) loop(k, m) #define loopl(m) loop(l, m) #ifdef WIN32 |
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + | int retval; __asm fld a __asm fsub fhalf __asm fistp retval // perf regalloc? return retval; }; #else |
︙ |