View Single Post
  #4  
Old 08-25-2009, 10:32 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Well I finished experimenting and ended up making this nifty drawing function on the serverside.

PHP Code:
// Coded for Classic Bodies
function drawCharacter(obj) {
  
// Get Player Variables
  
temp.headimg = obj.head;
  
temp.bodyimg = obj.body;
  
temp.hatimg  = obj.attr[1];
  
// Draw Player
  
temp.panel = new TDrawingPanel();
  
temp.panel.setsize(48, 64);
  
// Draw Body
  
temp.panel.drawimagerectangle(8, 16+16, temp.bodyimg, 64, 0, 32, 32);
  
// Draw Head
  
temp.panel.drawimagerectangle(8, 2+16, temp.headimg, 0, 32*2, 32, 32);
  
// Draw Hat
  
temp.panel.drawimagerectangle(0, 0, temp.hatimg, 96, 0, 48, 48);
  
// Save Image
  
temp.panel.saveimage("cartridge/test.png");
  
// Destroy Panel
  
temp.panel.destroy();
} 
Only issue is the whole body colors thing.
__________________
Quote:
Reply With Quote