PDA

View Full Version : Can't seem to graba bitmap pointer?



ZoriaRPG
12-08-2016, 12:50 PM
-=SPOILER=-

When run, the statement if ( !tex ) catches, and returns an error.

What did I do wrongly here, that it isn't grabbing an existing ZScript bitmap to use as the texture?

When I tried to make a bitmap, and blit, then use the dest bitmap, ZC crashed. The code that I tried for that is in a comment block.

Gleeok
12-08-2016, 08:06 PM
What is the value of bitmapIndex? It appears to be wrong. Also what debugger are you (not) using?


I already added the ability to use off-screen bitmaps for every tri/quad/polygon drawing command in ZScript [in the next version (not finished yet)].


Ex Zscript:


Screen->SetRenderSource(RT_BITMAP1); // All subsequent drawing commands use bitmap 1
Screen->DrawQuad(...);
Screen->SetRenderSource(RT_DEFAULT);

ZoriaRPG
12-08-2016, 08:35 PM
What is the value of bitmapIndex? It appears to be wrong. Also what debugger are you (not) using?


I already added the ability to use off-screen bitmaps for every tri/quad/polygon drawing command in ZScript [in the next version (not finished yet)].


Ex Zscript:


Screen->SetRenderSource(RT_BITMAP1); // All subsequent drawing commands use bitmap 1
Screen->DrawQuad(...);
Screen->SetRenderSource(RT_DEFAULT);




That's what I thought that was, but the inherent lack of stability of that stuff, when I merged it, essentially told me that none of it was going to work as-is.

I was using the value of RT_BITMAP1, passed through sdci[n]/10000, with zscriptDrawingRenderTarget->GetBitmapPtr(bitmapIndex);
Effectively, zscriptDrawingRenderTarget->GetBitmapPtr(RT_BITMAP1/10000);

That seems to work everywhere else...?

Would you making making the entire screen bitmap, as it is rendered each frame after drawing objects/sprites,including the passive subscreen, available as a render source through that function?

I managed to merge enough from allegro 4.4.2 thus far, to get draw_sprite_ex to work, but I;m still missing some component that is critical to rotate_sprite_trans and pivot_sprite_trans. I took a break from drawing functions, to add Link->Diagonal, and Link->BigHitbox, both with abstraction functions, and I know that Diagonal works. I haven't tested BigHitbox, primarily because of the set-up time to make big link tiles.

At least I'm sure now, that I comprehend how to add class variables, properly. That will help with Itemdata, although I'm uncertain how to add an ID field to the classes, permitting for example, 'this->ID ' in item scripts, to grab itemdata values.