My earlier try was as simple as a `proc echo (s: string) = printf((s & 
"\n\n").cstring)` in the same file :P (yeah, no varargs…) I am aware of the 
term-rewriting macro method however, but this turned out not to be necessary 
yet in my case.

Though I have since made my version also [take a VRAM pointer 
argument](https://github.com/ZoomTen/pocket-clicker/blob/a50922c8b9c6b3d74bf0415437ae759f21e18e14/src/utils/io.nim#L3),
 so I can place text anywhere I want.

I may have mentioned it before, but bitsets are an amazing feature to use, the 
resulting code is more intuitive and readable with things like:
    
    
    if (buttonB in joyState):
      enableLcdcFeatures({bgEnable, objEnable})
    
    while busy in rStat[]: discard # wait until VRAM is safe to access
    
    
    Run

And I also remarked in the code about [compile-time table 
generation](https://github.com/ZoomTen/pocket-clicker/blob/a50922c8b9c6b3d74bf0415437ae759f21e18e14/src/scenes/game.nim#L31),
 which is more convenient than defining weird macros in ASM, and also works 
very well with graphing calculators for prototyping the needed formulas :)

Reply via email to