Replies: 3 comments
-
I don't think you can do that with compiler bundled with Bartman's suite, sadly. I'd strongly recommend you to try fixed point maths, ACE comes bundled with fixmath library. It's not as accurate as floats, but it's way way faster, and usually good enough. Example usage: #include <fixmath/fix16.h>
// ... somewhere else
// calc: ubAngle = ((pi + atan2(uwDx, uwDy)) * 64)/(2*pi) * 2
UBYTE ubAngle = (UBYTE)(ANGLE_90 + 2 * fix16_to_int(
fix16_div(
fix16_mul(
fix16_add(fix16_pi, fix16_atan2(fix16_from_int(uwDx), fix16_from_int(-uwDy))),
fix16_from_int(64)
),
fix16_pi*2
)
)); |
Beta Was this translation helpful? Give feedback.
-
FixPoint is very painful to use in my opinion. I would like to keep float (I have a lot floatings), if I setup the compiler for Amiga 1200 and use-m68020 (Ithink this should be correct) the ACE crashes in the Loop function calling vPortWaitForEnd(s_pVPort); Whats is the setup for Amiga 1200? |
Beta Was this translation helpful? Give feedback.
-
I did a little reasearch and it looks like one of ACE users tried to use -m68020 flag back in 2021 and came with similar problems, but it crashed at seemingly random functions - I suspect that this flag doesn't work correctly with compiler bundled with Bartman's vscode extension. If you are truly determined to go that route, you might want to check Bebbo's GCC6.5 - ACE should work with it, and that compiler is more complete in terms of supported build switches as well as stdlib - the only downside is that you lose the debugger/profiler features of Bartman's extension, which is a no-go for me. If using fixmath is too cumbersome, you might want to try switching your project to c++ and use its c++ wrappers - they come with convenient operators defined for fix16_t type, so that the syntax is less cluttered and more natural. Now you see the true face of Amiga coding - it's not that straightforward and it's filled with pain, blood and tears. ;) |
Beta Was this translation helpful? Give feedback.
-
My game requires floating point, if I set the CPU to 68020 it works, is there a way to use a 68000 with soft fpu?
Beta Was this translation helpful? Give feedback.
All reactions