Skip to content

Commit 25cb1a1

Browse files
author
Dennis Felsing
committed
Fix compilation with Nim devel
1 parent c8c7b55 commit 25cb1a1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/nes.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import nes.types, nes.cpu, nes.apu, nes.ppu, nes.cartridge, nes.controller,
2-
nes.mapper, nes.mem
1+
import nes/types, nes/cpu, nes/apu, nes/ppu, nes/cartridge, nes/controller,
2+
nes/mapper, nes/mem
33

44
export types.NES, types.NESObj, types.Buttons, setButtons, resolution
55

src/nes/ppu.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ proc spritePixel(ppu: var PPU): (uint8, uint8) =
121121
if not ppu.flagShowSprites:
122122
return
123123

124-
for i in 0 .. <ppu.spriteCount:
124+
for i in 0 ..< ppu.spriteCount:
125125
var offset = ppu.cycle - 1 - ppu.spritePositions[i].int
126126
if offset notin 0..7:
127127
continue
@@ -215,7 +215,7 @@ proc evaluateSprites(ppu: var PPU) =
215215
let x = ppu.oamData[i*4+3]
216216
let row = ppu.scanLine - y.int
217217

218-
if row notin 0 .. <h:
218+
if row notin 0 ..< h:
219219
continue
220220

221221
if count < 8:

src/nimes.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import
22
rewinder, nes,
33
os, times, algorithm,
4-
sdl2, sdl2.audio, sdl2.joystick
4+
sdl2, sdl2/audio, sdl2/joystick
55

66
when defined(emscripten):
77
proc emscripten_set_main_loop(fun: proc() {.cdecl.}, fps,
@@ -78,7 +78,7 @@ else:
7878
title = "NimES"
7979

8080
if not sdl2.init(inits):
81-
raise newException(SystemError, "SDL2 initialization failed")
81+
raise newException(CatchableError, "SDL2 initialization failed")
8282

8383
discard setHint("SDL_RENDER_SCALE_QUALITY", "0")
8484

0 commit comments

Comments
 (0)