DarkPikachu
Administrator
Game Hacker
Offline
[color=lime]The electric rat with the power of darkness and a scythe. >:3[/color]
Posts: 678
Brawl Friend Code: 4125-6026-5674
Text Color: lime
Glow Color: green
Glow Strength: 5
Show Custom Post Effects: Yes
RolePlay Characters: Riku<br/>(normal) { id : "NRU", };
Riku<br/>(normal) { id : "NRH", };
Riku<br/>(power) {
id : "PRU",
BG : {},
ava : {},
name : {},
text : {},
};
Riku<br/>(power) { id : "PRH", };
Riku<br/>(evil) { id : "ERU", };
Riku<br/>(evil) { id : "ERH", };
Riku<br/>(ulra) { id : "URU", };
Sparx { id : "Sparx", };
Neal { id : "Neal", };
Exp:410 { id : "410", };
Dark Pikachu { id : "DP", };
Wolf { id : "Wolf", };
Reaperchu { id : "Reaperchu", };
Spark { id : "Spark", };
Custom Smileys: [[":>:3:","32","32","https://ipfs.io/ipfs/QmNrnBRE8hujm36qhbzZLEFxu94g2bW9SgCh9e74QyN7Sf?filename=DarkPikaSmile.gif"],["::3:","32","32","https://ipfs.io/ipfs/QmdCgSvLYN2PwsfmHhjHzby79sNuDQfvUMWthmDFbQ6Mq1?filename=DarkPika.gif"],[":pika:","32","32","http://www.sherv.net/cm/emo/funny/1/pikachu.gif"],[":af:","32","32","http://forums.kc-mm.com/Smileys/default/Awesome_Face.png"],[":srs:","32","32","http://forums.kc-mm.com/Smileys/default/srs2.gif"],[":Riku:","30","30","https://ipfs.io/ipfs/QmfBGDRhdEiKM4Q7pLYmqwHyLpncbxvFjMvQHz1pdkg8C3?filename=NRU.png"],[":RikuH:","30","30","https://ipfs.io/ipfs/QmfQXHwMjMHFTCBgAkC1FiA654smUznie7moEei7wdmvZp?filename=NRH.png"],[":PRiku:","30","30","https://ipfs.io/ipfs/QmPtUsVPNEvxqzC8zYd3rvEAN5V53UFhzWZXW741B5WgyE?filename=PRU.png"],[":PRikuH:","30","30","https://ipfs.io/ipfs/QmX8LsJaerTtmYmrkJPbq2bNsaEkT2iABbYhEUavMw92Lf?filename=PRH.png"],[":ERiku:","30","30","https://ipfs.io/ipfs/QmRuGxcH3MihCPu4BWvzbHGjHdPraNK4RN9c8nzLVXT7wQ?filename=ERU.png"],[":ERikuH:","30","30","https://ipfs.io/ipfs/QmZJaLSAMqiy9vZsaYTCZNtte1PoRXpjtoKT4yvw3ajbMZ?filename=ERH.png"],[":URiku:","30","30","https://ipfs.io/ipfs/QmcmnfgrjgSKwfxmMbdD852YtWwZijVT9QCUHV3zw1Rvj3?filename=URU.png"],[":DRiku:","30","30","https://ipfs.io/ipfs/QmQ5dYfKh29bS7f6YKG3KkXRCxgR6GvN3yAQFNqo58C5mE?filename=DRU.png"],[":DP:","30","30","https://ipfs.io/ipfs/QmSCHr21hYqdF1H56gKdwoQ9eVfUZS2AqFpDwFFTKRiEXc?filename=avatar174258_1.png"],[":Wolf:","30","30","https://ipfs.io/ipfs/QmV6JreKeTNZ3AFP6SwbXQZRGyr1XD7FjNUKd8DX7NDEzR?filename=wolf.png"],[":dp:","30","30","https://ipfs.io/ipfs/QmW8mGxQXyopCFkQbMFxtaseZdY1febCqVTwgBViFuoDxj?filename=409852902098862080.png"],[":smirk:","32","32","https://ipfs.io/ipfs/QmcEpjdS73RHrHgxgLQidQKUFQCVFxZVwv54gCjrT2oAeu?filename=smirk.png"]]
Custom CSS:
.blank { color: silver; text-shadow: none; }
.staff { color: gray; text-shadow: none; }
.SoneH { color: lightblue; text-shadow:
0px 0px 3px lightblue,
0px 0px 3px lightblue,
0px 0px 3px lightblue; }
.Riku, .RikuH { color: #CC8140; text-shadow: none; }
.PRiku, .PRikuH { color: #6688DD; text-shadow:
0px 0px 3px #2244DD,
0px 0px 3px #2244DD,
0px 0px 3px #2244DD; }
.ERiku, .ERikuH { color: #C70000; text-shadow:
0px 0px 2px #6644DD,
0px 0px 2px #6644DD; }
.URiku { color: #9988DD; text-shadow:
0px 0px 3px #772288,
0px 0px 3px #772288,
0px 0px 3px #772288; }
.DRiku { color: #60FF60; text-shadow:
0px 0px 3px #608070,
0px 0px 3px #608070,
0px 0px 3px #608070; }
.DP { color: lime; text-shadow: green 0px 0px 5px, green 0px 0px 5px, green 0px 0px 5px, green 0px 0px 5px, green 0px 0px 5px; }
.Wolf { color: #F090F0; text-shadow:
0px 0px 3px #772288,
0px 0px 3px #772288,
0px 0px 3px #772288; }
|
Post by DarkPikachu on Mar 29, 2014 21:40:46 GMT -5
[glow=black,1,0]Home | Prev ( string()() ) | Next ( array() )
struct( size, order, **vars )
reads/writes a group of data types handled similar to a C struct
usage:vector3f = struct( 12, 'x,y,z',
x = bf32, y = bf32, z = bf32,
)
def BBCPythonCodeFix():
read: vert = vector3f() vert.x
write1: vector3f( 1.0, 1.0, 1.0 )
write2: vert.x.set( 1.0 )
make sure your struct size allows enough room to work. bf32 operates on 4 bytes per call, 4*3 = 12. if the size is less than the amount you have to work with, the remaining data is skipped.
example:vector3f = struct( 6, 'x,y,z',
x = bf32, y = bf32, #skipped z = bf32, #skipped
# struct size is 6 - 4 = 2 which is made up for in padding
)
def BBCPythonCodeFix():
the reason for this behavior is for "possible future values that are currently unknown". (applying to when you build the struct)
basically, it allows you to define more values than you actually need, if you'll ever happen to end up needing them later.
As for the variable order... this is sort of an un-considered bug with python 2.7 functions:
def (arg, *args, **kwargs):
where kwargs is a dict of the variables as keys with their values.
with the vars from above, here's the order they would ACTUALLY be parsed: { 'y': bf32, 'x': bf32, 'z': bf32 } meaning that x wouldn't be the proper value you were expecting.
so the order fixes that, and you can write the variables in whatever order you please.
I do intend to find a python hack to fix this later on... when the fix is implemented, you'll be able to use struct with both implementations. ;)
|
struct()
Mar 29, 2014 21:40:46 GMT -5
|
|
DarkPikachu
Administrator
Game Hacker
Offline
[color=lime]The electric rat with the power of darkness and a scythe. >:3[/color]
Posts: 678
Brawl Friend Code: 4125-6026-5674
Text Color: lime
Glow Color: green
Glow Strength: 5
Show Custom Post Effects: Yes
RolePlay Characters: Riku<br/>(normal) { id : "NRU", };
Riku<br/>(normal) { id : "NRH", };
Riku<br/>(power) {
id : "PRU",
BG : {},
ava : {},
name : {},
text : {},
};
Riku<br/>(power) { id : "PRH", };
Riku<br/>(evil) { id : "ERU", };
Riku<br/>(evil) { id : "ERH", };
Riku<br/>(ulra) { id : "URU", };
Sparx { id : "Sparx", };
Neal { id : "Neal", };
Exp:410 { id : "410", };
Dark Pikachu { id : "DP", };
Wolf { id : "Wolf", };
Reaperchu { id : "Reaperchu", };
Spark { id : "Spark", };
Custom Smileys: [[":>:3:","32","32","https://ipfs.io/ipfs/QmNrnBRE8hujm36qhbzZLEFxu94g2bW9SgCh9e74QyN7Sf?filename=DarkPikaSmile.gif"],["::3:","32","32","https://ipfs.io/ipfs/QmdCgSvLYN2PwsfmHhjHzby79sNuDQfvUMWthmDFbQ6Mq1?filename=DarkPika.gif"],[":pika:","32","32","http://www.sherv.net/cm/emo/funny/1/pikachu.gif"],[":af:","32","32","http://forums.kc-mm.com/Smileys/default/Awesome_Face.png"],[":srs:","32","32","http://forums.kc-mm.com/Smileys/default/srs2.gif"],[":Riku:","30","30","https://ipfs.io/ipfs/QmfBGDRhdEiKM4Q7pLYmqwHyLpncbxvFjMvQHz1pdkg8C3?filename=NRU.png"],[":RikuH:","30","30","https://ipfs.io/ipfs/QmfQXHwMjMHFTCBgAkC1FiA654smUznie7moEei7wdmvZp?filename=NRH.png"],[":PRiku:","30","30","https://ipfs.io/ipfs/QmPtUsVPNEvxqzC8zYd3rvEAN5V53UFhzWZXW741B5WgyE?filename=PRU.png"],[":PRikuH:","30","30","https://ipfs.io/ipfs/QmX8LsJaerTtmYmrkJPbq2bNsaEkT2iABbYhEUavMw92Lf?filename=PRH.png"],[":ERiku:","30","30","https://ipfs.io/ipfs/QmRuGxcH3MihCPu4BWvzbHGjHdPraNK4RN9c8nzLVXT7wQ?filename=ERU.png"],[":ERikuH:","30","30","https://ipfs.io/ipfs/QmZJaLSAMqiy9vZsaYTCZNtte1PoRXpjtoKT4yvw3ajbMZ?filename=ERH.png"],[":URiku:","30","30","https://ipfs.io/ipfs/QmcmnfgrjgSKwfxmMbdD852YtWwZijVT9QCUHV3zw1Rvj3?filename=URU.png"],[":DRiku:","30","30","https://ipfs.io/ipfs/QmQ5dYfKh29bS7f6YKG3KkXRCxgR6GvN3yAQFNqo58C5mE?filename=DRU.png"],[":DP:","30","30","https://ipfs.io/ipfs/QmSCHr21hYqdF1H56gKdwoQ9eVfUZS2AqFpDwFFTKRiEXc?filename=avatar174258_1.png"],[":Wolf:","30","30","https://ipfs.io/ipfs/QmV6JreKeTNZ3AFP6SwbXQZRGyr1XD7FjNUKd8DX7NDEzR?filename=wolf.png"],[":dp:","30","30","https://ipfs.io/ipfs/QmW8mGxQXyopCFkQbMFxtaseZdY1febCqVTwgBViFuoDxj?filename=409852902098862080.png"],[":smirk:","32","32","https://ipfs.io/ipfs/QmcEpjdS73RHrHgxgLQidQKUFQCVFxZVwv54gCjrT2oAeu?filename=smirk.png"]]
Custom CSS:
.blank { color: silver; text-shadow: none; }
.staff { color: gray; text-shadow: none; }
.SoneH { color: lightblue; text-shadow:
0px 0px 3px lightblue,
0px 0px 3px lightblue,
0px 0px 3px lightblue; }
.Riku, .RikuH { color: #CC8140; text-shadow: none; }
.PRiku, .PRikuH { color: #6688DD; text-shadow:
0px 0px 3px #2244DD,
0px 0px 3px #2244DD,
0px 0px 3px #2244DD; }
.ERiku, .ERikuH { color: #C70000; text-shadow:
0px 0px 2px #6644DD,
0px 0px 2px #6644DD; }
.URiku { color: #9988DD; text-shadow:
0px 0px 3px #772288,
0px 0px 3px #772288,
0px 0px 3px #772288; }
.DRiku { color: #60FF60; text-shadow:
0px 0px 3px #608070,
0px 0px 3px #608070,
0px 0px 3px #608070; }
.DP { color: lime; text-shadow: green 0px 0px 5px, green 0px 0px 5px, green 0px 0px 5px, green 0px 0px 5px, green 0px 0px 5px; }
.Wolf { color: #F090F0; text-shadow:
0px 0px 3px #772288,
0px 0px 3px #772288,
0px 0px 3px #772288; }
|
Post by DarkPikachu on May 11, 2015 9:15:53 GMT -5
NOTICE: above methods are deprecated.
I've figured out a method to get the order using a backend parser which can read YOUR code and return your var names in order. (it's needed anyways for SIDE)
when it comes to version conflicts, just use None for the data type ;) (using None will cause the struct's parser to exclude that entry entirely)
to add, I'll be focusing on data management with these. (inspired by unions)
|
struct()
May 11, 2015 9:15:53 GMT -5
|
|