further adaptations

This commit is contained in:
Araq 2014-08-29 09:12:12 +02:00
commit c6034277fc
52 changed files with 87 additions and 87 deletions

View file

@ -21,8 +21,8 @@
const Lib = "libchipmunk.so.6.1.1"
when defined(MoreNimrod):
{.hint: "MoreNimrod defined; some Chipmunk functions replaced in Nimrod".}
when defined(MoreNim):
{.hint: "MoreNim defined; some Chipmunk functions replaced in Nim".}
{.deadCodeElim: on.}
from math import sqrt, sin, cos, arctan2
when defined(CpUseFloat):
@ -729,7 +729,7 @@ proc isRogue*(body: PBody): Bool {.inline.} =
defGetter(PBody, CpFloat, m, Mass)
#/ Set the mass of a body.
when defined(MoreNimrod):
when defined(MoreNim):
defSetter(PBody, CpFloat, m, Mass)
else:
proc setMass*(body: PBody; m: CpFloat){.
@ -738,7 +738,7 @@ else:
#/ Get the moment of a body.
defGetter(PBody, CpFloat, i, Moment)
#/ Set the moment of a body.
when defined(MoreNimrod):
when defined(MoreNim):
defSetter(PBody, CpFloat, i, Moment)
else:
proc SetMoment*(body: PBody; i: CpFloat) {.
@ -747,7 +747,7 @@ else:
#/ Get the position of a body.
defGetter(PBody, TVector, p, Pos)
#/ Set the position of a body.
when defined(MoreNimrod):
when defined(MoreNim):
defSetter(PBody, TVector, p, Pos)
else:
proc setPos*(body: PBody; pos: TVector) {.
@ -1088,7 +1088,7 @@ proc getSegmentRadius*(shape: PShape): CpFloat {.
#var VersionString*{.importc: "cpVersionString", dynlib: Lib.}: cstring
#/ Calculate the moment of inertia for a circle.
#/ @c r1 and @c r2 are the inner and outer diameters. A solid circle has an inner diameter of 0.
when defined(MoreNimrod):
when defined(MoreNim):
proc momentForCircle*(m, r1, r2: CpFloat; offset: TVector): CpFloat {.cdecl.} =
result = m * (0.5 * (r1 * r1 + r2 * r2) + lenSq(offset))
else:

View file

@ -58,7 +58,7 @@ when isMainModule:
for i in 1..paramCount():
args.add paramStr(i)
args.add " "
quit(shell("nimrod", "c", "-r", "nakefile.nim", args))
quit(shell("nim", "c", "-r", "nakefile.nim", args))
else:
addQuitProc(proc() {.noconv.} =
var

View file

@ -2,7 +2,7 @@ import nake
nakeImports
task "install", "compile and install nake binary":
if shell("nimrod", "c", "nake") == 0:
if shell("nim", "c", "nake") == 0:
let path = getEnv("PATH").split(PathSep)
for index, dir in pairs(path):
echo " ", index, ". ", dir

View file

@ -5,9 +5,9 @@ const
ServerDefines = "-d:NoSFML --forceBuild"
task "server", "build the server":
if shell("nimrod", ServerDefines, "-r", "compile", "enet_server") != 0:
if shell("nim", ServerDefines, "-r", "compile", "enet_server") != 0:
quit "Failed to build"
task "gui", "build the server GUI mode":
if shell("nimrod", "--app:gui", ServerDefines, "-r", "compile", "enet_server") != 0:
if shell("nim", "--app:gui", ServerDefines, "-r", "compile", "enet_server") != 0:
quit "Failed to build"