AmigaPorts / ACE

Amiga C Engine
Mozilla Public License 2.0
155 stars 26 forks source link

Convert codebase to C++? #153

Open tehKaiN opened 2 years ago

tehKaiN commented 2 years ago

Most ACE utils/managers are having create/destroy functions, so this could be constructors. Also, some things that will be possible in C++ and aren't in C:

Things to figure out:

timfel commented 2 years ago

while on a high level i would like to see that, I'm afraid given how few people work on the optimisation pipeline for 68k in gcc, the performance impact for c++ features that have not been optimised in the 68k backend may be noticeable

tehKaiN commented 11 months ago

From discord discussion:

I kinda need having a tilebuffer draw tile callback to draw stuff over the tile, and that gets in the way of tileBufferContinueTileDraw().

So I'm thinking - I guess we need a flag which tells the tilebuffer whether it can optimize draws this way or not, and I'm thinking whether it should be a tag in tilebuffer or a define similarly to how bob system has its feature locked. Adding ifs in bob system proved to be adding noticeable slowdowns of it could/would be the same here. In cpp world, tilebuffer could be templated and that could be one of template params setting constexpr static field, which could be then constexpr-if'd in code.

EDIT: nevermind - it first batches draws, and then calls callbacks after all tiles are drawn. Nevermind then. But being able to constexpr-specify options would probably open up some performance optimizations.