@Caermundh: I warn you to use the proposal of mr. guest. I do not want to sound rude, but the attempt is nonsense and will result in memory leaks, crashs or almost impossible to find bugs.

The code contains several errors

1) All Gamestudio objects are saved in a linked list. The method of a direct memcpy instruction will NOT attach this object to the list.

2) The BMAP structure contains pointers to values. With memcpy you only copy the pointer-values but NOT the values behind the pointers. Therefore the approach is no really copy.

3) 3D Gamestudio objects must be created via 3D-Gamestudio instructions (e.g. bmap_create, snd_create etc.), because you have no idea what the bmap_create instruction is doing besides the attachment to the linked list.


Last edited by TechMuc; 04/14/11 14:30.