View Single Post
Old 03 January 2021, 12:24   #7
Ernst Blofeld
<optimized out>
 
Ernst Blofeld's Avatar
 
Join Date: Sep 2020
Location: <optimized out>
Posts: 321
Quote:
Originally Posted by Emufr3ak View Post
I can define classes and access them. As soon as I use the new operator I get linker errors (undefined symbol). Turns out the new operator uses malloc which in turn requires stdlib. Maybe I could simulate the behavior of new like this.

1) Use memory allocation function for Amiga OS
2) Call constructor manually

Not sure how to know how much memory to allocate though.

It‘s the Wintermute Adventure engine I‘m trying to port. My goal is not to be fully compatible with recent games, but to have a decent engine on the Amiga for new games. So it’s going to be a minimal port.
If it's only malloc that you need, what happens if you provide your own?

Code:
void *malloc(size_t size) {
    return AllocVec(size, NULL);
}
Ernst Blofeld is offline  
 
Page generated in 0.06219 seconds with 11 queries