Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CosmoX / EMS problems
#1
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 Smile
earn.
Reply
#2
Problem fixed. How, you ask? I switched to DQB Wink

CosmoX is hereby obsolete.
earn.
Reply
#3
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
Reply
#4
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.
Reply
#5
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. :*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#6
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.
Reply
#7
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.;*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#8
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.
Reply
#9
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
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#10
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)