View Single Post
  #1  
Old 06-07-2012, 02:39 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Set layers and RGB/alpha in GuiDrawingPanel

Is it possible to change / set layers in the GuiDrawingPanel aswell as the RGB/alpha value? I'm messing around with something on Delteria which does display the tiles inside the DrawingPanel, the NPCs but the NPCs and players.
But the NPCs dont have the proper layer. Aswell I couldn't find any way how I could fix the problem with the RGB and alpha. Using maskimage(x, y, img, mode) was the only solution I could find which is not perfect. While using drawObject(x, y, obj) it doesnt seem to be a problem or atleast I couldnt find one yet.
This is the code I am using:
PHP Code:
for (temp.nnpcs) {
  if (
n.visible && n.x in |player.x-(player.x%64), (player.x-(player.x%64))+63.95| && n.y in |player.y-(player.y%64), (player.y-(player.y%64))+63.95|) {
    if (
temp.n.image != NULL && temp.n.ani == NULL) {
      if (
temp.n.alpha == 1) {
        
drawimagestretched(((n.x%64)*16)/ir, ((n.y%64)*16)/irgetImgWidth(n.image)/irgetImgHeight(n.image)/irn.image00getImgWidth(n.image), getImgHeight(n.image));
      }
      else {
        
maskimage(((n.x%64)*16)/ir, ((n.y%64)*16)/irn.image"add");
      }
    }
    else if (
temp.n.ani != NULL) {
      
drawobject(((n.x%64)*16)/ir, ((n.y%64)*16)/irn);
    }
  }
}
for (
temp.pplayers) {
  if (
p.x in |player.x-(player.x%64), (player.x-(player.x%64))+63.95| && p.y in |player.y-(player.y%64), (player.y-(player.y%64))+63.95|) {
    if (
p.alpha 0drawobject(((p.x%64)*16)/ir, ((p.y%64)*16)/irp);
  }

Screenshot:
__________________
MEEP!
Reply With Quote