Comment: | Remove u{char,short,int} |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b5bfe2af86efc76d1ac600bf7cda4a17 |
User & Date: | js on 2025-03-23 02:59:37 |
Other Links: | manifest | tags |
2025-03-23
| ||
14:17 | Adjust to ObjFW changes check-in: 85566b261d user: js tags: trunk | |
02:59 | Remove u{char,short,int} check-in: b5bfe2af86 user: js tags: trunk | |
02:47 | Remove loop[ijkl] check-in: 6b85eefc85 user: js tags: trunk | |
Modified src/MD2.m from [1b5856edcb] to [a74f6892f8].
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + | int numSkins, numVertices, numTexcoords; int numTriangles, numGlCommands, numFrames; int offsetSkins, offsetTexcoords, offsetTriangles; int offsetFrames, offsetGlCommands, offsetEnd; }; struct md2_vertex { |
︙ | |||
124 125 126 127 128 129 130 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | - + | OFAssert(_mverts[frame] == NULL); _mverts[frame] = OFAllocMemory(_numVerts, sizeof(OFVector3D)); struct md2_frame *cf = (struct md2_frame *)((char *)_frames + _frameSize * frame); float sc = 16.0f / scale; for (int vi = 0; vi < _numVerts; vi++) { |
︙ |
Modified src/clientextras.m from [40507de7a2] to [1114a27a28].
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - - + + - + - - + + - + | changemap(mapname); mapname = getclientmap(); OFData *mapdata = readmap(mapname); if (mapdata == nil) return; ENetPacket *packet = enet_packet_create( NULL, MAXTRANS + mapdata.count, ENET_PACKET_FLAG_RELIABLE); |
Modified src/clients.m from [e57ccf0fe6] to [6542299bf2].
︙ | |||
278 279 280 281 282 283 284 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | - - + + | c2sinfo(DynamicEntity *d) { if (clientnum < 0) return; // we haven't had a welcome message from the server yet if (lastmillis - lastupdate < 40) return; // don't update faster than 25fps ENetPacket *packet = enet_packet_create(NULL, MAXTRANS, 0); |
︙ | |||
350 351 352 353 354 355 356 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + | [messages removeAllObjects]; if (lastmillis - lastping > 250) { putint(&p, SV_PING); putint(&p, lastmillis); lastping = lastmillis; } } |
︙ |
Modified src/clients2c.m from [8bc911d5e6] to [69be55db81].
︙ | |||
60 61 62 63 64 65 66 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + - + - - + + | d.lag = (d.lag * 5 + lagtime) / 6; d.lastUpdate = lastmillis; } } // processes any updates from the server void |
︙ | |||
280 281 282 283 284 285 286 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | - + - + | case SV_ITEMPICKUP: setspawn(getint(&p), false); getint(&p); break; case SV_ITEMSPAWN: { |
︙ | |||
328 329 330 331 332 333 334 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | - + - + | break; } break; } case SV_EDITENT: // coop edit of ent { |
︙ |
Modified src/cube.h from [0e2553a48d] to [06881e859d].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - - - - - - - - - - + + + + + + + + + + + + + + + + + + | CHF, // idem ceiling SPACE, // entirely empty cube SEMISOLID, // generated by mipmapping MAXTYPE }; struct sqr { |
︙ | |||
83 84 85 86 87 88 89 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + | struct header { char head[4]; // "CUBE" int version; // any >8bit quantity is a little indian int headersize; // sizeof(header) int sfactor; // in bits int numents; char maptitle[128]; |
︙ | |||
233 234 235 236 237 238 239 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | - + | S_JUMPPAD, }; // vertex array format struct vertex { float u, v, x, y, z; |
︙ |
Modified src/editing.m from [f776852317] to [6ba0a980d9].
︙ | |||
323 324 325 326 327 328 329 | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | - + | void tofronttex() // maintain most recently used of the texture lists when applying // texture { for (int i = 0; i < 3; i++) { int c = curedittex[i]; if (c >= 0) { |
︙ |
Modified src/entities.m from [a819c302d8] to [aa08365e90].
︙ | |||
334 335 336 337 338 339 340 341 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | + - + - + - + | if (player1.quadMillis && (player1.quadMillis -= time) < 0) { player1.quadMillis = 0; playsoundc(S_PUPOUT); conoutf(@"quad damage is over"); } } // puts items in network stream and also spawns them locally void |
Modified src/protos.h from [7c4924e6fb] to [5294dddff8].
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | - + | struct sqr *h2, struct sqr *s, struct sqr *t, struct sqr *u, struct sqr *v); extern void addwaterquad(int x, int y, int size); extern int renderwater(float hf); extern void finishstrips(); extern void setarraypointers(); // client |
︙ | |||
184 185 186 187 188 189 190 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | - + - + | extern void particle_trail( int type, int fade, const OFVector3D *from, const OFVector3D *to); extern void render_particles(int time); // worldio extern void save_world(OFString *fname); extern void load_world(OFString *mname); |
︙ | |||
222 223 224 225 226 227 228 | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - - - + + + - + - + + - + - + | extern void initserver(bool dedicated, int uprate, OFString *sdesc, OFString *ip, OFString *master, OFString *passwd, int maxcl); extern void cleanupserver(); extern void localconnect(); extern void localdisconnect(); extern void localclienttoserver(struct _ENetPacket *); extern void serverslice(int seconds, unsigned int timeout); |
Modified src/rendercubes.m from [9b7cf3b555] to [3c13e91f26].
︙ | |||
145 146 147 148 149 150 151 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | + - + + - + | abs(ol4g - l4->g) < lighterr && abs(ol3b - l3->b) < lighterr && abs(ol4b - l4->b) < lighterr) || !wtex) { curvert -= 2; nquads--; } else { unsigned char *p3 = |
︙ |
Modified src/rendergl.m from [34f844358a] to [d9ebc3b45e].
︙ | |||
109 110 111 112 113 114 115 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - + | } @finally { SDL_FreeFormat(format); } } #if 0 for (int i = 0; i < s->w * s->h * 3; i++) { |
︙ |
Modified src/savegamedemo.m from [c92a453804] to [d2d1d77a28].
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | - + | void demoblend(int damage) { bdamage = damage; } void |
︙ | |||
428 429 430 431 432 433 434 | 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | - + | int len = gzgeti(); if (len < 1 || len > MAXTRANS) { conoutf( @"error: huge packet during demo play (%d)", len); stopreset(); return; } |
︙ |
Modified src/server.m from [98a7979cee] to [d5e909dacd].
︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - - + + - + - - + + - + | } void send2(bool rel, int cn, int a, int b) { ENetPacket *packet = enet_packet_create(NULL, 32, rel ? ENET_PACKET_FLAG_RELIABLE : 0); |
︙ | |||
113 114 115 116 117 118 119 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - + - + + | { [sents removeAllObjects]; notgotitems = true; } // server side item pickup, acknowledge first client that gets it static void |
︙ | |||
174 175 176 177 178 179 180 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | - + - - + + | // server side processing of updates: does very little and most state is tracked // client only could be extended to move more gameplay to server (at expense of // lag) void process(ENetPacket *packet, int sender) // sender may be -1 { |
︙ | |||
296 297 298 299 300 301 302 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - - + + - + | } void send_welcome(int n) { ENetPacket *packet = enet_packet_create(NULL, MAXTRANS, ENET_PACKET_FLAG_RELIABLE); |
︙ |
Modified src/serverbrowser.m from [3cbd2b77d6] to [5762ec3ef4].
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - - + + | [servers addObject:[ServerInfo infoWithName:servername]]; } void pingservers() { ENetBuffer buf; |
︙ | |||
169 170 171 172 173 174 175 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | - + | void checkpings() { enet_uint32 events = ENET_SOCKET_WAIT_RECEIVE; ENetBuffer buf; ENetAddress addr; |
︙ | |||
262 263 264 265 266 267 268 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | - - + + | menuset(1); } void updatefrommaster() { const int MAXUPD = 32000; |
︙ |
Modified src/serverms.m from [c145a0420f] to [45981a3e7c].
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - - + + - + - + | } buf->data = ((char *)buf->data) + len; ((char *)buf->data)[0] = 0; buf->dataLength -= len; } } |
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - - + + | { bool busy = mssock != ENET_SOCKET_NULL; httpgetrecieve(&masterb); if (busy && mssock == ENET_SOCKET_NULL) printf("masterserver reply: %s\n", stripheader(masterrep)); } |
︙ | |||
122 123 124 125 126 127 128 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | - + | { checkmasterreply(); updatemasterserver(seconds); // reply all server info requests ENetBuffer buf; ENetAddress addr; |
︙ |
Modified src/serverutil.m from [f5a43d9173] to [25b79fa395].
1 2 3 4 5 6 7 8 | 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 51 52 53 | - + - + - + | // misc useful functions used by the server #include "cube.h" // all network traffic is in 32bit ints, which are then compressed using the // following simple scheme (assumes that most values are small). void |
︙ | |||
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 | - + - + - + - - + + - + - + | return -1; } // sending of maps between clients static OFString *copyname; int copysize; |
︙ |
Modified src/tools.h from [1e36fccfb6] to [0a7160063e].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - - - - | #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #import <ObjFW/ObjFW.h> |
︙ |
Modified src/tools.m from [9fca1834ea] to [8e8dbaa306].
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - - + + | void *memory, int stride, int length) // little indians as storage format { if (*((char *)&stride)) return; for (int w = 0; w < length; w++) { for (int i = 0; i < stride / 2; i++) { |
Modified src/world.m from [9e368d7a28] to [b3c4009ae5].
︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + | o[0] = SWS(w, x, y, ws); // the 4 constituent cubes o[1] = SWS(w, x + 1, y, ws); o[2] = SWS(w, x + 1, y + 1, ws); o[3] = SWS(w, x, y + 1, ws); // the target cube in the higher mip level struct sqr *r = SWS(v, x / 2, y / 2, vs); *r = *o[0]; |
︙ | |||
377 378 379 380 381 382 383 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | - + | e.attr2 = 255; break; case MAPMODEL: e.attr4 = e.attr3; e.attr3 = e.attr2; case MONSTER: case TELEDEST: |
︙ | |||
410 411 412 413 414 415 416 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | - - + + | e.type = NOTUSED; if (type == LIGHT) calclight(); } COMMAND(clearents, ARG_1STR) |
︙ |
Modified src/worldio.m from [a9d5711584] to [7be3522f11].
1 2 3 4 5 6 7 8 9 | 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; |
︙ | |||
135 136 137 138 139 140 141 | 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 |
︙ |
Modified src/worldlight.m from [20e5b19402] to [78382b218b].
︙ | |||
104 105 106 107 108 109 110 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - + | } else // the old (white) light code, here for the few people with old // video cards that don't support overbright { for (int i = 0; i < steps; i++) { struct sqr *s = S(x >> PRECBITS, y >> PRECBITS); int light = l >> PRECBITS; if (light > s->r) |
︙ |