Sega Genesis

2021-07-01 Thread jaybill
I've written some very basic Sega Genesis games in C before, using the [marsdev toolchain](https://github.com/andwn/marsdev) . Does anyone have any idea what the feasibility of getting Nim to generate C code that would compile with this might be? If I were interested in writing/contributing such

Random float based on unsigned int

2020-12-04 Thread jaybill
Excellent! That works perfectly! For some reason doing `float32(high(uint32))` did not get me there.

Random float based on unsigned int

2020-12-04 Thread jaybill
Hello! I'm working on some procedural generation code, and I need to convert some of my C logic into Nim. I have a function that returns a hash as a uint32. I want to use this to generate a float between 0.0 and 254.9 Here's a minimal example of how I'd do this in C: #include

Use sequence of a type in C program

2020-12-01 Thread jaybill
My C program is already quite large and involved, I just want to add a library to it using Nim, so that's not really possible.

Use sequence of a type in C program

2020-11-30 Thread jaybill
Hi there! I'm a longtime C developer and I'm brand new to Nim. I'm attempting to get a sequence of objects from Nim from inside my C program. I have two problems: First, the code below doesn't work. While I can get a single object just fine and that works as expected, I'm unable to get a sequenc