|
|
 |
« Reply #61 on: January 06, 2011, 03:14:10 PM » |
|
HAW this code's faster: (you only have to wait 2 seconds instead of 3)
def I8(offset,width,height,length): X,Y,TX,TY = 2,2,0,0 fr.seek(offset,0) #absolute position (safety check)
while length > 0: pixel = fr.read(1).encode('hex') R=G=B=pixel color = '#'+R+G+B x = int(TX+X) y = int(TY+Y) C.create_rectangle ( x, y, (x+1), (y+1), fill=color, width=0) TX+=1 if TX == 8: TY += 1 if TY == 4 and TX == 8: X += 8; TX,TY = 0,0 if X == width+2: Y += 4; X = 2 if TY == 4: TY = 0 TX = 0
length -= 1
I'ma shorten it a little (make it a tad faster)
EDIT: btw... there's no resize... yet :/ IDK how to make a resizable canvas...
the tree should be the width of the farthest character (letter) but I've only got it set to 200 the height is the size of the canvas (300) note: stays at 300 if canvas is smaller, resizes if canvas is larger (300 still remains)
I wanna do something similar to Brbx...
|
|
« Last Edit: January 06, 2011, 08:04:34 PM by Tcll »
|
Logged
|
|
|
|
|
|
 |
« Reply #62 on: January 06, 2011, 03:40:06 PM » |
|
if you dont have the other formats figured out, ill try and help with em too. Atm im just about finishing the matrix box then its just debugging after that. the only thing i think of that id be doing wrong with the matrices is the inverse one. Its similar to the other one but it has an extra '80' for no reason lol.
|
|
|
Logged
|
|
|
|
|
|
 |
« Reply #63 on: January 06, 2011, 04:26:44 PM » |
|
if you dont have the other formats figured out, ill try and help with em too. Atm im just about finishing the matrix box then its just debugging after that. the only thing i think of that id be doing wrong with the matrices is the inverse one. Its similar to the other one but it has an extra '80' for no reason lol.
yeh... I'm gonna have to look into those to fully figure them out :/
and for formats... I'll ask if I need anything 
as for my code... this is how compact I could get it:
def I8(offset,width,height,length): X,Y,TX,TY = 2,2,0,0; fr.seek(offset,0) while length > 0: pixel = fr.read(1).encode('hex') R=G=B=pixel; color,x,y = '#'+R+G+B,TX+X,TY+Y C.create_rectangle ( x, y, (x+1), (y+1), fill=color, width=0) TX+=1 if TX == 8: TY += 1 if TY == 4 and TX == 8: X += 8; TX,TY = 0,0 if X == width+2: Y += 4; X = 2 if TY == 4: TY = 0 TX = 0
length -= 1
I know it can be more than that...
and I'll prbly remove the format functions later on (pasting the code in the main function)
less code = more speed
|
|
« Last Edit: January 06, 2011, 08:04:12 PM by Tcll »
|
Logged
|
|
|
|
|
|
 |
« Reply #64 on: January 06, 2011, 07:12:11 PM » |
|
I4 format is done 
def I4(offset,width,height,length): X,Y,TX,TY = 2,2,0,0; fr.seek(offset,0) while length > 0: pixels = list(fr.read(1).encode('hex')) for pixel in pixels: R=G=B=pixel+pixel; color,x,y = '#'+R+G+B,TX+X,TY+Y C.create_rectangle ( x, y, (x+1), (y+1), fill=color, width=0) TX+=1 if TX == 8: TY += 1 if TY == 8 and TX == 8: X += 8; TX,TY = 0,0 if X == width+2: Y += 8; X = 2 if TY == 8: TY = 0 TX = 0
length -= 1
0 I4 (4 bit intensity, 8x8 tiles) 1 I8 (8 bit intensity, 8x4 tiles)2 IA4 (4 bit intensity with 4 bit alpha, 8x4 tiles) 3 IA8 (8 bit intensity with 8 bit alpha, 4x4 tiles) 4 RGB565 (4x4 tiles) 5 RGB5A3 (*) (4x4 tiles) 6 RGBA8 (4x4 tiles in two cache lines - first is AR and second is GB) 8 CI4 (4 bit color index, 8x8 tiles) 9 CI8 (8 bit color index, 8x4 tiles) 10 CI14X2 (14 bit color index, 4x4 tiles) 14 CMP (S3TC compressed, 2x2 blocks of 4x4 tiles
|
|
« Last Edit: January 06, 2011, 08:03:49 PM by Tcll »
|
Logged
|
|
|
|
|
|
 |
« Reply #65 on: January 06, 2011, 07:13:04 PM » |
|
Wow O_O.... I'm blown away by what you two are doing... I didn't think It would be possible but you've proven me wrong... Excellent work!! I'm anticipating the finished production... I'm already creating new things and having more fun doing PSA's... Thank you ShyGuy and Tcll... ^_^
|
|
|
Logged
|
FC:4898-8419-2778
|
|
|
|
|
 |
« Reply #66 on: January 06, 2011, 07:19:19 PM » |
|
Wow O_O.... I'm blown away by what you two are doing... I didn't think It would be possible but you've proven me wrong... Excellent work!! I'm anticipating the finished production... I'm already creating new things and having more fun doing PSA's... Thank you ShyGuy and Tcll... ^_^
np 
btw... how'd you get so many titles?? :/ I want 1 ;_;
|
|
« Last Edit: January 06, 2011, 08:03:28 PM by Tcll »
|
Logged
|
|
|
|
|
|
 |
« Reply #67 on: January 06, 2011, 07:25:19 PM » |
|
Wow O_O.... I'm blown away by what you two are doing... I didn't think It would be possible but you've proven me wrong... Excellent work!! I'm anticipating the finished production... I'm already creating new things and having more fun doing PSA's... Thank you ShyGuy and Tcll... ^_^
np  btw... how'd you get so many titles?? :/ I want 1 ;_; It's just knowing the right people ^o^...
|
|
|
Logged
|
FC:4898-8419-2778
|
|
|
|
|
 |
« Reply #68 on: January 06, 2011, 07:37:04 PM » |
|
Wow O_O.... I'm blown away by what you two are doing... I didn't think It would be possible but you've proven me wrong... Excellent work!! I'm anticipating the finished production... I'm already creating new things and having more fun doing PSA's... Thank you ShyGuy and Tcll... ^_^
np  btw... how'd you get so many titles?? :/ I want 1 ;_; It's just knowing the right people ^o^...
I've talked and chatted with Picano :/ I'm getting the BM-Blast model of BM for him to use... it's proving to be quite tough :@ I feel I should actually have a custom title 
|
|
« Last Edit: January 07, 2011, 08:51:20 PM by Tcll »
|
Logged
|
|
|
|
|
|
 |
« Reply #69 on: January 06, 2011, 07:41:18 PM » |
|
lol i wnna help, but im still workign on the bte and when i do get to this, ill prob be a bit clueless =p
|
|
|
Logged
|
|
|
|
|
|
 |
« Reply #70 on: January 06, 2011, 07:50:28 PM » |
|
Wow O_O.... I'm blown away by what you two are doing... I didn't think It would be possible but you've proven me wrong... Excellent work!! I'm anticipating the finished production... I'm already creating new things and having more fun doing PSA's... Thank you ShyGuy and Tcll... ^_^
np  btw... how'd you get so many titles?? :/ I want 1 ;_; It's just knowing the right people ^o^...
I've talked and chatted with Picano :/ I'm getting the BM-Blast model of BM for him to use... it's proving to be quite tough :@ I feel I should actually have a custom title  Well all I can say is... Ask and you shall recieve.. Maybe lol XD...
|
|
|
Logged
|
FC:4898-8419-2778
|
|
|
|
|
 |
« Reply #71 on: January 06, 2011, 08:00:55 PM » |
|
Well all I can say is... Ask and you shall recieve.. Maybe lol XD...
eh... maybe... KK and screw it... I'm green on SWF, I'm going green on here too >:/ it matches my ava >:3
*editing all previous posts on current pages of popular threads*
|
|
« Last Edit: January 07, 2011, 08:51:06 PM by Tcll »
|
Logged
|
|
|
|
|
|
 |
« Reply #72 on: January 06, 2011, 08:23:25 PM » |
|
all thats left for me to do is do some debugging...gnna take a break
hmmm colored text eh?
|
|
|
Logged
|
|
|
|
|
|
 |
« Reply #73 on: January 06, 2011, 08:31:45 PM » |
|
all thats left for me to do is do some debugging...gnna take a break
hmmm colored text eh? yep :3 I'm going green lol XD
hmm... I didn't know azure was a color :/ what is that in hex?? or RGB...
|
|
« Last Edit: January 07, 2011, 08:50:59 PM by Tcll »
|
Logged
|
|
|
|
|
|
 |
« Reply #74 on: January 06, 2011, 08:43:24 PM » |
|
lol u knew it was azure right off the bat..uhh one sec lol i just took it from c# intellisense.
-hmm u think i can help out with the formats? Not sure how much u need -> "and for formats... I'll ask if I need anything Wink"
edit:
azure = F0FFFF
|
|
« Last Edit: January 06, 2011, 08:47:37 PM by theshyguy »
|
Logged
|
|
|
|
|
|