Comment: | Make use of OF_DIRECT |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7a98b92af94db34093428fc95da00435 |
User & Date: | js on 2025-03-25 23:52:50 |
Other Links: | manifest | tags |
2025-03-26
| ||
21:44 | Remove OF_DIRECT_MEMBERS from category check-in: 5bca00e8e2 user: js tags: trunk | |
2025-03-25
| ||
23:52 | Make use of OF_DIRECT check-in: 7a98b92af9 user: js tags: trunk | |
23:38 | Clean up Variable check-in: 0ee94739ce user: js tags: trunk | |
Modified src/Alias.h from [12efdce9a2] to [9b91901d8c].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - + - + - + + | #import "Identifier.h" OF_ASSUME_NONNULL_BEGIN @interface Alias: Identifier |
Modified src/Client.h from [3002aefde8] to [f5058af394].
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | + | #import <ObjFW/ObjFW.h> #import "cube.h" // server side version of "dynent" type OF_DIRECT_MEMBERS @interface Client: OFObject @property (nonatomic) int type; @property (nonatomic) ENetPeer *peer; @property (copy, nonatomic) OFString *hostname; @property (copy, nonatomic) OFString *mapvote; @property (copy, nonatomic) OFString *name; @property (nonatomic) int modevote; |
︙ |
Modified src/Command.h from [06ddb224b0] to [710ad3a2bf].
︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | + - + | Identifier.identifiers[@ #name] = \ [Command commandWithName:@ #name \ argumentsTypes:nargs \ block:block_]; \ }); \ } OF_DIRECT_MEMBERS @interface Command: Identifier @property (readonly, nonatomic) int argumentsTypes; + (instancetype)commandWithName:(OFString *)name argumentsTypes:(int)argumentsTypes block:(id)block; - (instancetype)initWithName:(OFString *)name OF_UNAVAILABLE; - (instancetype)initWithName:(OFString *)name argumentsTypes:(int)argumentsTypes |
Modified src/ConsoleLine.h from [a5636ed577] to [3048f3e388].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + | #import <ObjFW/ObjFW.h> OF_DIRECT_MEMBERS @interface ConsoleLine: OFObject @property (readonly, copy) OFString *text; @property (readonly) int outtime; + (instancetype)lineWithText:(OFString *)text outtime:(int)outtime; - (instancetype)initWithText:(OFString *)text outtime:(int)outtime; @end |
Modified src/DynamicEntity.h from [b25cdd250b] to [0ee26a40fb].
1 2 3 4 | 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 | - + - + - + - + - - - - + + + + - + - + - - + + - - - - - - + + + + + + - - + + - | #import <ObjFW/ObjFW.h> // players & monsters @interface DynamicEntity: OFObject <OFCopying> |
Modified src/Entity.h from [0c6f848420] to [4b0e6a03e9].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 | + | #import <ObjFW/ObjFW.h> // map entity OF_DIRECT_MEMBERS @interface Entity: OFObject @property (nonatomic) short x, y, z; // cube aligned position @property (nonatomic) short attr1; @property (nonatomic) unsigned char type; // type is one of the above @property (nonatomic) unsigned char attr2, attr3, attr4; @property (nonatomic) bool spawned; |
︙ |
Modified src/Identifier.h from [77172769a0] to [79fe1b6b9a].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - - + + | #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @interface Identifier: OFObject |
Modified src/KeyMapping.h from [4403af7dfe] to [3b8ccce865].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface KeyMapping: OFObject @property (readonly) int code; @property (readonly, nonatomic) OFString *name; @property (copy, nonatomic) OFString *action; + (instancetype)mappingWithCode:(int)code name:(OFString *)name; - (instancetype)init OF_UNAVAILABLE; |
︙ |
Modified src/MD2.h from [56302384a5] to [738081230a].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + | #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class MapModelInfo; OF_DIRECT_MEMBERS @interface MD2: OFObject @property (nonatomic) MapModelInfo *mmi; @property (copy, nonatomic) OFString *loadname; @property (nonatomic) int mdlnum; @property (nonatomic) bool loaded; + (instancetype)md2; |
︙ |
Modified src/MapModelInfo.h from [2be3bcf086] to [3aab1dec04].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN OF_DIRECT_MEMBERS @interface MapModelInfo: OFObject @property (nonatomic) int rad, h, zoff, snap; @property (copy, nonatomic) OFString *name; + (instancetype)infoWithRad:(int)rad h:(int)h zoff:(int)zoff |
︙ |
Modified src/Menu.h from [d8e35c6745] to [213d149aa4].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | + | #import <ObjFW/ObjFW.h> OF_ASSUME_NONNULL_BEGIN @class MenuItem; OF_DIRECT_MEMBERS @interface Menu: OFObject @property (readonly, nonatomic) OFString *name; @property (readonly) OFMutableArray<MenuItem *> *items; @property (nonatomic) int mwidth; @property (nonatomic) int menusel; + (instancetype)menuWithName:(OFString *)name; |
︙ |
Modified src/MenuItem.h from [237d14ade3] to [969de9221d].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + | #import <ObjFW/ObjFW.h> OF_DIRECT_MEMBERS @interface MenuItem: OFObject @property (readonly, nonatomic) OFString *text, *action; + (instancetype)itemWithText:(OFString *)text action:(OFString *)action; - (instancetype)init OF_UNAVAILABLE; - (instancetype)initWithText:(OFString *)text action:(OFString *)action; @end |
Modified src/Monster.h from [489882baef] to [f02a70099a].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + | #import "DynamicEntity.h" OF_DIRECT_MEMBERS @interface Monster: DynamicEntity @property (class, readonly, nonatomic) OFMutableArray<Monster *> *monsters; // one of M_* @property (nonatomic) int monsterState; // see Monster.m @property (nonatomic) int monsterType; // monster wants to kill this entity |
︙ |
Modified src/OFString+Cube.h from [68d220125c] to [b072f71c1a].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | #import <ObjFW/ObjFW.h> OF_DIRECT_MEMBERS @interface OFString (Cube) @property (readonly, nonatomic) int cube_intValue; - (int)cube_intValueWithBase:(unsigned char)base; @end |
Modified src/Player.h from [96ac6db959] to [7ec70bc2d0].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + | #import "DynamicEntity.h" OF_DIRECT_MEMBERS @interface Player: DynamicEntity // special client ent that receives input and acts as camera @property (class, nonatomic) Player *player1; // sequence id for each respawn, used in damage test @property (nonatomic) int lifeSequence; @property (nonatomic) int frags; @property (copy, nonatomic) OFString *team; |
︙ |
Modified src/Projectile.h from [03669c69fe] to [30cec585f6].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | #import <ObjFW/ObjFW.h> @class DynamicEntity; OF_DIRECT_MEMBERS @interface Projectile: OFObject @property (nonatomic) OFVector3D o, to; @property (nonatomic) float speed; @property (nonatomic) DynamicEntity *owner; @property (nonatomic) int gun; @property (nonatomic) bool inuse, local; |
︙ |
Modified src/ResolverResult.h from [7ec5a5a420] to [48e906dbd2].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | #import <ObjFW/ObjFW.h> #import "cube.h" OF_DIRECT_MEMBERS @interface ResolverResult: OFObject @property (readonly, nonatomic) OFString *query; @property (readonly, nonatomic) ENetAddress address; + (instancetype)resultWithQuery:(OFString *)query address:(ENetAddress)address; - (instancetype)init OF_UNAVAILABLE; - (instancetype)initWithQuery:(OFString *)query address:(ENetAddress)address; |
︙ |
Modified src/ResolverThread.h from [648d3b8e86] to [dc5d5406f4].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + | #import <ObjFW/ObjFW.h> OF_DIRECT_MEMBERS @interface ResolverThread: OFThread { volatile bool _stop; } @property (copy, nonatomic) OFString *query; @property (nonatomic) int starttime; |
︙ |
Modified src/ServerEntity.h from [05bfd0886b] to [4bace14bef].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + | #import <ObjFW/ObjFW.h> // server side version of "entity" type OF_DIRECT_MEMBERS @interface ServerEntity: OFObject @property (nonatomic) bool spawned; @property (nonatomic) int spawnsecs; + (instancetype)entity; @end |
Modified src/ServerInfo.h from [3ffaecefa4] to [8949d4cc02].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 | + | #import <ObjFW/ObjFW.h> #include <enet/enet.h> OF_DIRECT_MEMBERS @interface ServerInfo: OFObject <OFComparing> @property (readonly, nonatomic) OFString *name; @property (copy, nonatomic) OFString *full; @property (copy, nonatomic) OFString *map; @property (copy, nonatomic) OFString *sdesc; @property (nonatomic) int mode, numplayers, ping, protocol, minremain; @property (nonatomic) ENetAddress address; |
︙ |
Modified src/ServerInfo.m from [d173cecbd6] to [77aa772923].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - + - + - + | _sdesc = @""; _address.host = ENET_HOST_ANY; _address.port = CUBE_SERVINFO_PORT; return self; } |
Modified src/Variable.h from [2cd074eb9f] to [b06c507597].
︙ | |||
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 | - - - + + + - + - - - + + + + | Identifier.identifiers[@ #name] = variable; \ }); \ } \ \ static void var_##name() { body; } @interface Variable: Identifier |
Modified src/clientextras.m from [44fbd161d9] to [8674a8f070].
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | + - - - - - - - + + + + + + + | } extern int democlientnum; void renderclients() { [players |
︙ |
Modified src/clientgame.m from [44aa449a31] to [591f2f2799].
︙ | |||
413 414 415 416 417 418 419 | 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - - - + + + | } sleepwait = 0; [Monster resetAll]; projreset(); spawncycle = -1; spawnplayer(Player.player1); Player.player1.frags = 0; |
︙ |
Modified src/clients2c.m from [ffe8228e75] to [476557dd41].
︙ | |||
275 276 277 278 279 280 281 | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 | - + + | OFVector3D loc = d_.origin; playsound(S_DIE1 + rnd(2), &loc); d_.lifeSequence++; break; } case SV_FRAGS: |
︙ | |||
367 368 369 370 371 372 373 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + + | addmsg(0, 2, SV_CLIENTPING, Player.player1.ping = (Player.player1.ping * 5 + lastmillis - getint(&p)) / 6); break; case SV_CLIENTPING: |
︙ |
Modified src/cube.h from [bcce88bfd4] to [8e48390c7e].
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | + | #define _MAXDEFSTR 260 @class DynamicEntity; @class Entity; @class Player; OF_DIRECT_MEMBERS @interface Cube: OFObject <OFApplicationDelegate> @property (class, readonly, nonatomic) Cube *sharedInstance; @property (readonly, nonatomic) SDL_Window *window; @property (readonly, nonatomic) OFIRI *gameDataIRI, *userDataIRI; @property (nonatomic) bool repeatsKeys; @property (nonatomic) int framesInMap; @end |
︙ |
Modified src/meson.build from [427dbc46b4] to [fcfe74564e].
︙ | |||
66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + | link_args: client_link_args, link_with: [enet], win_subsystem: 'windows') executable('server', [ 'Client.m', 'Entity.m', 'ServerEntity.m', 'server.m', 'serverms.m', 'serverutil.m', 'tools.m', ], objc_args: ['-DSTANDALONE'], |
︙ |