Comment: | Migrate more strings |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
e7b5d33cada1ff8db653655ab2c77ead |
User & Date: | js on 2025-03-03 23:52:52 |
Other Links: | manifest | tags |
2025-03-03
| ||
23:54 | Merge accidental fork check-in: a6544d60c4 user: js tags: trunk | |
23:52 | Migrate more strings check-in: e7b5d33cad user: js tags: trunk | |
2025-03-02
| ||
19:52 | Migrate more strings check-in: 0d125c31da user: js tags: trunk | |
Modified src/Cube.mm from [008a05c64e] to [1c90efecc5].
︙ | |||
198 199 200 201 202 203 204 | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - - - - - - - - - - + + + + + + + + + + | fatal("could not find core textures (hint: run cube from the " "parent of the bin directory)"); log("sound"); initsound(); log("cfg"); |
︙ |
Modified src/client.mm from [72369d5670] to [f8f6147037].
︙ | |||
53 54 55 56 57 58 59 | 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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - + + - - - + + + + + - + + - - - - + + + + - - + + - - + + - - - - - + + + + + + - - - + + + - - - - - - - - + + + + + + + + + | return; assert(ENET_PEER_PACKET_THROTTLE_SCALE == 32); enet_peer_throttle_configure(clienthost->peers, throttle_interval * 1000, throttle_accel, throttle_decel); } void |
︙ | |||
169 170 171 172 173 174 175 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + | echo(char *text) { conoutf(@"%s", text); } COMMAND(echo, ARG_VARI) COMMANDN(say, toserver, ARG_VARI) |
︙ | |||
214 215 216 217 218 219 220 | 220 221 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 | - + + - - - + + + + - - + + | int lastupdate = 0, lastping = 0; OFString *toservermap; bool senditemstoserver = false; // after a map change, since server doesn't have map data string clientpassword; void |
︙ |
Modified src/clientextras.mm from [d11e243f24] to [138c74a711].
︙ | |||
9 10 11 12 13 14 15 | 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 | - + - + | // D D D D' D D D D' A A' P P' I I' // R, R' E L J J' int frame[] = {178, 184, 190, 137, 183, 189, 197, 164, 46, 51, 54, 32, 0, 0, 40, 1, 162, 162, 67, 168}; int range[] = {6, 6, 8, 28, 1, 1, 1, 1, 8, 19, 4, 18, 40, 1, 6, 15, 1, 1, 1, 1}; void |
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 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 | - + - + - + - - + + - + | } else if (!d->onfloor && d->timeinair > 100) { n = 18; } else { n = 14; speed = 1200 / d->maxspeed * scale; if (hellpig) speed = 300 / d->maxspeed; |
︙ | |||
157 158 159 160 161 162 163 | 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 183 184 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 | - + - + - - + + - + - + + - + - + - + - + | menumanual(0, scorelines.length() + 1, teamscores); }; }; // sendmap/getmap commands, should be replaced by more intuitive map downloading void |
Modified src/clientgame.mm from [e35d803d58] to [7f736a9f83].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 | + + | // clientgame.cpp: core game related stuff #include "cube.h" #include <memory> int nextmode = 0; // nextmode becomes gamemode after next map load VAR(gamemode, 1, 0, 0); void mode(int n) { |
︙ | |||
227 228 229 230 231 232 233 | 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 | - + - + - - + + - + + + + - + - + + | return; } // if we die in SP we try the same map again respawnself(); } } int sleepwait = 0; |
︙ | |||
504 505 506 507 508 509 510 | 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | - - - + + + | loopv(players) if (players[i]) players[i]->frags = 0; resetspawns(); @autoreleasepool { clientmap = @(name); } if (editmode) toggleedit(); |
Modified src/command.mm from [a0d92d1a92] to [ddbc7f66e7].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + + | // command.cpp: implements the parsing and execution of a tiny script language // which is largely backwards compatible with the quake console language. #include "cube.h" #include <memory> enum { ID_VAR, ID_COMMAND, ID_ALIAS }; @interface Ident : OFObject @property (nonatomic) int type; // one of ID_* above @property (copy, nonatomic) OFString *name; @property (nonatomic) int min, max; // ID_VAR |
︙ | |||
32 33 34 35 36 37 38 | 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 61 62 63 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 102 103 104 105 106 | - + - - + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - + + - - - + - - - - - - - - - + + + + + + + + - + - - + - - + - - + - - + - - + - - + - | return newstring(n); } // contains ALL vars/commands/aliases OFMutableDictionary<OFString *, Ident *> *idents; void |
︙ | |||
292 293 294 295 296 297 298 | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 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 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - - - - - + + + + + + + + + + - - - - - + + + + + + + + + + + - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + | ATOI(w[4])); break; case ARG_NONE: if (isdown) ((void(__cdecl *)()) ID.fun)(); break; |
︙ | |||
379 380 381 382 383 384 385 | 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | - - - - - - - - - - - | strcat_s( r, " "); } ((void(__cdecl *)( char *))ID.fun)(r); break; } |
︙ | |||
475 476 477 478 479 480 481 | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | + - - - - - + + + + + + + + + | } break; // alias, also used as functions and (global) // variables case ID_ALIAS: for (int i = 1; i < numargs; i++) { @autoreleasepool { |
︙ | |||
537 538 539 540 541 542 543 | 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + + - - - - - - - - - - + + + + + + + + + + + - + - - + + + + + | }]; completeidx++; if (completeidx >= idx) completeidx = 0; } bool |
︙ | |||
596 597 598 599 600 601 602 | 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 | - + - - - - - + + + + + - + + + - - - + + + + + + - + + + + - - - - - - - - + + + + + + + + + - + + + + + - - + + - + + + - + + | COMMAND(writecfg, ARG_NONE) // below the commands that implement a small imperative language. thanks to the // semantics of // () and [] expressions, any control construct can be defined trivially. void |
︙ | |||
662 663 664 665 666 667 668 | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 | - + + - - - - + + + + + + + + - + | while (*a) if (*a++ == ' ') n++; return n + 1; } void |
︙ |
Modified src/console.mm from [e55e1dd6f3] to [dd3dab2434].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + + | // console.cpp: the console buffer, its display, and command line control #include "cube.h" #include <ctype.h> #include <memory> struct cline { char *cref; int outtime; }; vector<cline> conlines; |
︙ | |||
90 91 92 93 94 95 96 | 92 93 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 | - + + - - - + + + + - + + + - - - - - - + + + + + + - - + + + - - + + + - + + - - - + + + - - + | int code; char *name; char *action; } keyms[256]; int numkm = 0; void |
︙ |
Modified src/cube.h from [6a3965a96d] to [ea9ed1c660].
︙ | |||
106 107 108 109 110 111 112 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | - + | float x, y, z; }; struct block { int x, y, xs, ys; }; struct mapmodelinfo { int rad, h, zoff, snap; |
︙ | |||
375 376 377 378 379 380 381 | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - + - + - - - + + - + - + - + | enum // function signatures for script functions, see command.cpp { ARG_1INT, ARG_2INT, ARG_3INT, ARG_4INT, ARG_NONE, |
︙ |
Modified src/editing.mm from [90f4cefa84] to [3bf42210f7].
1 2 3 4 5 6 7 8 9 10 11 | 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 | - - - - - - + + + + + + + + + + + + + | // editing.cpp: most map editing commands go here, entity editing commands are // in world.cpp #include "cube.h" bool editmode = false; // the current selection, used by almost all editing commands // invariant: all code assumes that these are kept inside MINBORD distance of // the edge of the map |
︙ | |||
589 590 591 592 593 594 595 | 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 | - + + - + - - + + + + | edittag(int tag) { EDITSELMP; loopselxy(s->tag = tag); }; void |
︙ |
Modified src/entities.mm from [2a578e1163] to [22648f5295].
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - + + + + + + + + | // entities.cpp: map entity related functions (pickup etc.) #include "cube.h" vector<entity> ents; |
︙ | |||
63 64 65 66 67 68 69 | 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 | - + - + - + | case 3: continue; case 2: case 0: if (!e.spawned) continue; |
︙ |
Modified src/menus.mm from [f8da5ecd7e] to [b007e3d965].
︙ | |||
22 23 24 25 26 27 28 | 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 | - - + + - + + + - - - - + + + + - - + + + + | void menuset(int menu) { if ((vmenu = menu) >= 1) resetmovement(player1); if (vmenu == 1) menus[1].menusel = 0; |
︙ | |||
99 100 101 102 103 104 105 | 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 | - + + - - - + + + - + + + - + + - - - - + + + + + + - - - | draw_text(m.items[j].text, x, y, 2); y += step; }; return true; }; void |
︙ | |||
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 | - - + + + + + - - + + | menusel = n - 1; else if (menusel >= n) menusel = 0; menus[vmenu].menusel = menusel; } else { if (code == SDLK_RETURN || code == -2) { char *action = menus[vmenu].items[menusel].action; |
Modified src/monster.mm from [1a6c1928af] to [89afc85b2b].
︙ | |||
22 23 24 25 26 27 28 | 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 54 55 56 57 58 59 60 61 62 63 64 | - + - - - + + + - + - - - + + + - + - + - + - + | #define NUMMONSTERTYPES 8 struct monstertype // see docs for how these values modify behaviour { short gun, speed, health, freq, lag, rate, pain, loyalty, mscale, bscale; short painsound, diesound; |
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | + - + + | m->health = t->health; m->armour = 0; loopi(NUMGUNS) m->ammo[i] = 10000; m->pitch = 0; m->roll = 0; m->state = CS_ALIVE; m->anger = 0; @autoreleasepool { |
︙ | |||
402 403 404 405 406 407 408 | 404 405 406 407 408 409 410 411 | - + | void monsterrender() { loopv(monsters) renderclient(monsters[i], false, monstertypes[monsters[i]->mtype].mdlname, monsters[i]->mtype == 5, monstertypes[monsters[i]->mtype].mscale / 10.0f); |
Modified src/protos.h from [caa998f8bf] to [e663cdaad7].
1 2 3 | 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 | - + - - - + + + - - + + - + - + - + | // protos for ALL external functions in cube... // command |
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + | extern void addwaterquad(int x, int y, int size); extern int renderwater(float hf); extern void finishstrips(); extern void setarraypointers(); // client extern void localservertoclient(uchar *buf, int len); |
︙ | |||
102 103 104 105 106 107 108 | 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 | - + - + | extern void timeupdate(int timeremain); extern void resetmovement(dynent *d); extern void fixplayer1range(); // clientextras extern void renderclients(); extern void renderclient( |
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | - + | // renderparticles extern void setorient(vec &r, vec &u); extern void particle_splash(int type, int num, int fade, vec &p); extern void particle_trail(int type, int fade, vec &from, vec &to); extern void render_particles(int time); // worldio |
︙ | |||
204 205 206 207 208 209 210 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + | // sound extern void playsound(int n, vec *loc = 0); extern void playsoundc(int n); extern void initsound(); extern void cleansound(); // rendermd2 |
︙ |
Modified src/renderextras.mm from [92e074465e] to [a7072e43d2].
︙ | |||
143 144 145 146 147 148 149 | 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 183 184 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 231 | - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - + + + + - + + - - - - - - - - - - - + + + + + + + + + + + + - - - - + + + + + | }; glDisable(GL_BLEND); glDepthMask(GL_TRUE); }; string closeent; |
︙ |
Modified src/rendergl.mm from [d502cbc841] to [6ee2ffc9ed].
︙ | |||
146 147 148 149 150 151 152 | 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 | - + + - - - - - - - + + + + + + + + | texturereset() { curtexnum = 0; } COMMAND(texturereset, ARG_NONE) void |
︙ | |||
298 299 300 301 302 303 304 | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - - + + - + | int xtraverts; VAR(fog, 64, 180, 1024); VAR(fogcolour, 0, 0x8099B3, 0xFFFFFF); VARP(hudgun, 0, 1, 1); |
︙ |
Modified src/rendermd2.mm from [8c996c1951] to [567a64e197].
︙ | |||
212 213 214 215 216 217 218 | 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 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 273 274 275 276 | - - - + + + - + + - - - - - - - - - - - - + + + + + + + + + + + + - - + + + - + + - - + + - + | sprintf_sd(name1)("packages/models/%s/tris.md2", m->loadname); if (!m->load(path(name1))) fatal("loadmodel: ", name1); sprintf_sd(name2)("packages/models/%s/skin.jpg", m->loadname); int xs, ys; installtex(FIRSTMDL + m->mdlnum, path(name2), xs, ys); m->loaded = true; |
︙ |
Modified src/savegamedemo.mm from [173411f8b2] to [8854cf5de9].
︙ | |||
115 116 117 118 119 120 121 | 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 | - + + - - - - - - - - - - + + + + + + + + + + + | { gzput(players[i] == NULL); gzwrite(f, players[i], sizeof(dynent)); } } void |
︙ | |||
153 154 155 156 157 158 159 | 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 183 184 185 186 187 188 | - - - + + + - + + - - - - + + + + + | // architectures simpifies things a LOT if (gzgeti() != SAVEGAMEVERSION || gzgeti() != sizeof(dynent)) goto out; string mapname; gzread(f, mapname, _MAXDEFSTR); nextmode = gzgeti(); @autoreleasepool { |
︙ | |||
239 240 241 242 243 244 245 | 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 273 274 275 276 | - + + - - - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + | int starttime = 0; int playbacktime = 0; int ddamage, bdamage; vec dorig; void |
︙ | |||
302 303 304 305 306 307 308 | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - + + - - - - - + + + + + + | } // FIXME: add all other client state which is not send through // the network } } void |
︙ |
Modified src/serverbrowser.mm from [28e1977716] to [b2e734a52a].
︙ | |||
143 144 145 146 147 148 149 | 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 | - - + + - + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + | ENetSocket pingsock = ENET_SOCKET_NULL; int lastinfo = 0; char * getservername(int n) { return servers[n].name; |
︙ | |||
310 311 312 313 314 315 316 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | - + - + | else { servers.setsize(0); execute((char *)reply); }; servermenu(); } |
Modified src/sound.mm from [45fff0426a] to [143b0d78b9].
︙ | |||
70 71 72 73 74 75 76 | 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 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 | - + - - + + - + + - - - + + + - - - + + + - + - - - - - - - - - - + + + + + + + + + + + - - - + + + - + - - - - + + + + - - + | Mix_AllocateChannels(MAXCHAN); #else if (FSOUND_GetVersion() < FMOD_VERSION) fatal("old FMOD dll"); if (!FSOUND_Init(SOUNDFREQ, MAXCHAN, FSOUND_INIT_GLOBALFOCUS)) { conoutf(@"sound init failed (FMOD): %d", FSOUND_GetError()); nosound = true; |
︙ | |||
157 158 159 160 161 162 163 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - - - - + + + | vol -= (int)(dist * 3 * soundvol / 255); // simple mono distance attenuation if (stereo && (v.x != 0 || v.y != 0)) { float yaw = -atan2(v.x, v.y) - player1->yaw * (PI / 180.0f); // relative angle of // sound along X-Y axis |
︙ | |||
221 222 223 224 225 226 227 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - - + + | return; if (lastmillis == lastsoundmillis) soundsatonce++; else soundsatonce = 1; lastsoundmillis = lastmillis; if (soundsatonce > 5) |
︙ |
Modified src/tools.h from [2f2caef516] to [fe738f21a1].
︙ | |||
316 317 318 319 320 321 322 | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - + | if (false) { \ } else \ for (int i = (v).length() - 1; i >= 0; i--) template <class T> struct hashtable { struct chain { chain *next; |
︙ | |||
340 341 342 343 344 345 346 | 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 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - + + - + - - + + - + - + | table[i] = NULL; }; hashtable(hashtable<T> &v); void operator=(hashtable<T> &v); T * |
︙ |
Modified src/weapon.mm from [61c62f225e] to [d7fe676e8d].
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + + + - - + + + | int reloadtime(int gun) { return guns[gun].attackdelay; }; void |
︙ |
Modified src/world.mm from [a8778ab451] to [da94b33242].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + + - + | // world.cpp: core map management stuff #include "cube.h" #include <memory> |
︙ | |||
54 55 56 57 58 59 60 61 62 63 | 56 57 58 59 60 61 62 63 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 102 | + + + + + - - - + + + + + + + + - + | }; // set for playing void trigger(int tag, int type, bool savegame) { if (!tag) return; settag(tag, type); if (!savegame && type != 3) playsound(S_RUMBLE); @autoreleasepool { OFString *aliasname = |
︙ | |||
292 293 294 295 296 297 298 | 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 332 333 334 335 336 337 338 | + - + + - - + + - + + - - - + + + + - + | { int e = closestent(); if (e < 0) { conoutf(@"no more entities"); return; }; int t = ents[e].type; @autoreleasepool { |
︙ | |||
342 343 344 345 346 347 348 | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | - + - + | ents.add(*((entity *)&e)); // unsafe! if (type == LIGHT) calclight(); return &ents.last(); }; void |
︙ |
Modified src/worldio.mm from [6ed752d022] to [4981361189].
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 | - + | // worldio.cpp: loading & saving of maps and savegames #include "cube.h" void backup(char *name, char *backupname) { remove(backupname); rename(name, backupname); |
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 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 183 184 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 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 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 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 332 333 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 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | - + - - + + - + - + - - - - + + + + - + - - - + + + + - + - + - + - - - + + + - + - - + + - + - + - - + + - + + - + - + - - + + - + - + - + - + - + - + - - + + - + + + - - - - + + + + - - - - - - + + + + + + + + - | // mipmapper to generate more efficient mips. the reason it is done on save is // to reduce the amount spend in the mipmapper (as that is done in realtime). inline bool nhf(sqr *s) { return s->type != FHF && s->type != CHF; |
Modified src/worldlight.mm from [73836e692f] to [ae7e6c7975].
︙ | |||
167 168 169 170 171 172 173 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | - + - + - + - + - - + + | void calclight() { loop(x, ssize) loop(y, ssize) { sqr *s = S(x, y); s->r = s->g = s->b = 10; |
︙ | |||
226 227 228 229 230 231 232 | 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 | - + - + - + | dlights.add(blockcopy(b)); // backup area before rendering in dynlight persistent_entity l = {(short)v.x, (short)v.y, (short)v.z, (short)reach, LIGHT, (uchar)strength, 0, 0}; calclightsource(l); postlightarea(b); |
Modified src/worldocull.mm from [70fd16d6e2] to [8bad2cc9f5].
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + - + | void computeraytable(float vx, float vy) { if (!ocull) return; |
︙ |