Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Functions returning 0.xxxx floats instead of int

2 replies · 1,063 views · Started 18 December 2006

Ok I was told that this is a bug, and so here we go.

Certain functions, and probably most of them I would guess, are returning floats instead of integers. Observe:

int dummyVariable;
dummyVariable = Game->GetCurScreen();

So what ends up in dummyVariable? Let's say you're on screen 50. Well that's actually 50h (hexadecimal) so we convert it to decimal and we get 80. What should Game->GetCurScreen() be returning then? 80 right? Well it doesn't. Instead you'll get 0.0080 as the value of dummyVariable.

Same with Game->GetCurMap(); or Game->GetCurDMap();
They'll return another float. Instead though the count is offset by 1. In other words if you think you're on Map 1, like in the editor. Forget it, it's actually called 0.0000. So Map 2 is 0.0001 and so on.

Other functions are affected by this bug including (but probably not limited to):
Link->Warp(); Link->PitWarp();

That's all I've got so far. Code works by using the floats, but it's bizarre and should be fixed.