Run newer version of clang-format
FossilOrigin-Name: cc7ebd7f79185bc5f0a595af12d4de9ca8ad89c57858d96aaa7c0b8f9802d59f
This commit is contained in:
parent
20d8cfc364
commit
c7ee55e1e3
12 changed files with 31 additions and 40 deletions
|
@ -84,12 +84,10 @@ VARP(minmillis, 0, 5, 1000);
|
||||||
_userDataIRI =
|
_userDataIRI =
|
||||||
[OFFileManager.defaultManager currentDirectoryIRI];
|
[OFFileManager.defaultManager currentDirectoryIRI];
|
||||||
|
|
||||||
[OFFileManager.defaultManager
|
[OFFileManager.defaultManager createDirectoryAtIRI:
|
||||||
createDirectoryAtIRI:
|
|
||||||
[_userDataIRI IRIByAppendingPathComponent:@"demos"]
|
[_userDataIRI IRIByAppendingPathComponent:@"demos"]
|
||||||
createParents:true];
|
createParents:true];
|
||||||
[OFFileManager.defaultManager
|
[OFFileManager.defaultManager createDirectoryAtIRI:
|
||||||
createDirectoryAtIRI:
|
|
||||||
[_userDataIRI IRIByAppendingPathComponent:@"savegames"]
|
[_userDataIRI IRIByAppendingPathComponent:@"savegames"]
|
||||||
createParents:true];
|
createParents:true];
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#import <ObjFW/ObjFW.h>
|
#import <ObjFW/ObjFW.h>
|
||||||
|
|
||||||
@interface
|
@interface OFString (Cube)
|
||||||
OFString (Cube)
|
|
||||||
@property (readonly, nonatomic) int cube_intValue;
|
@property (readonly, nonatomic) int cube_intValue;
|
||||||
|
|
||||||
- (int)cube_intValueWithBase:(unsigned char)base;
|
- (int)cube_intValueWithBase:(unsigned char)base;
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
#include "cube.h"
|
#include "cube.h"
|
||||||
|
|
||||||
@implementation
|
@implementation OFString (Cube)
|
||||||
OFString (Cube)
|
|
||||||
- (int)cube_intValue
|
- (int)cube_intValue
|
||||||
{
|
{
|
||||||
@try {
|
@try {
|
||||||
|
|
|
@ -114,9 +114,8 @@ renderscore(Player *d)
|
||||||
{
|
{
|
||||||
OFString *lag = [OFString stringWithFormat:@"%d", d.lag];
|
OFString *lag = [OFString stringWithFormat:@"%d", d.lag];
|
||||||
OFString *name = [OFString stringWithFormat:@"(%@)", d.name];
|
OFString *name = [OFString stringWithFormat:@"(%@)", d.name];
|
||||||
OFString *line =
|
OFString *line = [OFString stringWithFormat:@"%d\t%@\t%d\t%@\t%@",
|
||||||
[OFString stringWithFormat:@"%d\t%@\t%d\t%@\t%@", d.frags,
|
d.frags, (d.state == CS_LAGGED ? @"LAG" : lag), d.ping, d.team,
|
||||||
(d.state == CS_LAGGED ? @"LAG" : lag), d.ping, d.team,
|
|
||||||
(d.state == CS_DEAD ? name : d.name)];
|
(d.state == CS_DEAD ? name : d.name)];
|
||||||
|
|
||||||
if (scoreLines == nil)
|
if (scoreLines == nil)
|
||||||
|
|
|
@ -184,8 +184,7 @@ keypress(int code, bool isDown)
|
||||||
case SDLK_BACKSPACE:
|
case SDLK_BACKSPACE:
|
||||||
case SDLK_LEFT:
|
case SDLK_LEFT:
|
||||||
if (commandbuf.length > 0)
|
if (commandbuf.length > 0)
|
||||||
[commandbuf
|
[commandbuf deleteCharactersInRange:
|
||||||
deleteCharactersInRange:
|
|
||||||
OFMakeRange(
|
OFMakeRange(
|
||||||
commandbuf.length - 1, 1)];
|
commandbuf.length - 1, 1)];
|
||||||
|
|
||||||
|
|
|
@ -199,8 +199,8 @@ renderents()
|
||||||
closeent =
|
closeent =
|
||||||
[OFString stringWithFormat:@"closest entity = %@ (%d, %d, "
|
[OFString stringWithFormat:@"closest entity = %@ (%d, %d, "
|
||||||
@"%d, %d), selection = (%d, %d)",
|
@"%d, %d), selection = (%d, %d)",
|
||||||
entnames[c.type], c.attr1, c.attr2, c.attr3,
|
entnames[c.type], c.attr1, c.attr2, c.attr3, c.attr4,
|
||||||
c.attr4, getvar(@"selxs"), getvar(@"selys")];
|
getvar(@"selxs"), getvar(@"selys")];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -221,8 +221,7 @@ refreshservers()
|
||||||
ServerInfo *si, size_t i, bool *stop) {
|
ServerInfo *si, size_t i, bool *stop) {
|
||||||
if (si.address.host != ENET_HOST_ANY && si.ping != 9999) {
|
if (si.address.host != ENET_HOST_ANY && si.ping != 9999) {
|
||||||
if (si.protocol != PROTOCOL_VERSION)
|
if (si.protocol != PROTOCOL_VERSION)
|
||||||
si.full = [OFString
|
si.full = [OFString stringWithFormat:
|
||||||
stringWithFormat:
|
|
||||||
@"%@ [different cube protocol]",
|
@"%@ [different cube protocol]",
|
||||||
si.name];
|
si.name];
|
||||||
else
|
else
|
||||||
|
@ -232,8 +231,7 @@ refreshservers()
|
||||||
si.map.length > 0 ? si.map : @"[unknown]",
|
si.map.length > 0 ? si.map : @"[unknown]",
|
||||||
modestr(si.mode), si.name, si.sdesc];
|
modestr(si.mode), si.name, si.sdesc];
|
||||||
} else
|
} else
|
||||||
si.full = [OFString
|
si.full = [OFString stringWithFormat:
|
||||||
stringWithFormat:
|
|
||||||
(si.address.host != ENET_HOST_ANY
|
(si.address.host != ENET_HOST_ANY
|
||||||
? @"%@ [waiting for server response]"
|
? @"%@ [waiting for server response]"
|
||||||
: @"%@ [unknown host]\t"),
|
: @"%@ [unknown host]\t"),
|
||||||
|
|
|
@ -140,8 +140,7 @@ serverms(int mode, int numplayers, int minremain, OFString *smapname,
|
||||||
putint(&p, mode);
|
putint(&p, mode);
|
||||||
putint(&p, numplayers);
|
putint(&p, numplayers);
|
||||||
putint(&p, minremain);
|
putint(&p, minremain);
|
||||||
OFString *mname =
|
OFString *mname = [OFString stringWithFormat:@"%@%@",
|
||||||
[OFString stringWithFormat:@"%@%@",
|
|
||||||
(isfull ? @"[FULL] " : @""), smapname];
|
(isfull ? @"[FULL] " : @""), smapname];
|
||||||
sendstring(mname, &p);
|
sendstring(mname, &p);
|
||||||
sendstring(serverdesc, &p);
|
sendstring(serverdesc, &p);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue