remove deprecated procs (#12535)
This commit is contained in:
parent
ffa9a7405f
commit
3ba3307d61
39 changed files with 111 additions and 567 deletions
|
|
@ -197,7 +197,7 @@ proc lobbyInit*() =
|
|||
messageArea.scrollBack -= 1
|
||||
update(messageArea))
|
||||
gui.newButton(text = "Flood msg area", position = vec2f(185, 30), onClick = proc(b: PButton) =
|
||||
for i in 0.. <30:
|
||||
for i in 0..< 30:
|
||||
dispMessage($i))"""
|
||||
dirServer = newServer()
|
||||
dirServer.addHandler HChat, handleChat
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ proc lobbyInit*() =
|
|||
messageArea.scrollBack -= 1
|
||||
update(messageArea))
|
||||
gui.newButton(text = "Flood msg area", position = vec2f(185, 30), onClick = proc(b: PButton) =
|
||||
for i in 0.. <30:
|
||||
for i in 0..< 30:
|
||||
dispMessage($i))
|
||||
|
||||
var i = 0
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ proc newPrimitive*(verts: var seq[TVert],
|
|||
color=white(),
|
||||
z: TZ_range=0): PPrimitive =
|
||||
var indices = newSeq[GLushort](verts.len)
|
||||
for i in 0 .. <verts.len:
|
||||
for i in 0 ..< verts.len:
|
||||
indices[i] = i.GLushort
|
||||
|
||||
new(result)
|
||||
|
|
@ -108,7 +108,7 @@ proc updVerts*(o: PPrimitive, start, `end`: int, f: proc(i: int, vert: var TVert
|
|||
cast[GLvoid](cast[int](o.verts[0].addr) + byteOffset))
|
||||
|
||||
proc updAllVerts(o: PPrimitive, f: proc(i: int, vert: var TVert)) =
|
||||
for i in 0 .. <o.verts.len:
|
||||
for i in 0 ..< o.verts.len:
|
||||
f(i, o.verts[i])
|
||||
|
||||
?glBindBuffer(GLarrayBuffer, o.arrBufId)
|
||||
|
|
@ -132,7 +132,7 @@ proc newVertCircle*(circle: TCircle, nSegs: Natural=0): seq[TVert] =
|
|||
|
||||
result = newSeq[TVert](nSegs)
|
||||
#result[0] = newVert(circle.p, newV2xy(0.5))
|
||||
for i in 1 .. <nSegs:
|
||||
for i in 1 ..< nSegs:
|
||||
let pos = newV2(x + circle.p.x, y + circle.p.y)
|
||||
let texCoord = pos * newV2xy(1.0 / circle.r)
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ type
|
|||
# TODO: Change to TVT when compiler issue is resolved.
|
||||
proc `$`*[T](o: TV2[T]): string =
|
||||
result = "("
|
||||
for i in 0 .. <o.len:
|
||||
for i in 0 ..< o.len:
|
||||
result &= $o[0]
|
||||
if i != o.len - 1:
|
||||
result &= ", "
|
||||
|
|
@ -47,7 +47,7 @@ proc `+`*(lhs: TV2[TR], rhs: TV2[TR]): TV2[TR] =
|
|||
# result += a[i] * b[i]
|
||||
|
||||
proc dot[T](a, b: TV2[T]): T =
|
||||
for i in 0 .. <a.len:
|
||||
for i in 0 ..< a.len:
|
||||
result += a[i] * b[i]
|
||||
|
||||
assert dot(newV2(), newV2()) == 0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue