This module allows you to relocate your players. Thus, if you must set your player in #1000 at the beginning of your demo, and in #8000 for your second effect, no need to have it twice in memory ! A simple CALL and it's done. However, you'll have to move it by yourself !

You'll find the sources on this disc, named RELPLAY.DAM or .MXM. The RELPLAY.BIN file is the same code, but compiled in #9000. You can use it, but do not modify it !

The compiled relocateur is made to be called in BASIC, with these parameters : CALL Relocator,ad1,ad2,type

'Relocator' is of course the address where the relocator is compiled. Ad1 is where you've loaded your player. Ad2 is where you want to relocate your player. Type is the player type : 0=Asm 1=Basic 2=Inter.

Generally, ad1=ad2, especially in Basic, because you load the file where you want, and THEN relocate it.

A little source modification is needed if you want to use it in assembler, you just have to clear some of the first lines of the source, the ones reading the parameters, in order to force yours. You can also choose not to modify anything, and to create your own parameters table given through IX. Nothing complicated, you can do it on your own :).

If you recompile this module in order to use it in an asm code, you can save a lot of place by killing the 2 relocation tables you don't need, at the end of the source (relocate a BASIC ou INTER player is of no use for ASM coders, for example).

documentations/software/starkos/howto.relocate.player.txt · Last modified: 2009/05/13 15:31 by grim