Skip to content

Commit

Permalink
Use phase pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
Nycto committed Feb 4, 2024
1 parent a732240 commit ea22d4f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/NecsusDemo.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const maxSpeed = 10
proc middle(screen: Shared[ScreenSize]): auto =
vec2(screen.getOrRaise.width / 2, screen.getOrRaise.height / 2)

proc createCentralMass(screenSize: Shared[ScreenSize], spawn: Spawn[(Mass, Position)]) =
proc createCentralMass(screenSize: Shared[ScreenSize], spawn: Spawn[(Mass, Position)]) {.startupSys.} =
## Create a central body right in the middle of the screen
spawn.with(Mass(mass: centralMass), Position(position: screenSize.middle))

Expand Down Expand Up @@ -107,9 +107,7 @@ proc renderer*(renderer: Shared[RendererPtr], bodies: Query[(Position, Visuals)]
renderer.getOrRaise.present()

proc demoApp(screenSize: ScreenSize, renderer: RendererPtr) {.necsus(
[~createCentralMass ],
[~exitGame, ~createBodies, ~simulate, ~move, ~cleanup, ~visuals, ~renderer, ~enforceFrameRate],
[],
[ ~createCentralMass, ~exitGame, ~createBodies, ~simulate, ~move, ~cleanup, ~visuals, ~renderer, ~enforceFrameRate ],
newNecsusConf(entitySize = 10_000, componentSize = 10_000)
).}

Expand Down

0 comments on commit ea22d4f

Please sign in to comment.