Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2017-12-10 15:02:20

Robbi_Blechdose
Member
Registered: 2017-12-10
Posts: 16

Point numbers in GBDK - Float/Double/Other - How to?

Hello everyone,
I've recently begun developing with GBDK (2.95-3) and it's quite fun so far.
But for my current project, I need point numbers - one way or another. It doesn't matter whether it's floats, doubles or some homebrew solution.
My point is that writing this myself would only be a last option, I'd much rather use something existing that's known to work (at least sorta).
So if anyone could tell me how to get floats or doubles working in GBDK or point me to a library that does point numbers, that'd be greatly appreciated.

Many thanks in advance,

Robbi Blechdose

Offline

 

#2 2017-12-11 07:11:49

tobiasvl
Member
From: Norway
Registered: 2017-10-19
Posts: 26

Re: Point numbers in GBDK - Float/Double/Other - How to?


Discord: tobiasvl#6844 | GitHub: tobiasvl

Offline

 

#3 2017-12-11 10:11:06

Robbi_Blechdose
Member
Registered: 2017-12-10
Posts: 16

Re: Point numbers in GBDK - Float/Double/Other - How to?

How would I add that into my game?
Can I just include the file, and if so, where is it located?

Offline

 

#4 2017-12-11 15:45:58

tobiasvl
Member
From: Norway
Registered: 2017-10-19
Posts: 26

Re: Point numbers in GBDK - Float/Double/Other - How to?

Yes, it should come with GBDK in the "lib" subdirectory, or in the "gbdk-libs" downloadable on Sourceforge.


Discord: tobiasvl#6844 | GitHub: tobiasvl

Offline

 

#5 2017-12-12 10:06:34

Robbi_Blechdose
Member
Registered: 2017-12-10
Posts: 16

Re: Point numbers in GBDK - Float/Double/Other - How to?

It'd be nice if you could tell me the specific include line (I didn't manage to do that somehow.)
Also, it is my understanding that even though a framework for it exists, floats are actually not supported in GBDK. Is that true or do I have to declare them differently when using this file?

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson