Posts: 1,813
Threads: 284
Joined: Mar 2003
I've narrowed the problem down, and it turns out that I can only edit one layer (4 pages) whenever I borrow some EMS memory. Here is the code:
Code:
CALL CSMapEMSLayer(ehandle%, 0)
layerBG% = CSGetEMSFrame
CALL CSClear(layerBG%, 77)
CALL CSMapEMSLayer(ehandle%, 4)
layerItems% = CSGetEMSFrame
CALL CSClear(layerItems%, 0)
The reason I can only edit one of these layers is that they both happen to be the same exact number!
Code:
PRINT layerBG% = layerItems%
This will print -1
I don't quite understand it myself. If someone could help me out? I'd provide the code to the whole program, but since I experimented with the number of pages and layers, the code is a little messed up right now. If someone could provide and explain an example of how to correct my code to make it work, that'd be awesome
earn.
Posts: 1,813
Threads: 284
Joined: Mar 2003
Problem fixed. How, you ask? I switched to DQB
CosmoX is hereby obsolete.
earn.
Posts: 2,020
Threads: 24
Joined: Jun 2002
Huh? DirectQB was made before, and is slower and less efficient than Cosmox. Not to mention that cosmox is more complete...
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 1,813
Threads: 284
Joined: Mar 2003
Well I don't know about speeds and dats and such, but DQB is a hell of a lot more workable for me, and I like it a lot more. Not to mention the documentation is a lot clearer.
earn.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Yeah cuz in CsX you have to map a layer before you get to use it. :*)
You could use DQBRel if you want speed and autolayers though. :*)
Posts: 1,813
Threads: 284
Joined: Mar 2003
No, mapping the layer was not a problem. I could map it and use it easily. The problem was that it was only one layer I could use, no matter how much memory I allocated. :'(
earn.
Posts: 3,288
Threads: 167
Joined: Nov 2001
You could use as much Layers as DQB in CSx.
Just:
1. Allocate as much as you want
2. Map the first layer
3. Draw
4. Map second layer
5. Draw
99. Map Nth layer
100. Draw
that simple. But as I said there is DQBRel that is as fast as CSX with autolayerting.
all you need to do is change DQBPut to RelSprite.;*)
Posts: 1,813
Threads: 284
Joined: Mar 2003
That isn't efficient for when I need to redraw a layer in the middle of all the layers, because then I need to remap it all the time.
Does your library support a multikey keyboard handler? And loading PUT files?
earn.
Posts: 3,288
Threads: 167
Joined: Nov 2001
Yep. Its a Combo of DQB and RelLib. I made it because PedXing's author wanted it.;*)
All the DQB commands are Legal. I just added RelSprite,RelSpriteTrans, and Gamma.
Here: try the example proggie and see the code. ;*)
http://nemesisqb.zext.net/highres.html
or
http://nemesisqb.zext.net/download.cgi?file=dqbrel
Posts: 1,813
Threads: 284
Joined: Mar 2003
You have to understand that I'm very cautious about trying new libraries or functions when some of my code is fucked up. Once my code is fixed, I'll probably then feel it's safe to try a new lib...
earn.