I have set raster callback function in the first part of game, and I don't need it in the second part. How to disable it? Setting it to NULL causes rendering errors.
Passing NULL to TLN_SetRasterCallback() is the way to disable raster effects.
Exactly what kind of "rendering errors" are you experiencing? Can you post some example?
Using DisableBGColor() after disabling raster callback caused errors like this, using SetBGColor(0,0,0) instead fixed problem.
I'm glad you found the cause so quickly!
In Tilengine you must specify a base background: either a solid color with TLN_SetBGColor() or a fixed bitmap with TLN_SetBGBitmap(). If not, pixels that are not covered by any background layer aren't cleared between frames, leaving the trace you see in the picture. This is not a bug, it's by design, to avoid unnecesary overdraw when you use a background layer that you know that it hasn't transparent pixels, so a base background is not needed.
This is unrelated to raster effects.