Index: src/Command.mm ================================================================== --- src/Command.mm +++ src/Command.mm @@ -36,38 +36,38 @@ switch (_argumentsTypes) { case ARG_1INT: if (isDown) { arguments = padArguments(arguments, 2); ((void(__cdecl *)(int))_function)( - (int)[arguments[1] longLongValueWithBase:0]); + [arguments[1] intValueWithBase:0]); } break; case ARG_2INT: if (isDown) { arguments = padArguments(arguments, 3); ((void(__cdecl *)(int, int))_function)( - (int)[arguments[1] longLongValueWithBase:0], - (int)[arguments[2] longLongValueWithBase:0]); + [arguments[1] intValueWithBase:0], + [arguments[2] intValueWithBase:0]); } break; case ARG_3INT: if (isDown) { arguments = padArguments(arguments, 4); ((void(__cdecl *)(int, int, int))_function)( - (int)[arguments[1] longLongValueWithBase:0], - (int)[arguments[2] longLongValueWithBase:0], - (int)[arguments[3] longLongValueWithBase:0]); + [arguments[1] intValueWithBase:0], + [arguments[2] intValueWithBase:0], + [arguments[3] intValueWithBase:0]); } break; case ARG_4INT: if (isDown) { arguments = padArguments(arguments, 5); ((void(__cdecl *)(int, int, int, int))_function)( - (int)[arguments[1] longLongValueWithBase:0], - (int)[arguments[2] longLongValueWithBase:0], - (int)[arguments[3] longLongValueWithBase:0], - (int)[arguments[4] longLongValueWithBase:0]); + [arguments[1] intValueWithBase:0], + [arguments[2] intValueWithBase:0], + [arguments[3] intValueWithBase:0], + [arguments[4] intValueWithBase:0]); } break; case ARG_NONE: if (isDown) ((void(__cdecl *)())_function)(); Index: src/Cube.mm ================================================================== --- src/Cube.mm +++ src/Cube.mm @@ -47,20 +47,20 @@ [OFOptionsParser parserWithOptions:options]; OFUnichar option; while ((option = [optionsParser nextOption]) != '\0') { switch (option) { case 'w': - _width = (int)optionsParser.argument.longLongValue; + _width = optionsParser.argument.intValue; break; case 'h': - _height = (int)optionsParser.argument.longLongValue; + _height = optionsParser.argument.intValue; break; case 'u': - uprate = (int)optionsParser.argument.longLongValue; + uprate = optionsParser.argument.intValue; break; case 'c': - maxcl = (int)optionsParser.argument.longLongValue; + maxcl = optionsParser.argument.intValue; break; case ':': case '=': case '?': conoutf(@"unknown commandline option"); Index: src/MenuItem.m ================================================================== --- src/MenuItem.m +++ src/MenuItem.m @@ -18,16 +18,17 @@ if (![otherObject isKindOfClass:MenuItem.class]) @throw [OFInvalidArgumentException exception]; int x, y; @try { - x = (int)_text.longLongValue; + x = _text.intValue; } @catch (OFInvalidFormatException *e) { x = 0; } + @try { - y = (int)otherItem.text.longLongValue; + y = otherItem.text.intValue; } @catch (OFInvalidFormatException *e) { y = 0; } if (x > y) Index: src/clientgame.mm ================================================================== --- src/clientgame.mm +++ src/clientgame.mm @@ -236,11 +236,11 @@ int sleepwait = 0; static OFString *sleepcmd = nil; void sleepf(OFString *msec, OFString *cmd) { - sleepwait = (int)msec.longLongValue + lastmillis; + sleepwait = msec.intValue + lastmillis; sleepcmd = cmd; } COMMANDN(sleep, sleepf, ARG_2STR) void Index: src/commands.mm ================================================================== --- src/commands.mm +++ src/commands.mm @@ -231,11 +231,11 @@ continue; __kindof Identifier *identifier = identifiers[c]; if (identifier == nil) { @try { - val = (int)[c longLongValueWithBase:0]; + val = [c intValueWithBase:0]; } @catch (OFInvalidFormatException *e) { conoutf(@"unknown command: %@", c); } } else { if ([identifier isKindOfClass:Command.class]) { @@ -256,12 +256,12 @@ if (w[1].length == 0) [identifier printValue]; else [identifier setValue: - (int)[w[1] - longLongValueWithBase: + [w[1] + intValueWithBase: 0]]; } } else if ([identifier isKindOfClass:Alias.class]) { // alias, also used as functions and @@ -437,11 +437,11 @@ void loopa(OFString *times, OFString *body) { @autoreleasepool { - int t = (int)times.longLongValue; + int t = times.intValue; loopi(t) { intset(@"i", i); execute(body); @@ -495,11 +495,11 @@ void at(OFString *s_, OFString *pos) { @autoreleasepool { - int n = (int)pos.longLongValue; + int n = pos.intValue; std::unique_ptr copy(strdup(s_.UTF8String)); char *s = copy.get(); loopi(n) s += strspn(s += strcspn(s, " \0"), " "); s[strcspn(s, " \0")] = 0; Index: src/console.mm ================================================================== --- src/console.mm +++ src/console.mm @@ -104,12 +104,12 @@ keymap(OFString *code, OFString *key, OFString *action) { if (keyMappings == nil) keyMappings = [[OFMutableArray alloc] init]; - KeyMapping *mapping = - [[KeyMapping alloc] initWithCode:(int)code.longLongValue name:key]; + KeyMapping *mapping = [[KeyMapping alloc] initWithCode:code.intValue + name:key]; mapping.action = action; [keyMappings addObject:mapping]; } COMMAND(keymap, ARG_3STR) Index: src/editing.mm ================================================================== --- src/editing.mm +++ src/editing.mm @@ -603,14 +603,12 @@ newent(OFString *what, OFString *a1, OFString *a2, OFString *a3, OFString *a4) { EDITSEL; @autoreleasepool { newentity(sel.x, sel.y, (int)player1.o.z, what, - (int)[a1 longLongValueWithBase:0], - (int)[a2 longLongValueWithBase:0], - (int)[a3 longLongValueWithBase:0], - (int)[a4 longLongValueWithBase:0]); + [a1 intValueWithBase:0], [a2 intValueWithBase:0], + [a3 intValueWithBase:0], [a4 intValueWithBase:0]); } } COMMANDN(select, selectpos, ARG_4INT) COMMAND(edittag, ARG_1INT) Index: src/rendergl.mm ================================================================== --- src/rendergl.mm +++ src/rendergl.mm @@ -195,11 +195,11 @@ void texture(OFString *aframe, OFString *name) { @autoreleasepool { - int num = curtexnum++, frame = (int)aframe.longLongValue; + int num = curtexnum++, frame = aframe.intValue; if (num < 0 || num >= 256 || frame < 0 || frame >= MAXFRAMES) return; mapping[num][frame] = 1; mapname[num][frame] = name; } Index: src/rendermd2.mm ================================================================== --- src/rendermd2.mm +++ src/rendermd2.mm @@ -66,14 +66,14 @@ void mapmodel( OFString *rad, OFString *h, OFString *zoff, OFString *snap, OFString *name) { MD2 *m = loadmodel(name); - m.mmi = [[MapModelInfo alloc] initWithRad:(int)rad.longLongValue - h:(int)h.longLongValue - zoff:(int)zoff.longLongValue - snap:(int)snap.longLongValue + m.mmi = [[MapModelInfo alloc] initWithRad:rad.intValue + h:h.intValue + zoff:zoff.intValue + snap:snap.intValue name:m.loadname]; if (mapmodels == nil) mapmodels = [[OFMutableArray alloc] init]; Index: src/weapon.mm ================================================================== --- src/weapon.mm +++ src/weapon.mm @@ -61,13 +61,13 @@ } void weapon(OFString *a1, OFString *a2, OFString *a3) { - selectgun((a1.length > 0 ? (int)a1.longLongValue : -1), - (a2.length > 0 ? (int)a2.longLongValue : -1), - (a3.length > 0 ? (int)a3.longLongValue : -1)); + selectgun((a1.length > 0 ? a1.intValue : -1), + (a2.length > 0 ? a2.intValue : -1), + (a3.length > 0 ? a3.intValue : -1)); } COMMAND(weapon, ARG_3STR) void createrays(OFVector3D &from,