View Single Post
  #5  
Old 08-25-2009, 10:52 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by fowlplay4 View Post
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(4864);
  
// Draw Body
  
temp.panel.drawimagerectangle(816+16temp.bodyimg6403232);
  
// Draw Head
  
temp.panel.drawimagerectangle(82+16temp.headimg032*23232);
  
// Draw Hat
  
temp.panel.drawimagerectangle(00temp.hatimg9604848);
  
// Save Image
  
temp.panel.saveimage("cartridge/test.png");
  
// Destroy Panel
  
temp.panel.destroy();

Only issue is the whole body colors thing.
Cool.

I remember that the body color swapping was one of the biggest CPU hogs on Graal, and it probably uses some internal function to do it, so I doubt it would be able to replicate it properly/efficiently.
Reply With Quote