Post Reply 
VSMX File Format
Author Message
ZiNgA BuRgA
Smart Alternative

Posts: 17,022.2988
Threads: 1,174
Joined: 19th Jan 2007
Reputation: -1.71391
E-Pigs: 446.1274
Offline
Post: #31
RE: VSMX File Format
Okay, I've gone to the effort and done it for you - hope that helps:

Javascript Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
rain = new Actor( "rain" );
offset = 0.000000;
camera = new Camera( "camera" );
rideau_pluie = new Actor( "Rideau_pluie" );
pluie = new Actor( "pluie_middle" );
reflet = new Actor( "reflet" );
flowater = new Actor( "flux" );
ruisselle = new Actor( "ruissel" );
updateRain = function(/*localvars=8*/) {
	offset = offset - 0.0250000;
	rain.uv_offset = < 0, offset >;
	ruisselle.uv_offset = < 0, offset * 0.200000 >;
	flowater.uv_offset = < 0, offset * 1.40000 >;
	pluie.uv_offset = < 0, offset >;
	rideau_pluie.uv_offset = < 0, offset * 0.550000 >;
	reflet.uv_offset = < 0, offset * 0.320000 >;
	__var1 = offset * 0.500000;
	__var2 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	__var1 = offset * 0.400000 + 555.500;
	__var3 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000 * 0.500000;
	__var1 = offset * 0.300000 + 888.800;
	__var4 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000;
	camera.position = < 7.07100 + __var2, -(1.00000) + __var3, -(25.3310) + __var4 >;
	__var1 = offset * 0.200000;
	__var5 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	__var1 = offset * 0.180000 + 555.500;
	__var6 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000 * 0.700000;
	__var1 = offset * 0.150000 + 888.800;
	__var7 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	camera.direction = < 0.0850000 + __var5 * 0.100000, -(0.0180000) + __var6 * 0.100000, 0.850000 + __var7 * 0.100000 >;
	return null;
};
updateRain();
System.timer[0] = new IntervalTimer( 1.00000 / 60.0000, updateRain );
num_splotch = 60;
splotchs = new Array();
frames = new Array();
computeLight = function(/*localvars=8*/ __var1, __var2, __var3) {
	__var4 = __var1 - 3.20000;
	__var5 = __var2 + 5.60000;
	__var6 = __var3 + 7.60000;
	__var7 = Math.sqrt( __var4 * __var4 + __var5 * __var5 + __var6 * __var6 ) / 10.0000;
	return Math.pow( Math.max( 0.000000, 1.00000 - __var7 ), 1.40000 );
	return null;
};
randomizeSplotch = function(/*localvars=7*/ __var1) {
	__var2 = 0;
	__var3 = -(5.50000);
	__var4 = 0;
	__var5 = Math.random();
	if( __var5 < 0.700000 ) {
		__var2 = 1.50000 + Math.random() * 8.50000;
		__var4 = -(12.0000) + Math.random() * 12.0000;
	} else {
		if( __var5 < 0.950000 ) {
			__var2 = 1.70000 + Math.random() * 0.500000;
			__var4 = -(12.0000) + Math.random() * 12.0000;
		} else {
			__var2 = 1.98000 + Math.random() * 0.100000 - 0.0500000;
			__var4 = -(9.06000) + Math.random() * 0.100000 - 0.0500000;
		}
	}
	__var1.position = < __var2, __var3, __var4 >;
	__var6 = 0.700000 + Math.random() * 0.300000;
	__var1.scale = < __var6, __var6, __var6 >;
	__var1.setColor( < 1.00000, 1.00000, 1.00000, computeLight( __var2, __var3, __var4 ) >, 0.000000 );
	return null;
};
for(i = 0; i < num_splotch; i++) {
	splotchs.push( new Actor( "splotch" + i ) );
	frames.push( Math.floor( Math.random() * 8.00000 ) );
	randomizeSplotch( splotchs[i] );
}
updateSplotches = function(/*localvars=2*/) {
	for(__var1 = 0; __var1 < num_splotch; __var1++) {
		frames[__var1]++;
		if( frames[__var1] == 8 ) {
			randomizeSplotch( splotchs[__var1] );
			frames[__var1] = 0;
		}
		splotchs[__var1].uv_offset = < frames[__var1] / 8.00000, 0 >;
	}
	System.printPerf();
	return null;
};
System.timer[1] = new IntervalTimer( 1.00000 / 30.0000, updateSplotches );


Here's an updated rcomage.exe with a few bugs fixed too:



Attached File(s)
.7z  rcomage.7z (Size: 890.65 KB / Downloads: 442)
13/05/2011 04:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
eustolio
Neophitic Presence

Posts: 4.5100
Threads: 0
Joined: 9th May 2011
Reputation: 0
E-Pigs: 0.8222
Offline
Post: #32
RE: VSMX File Format
(13/05/2011 04:09 AM)ZiNgA BuRgA Wrote:  Okay, I've gone to the effort and done it for you - hope that helps:

Javascript Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
rain = new Actor( "rain" );
offset = 0.000000;
camera = new Camera( "camera" );
rideau_pluie = new Actor( "Rideau_pluie" );
pluie = new Actor( "pluie_middle" );
reflet = new Actor( "reflet" );
flowater = new Actor( "flux" );
ruisselle = new Actor( "ruissel" );
updateRain = function(/*localvars=8*/) {
	offset = offset - 0.0250000;
	rain.uv_offset = < 0, offset >;
	ruisselle.uv_offset = < 0, offset * 0.200000 >;
	flowater.uv_offset = < 0, offset * 1.40000 >;
	pluie.uv_offset = < 0, offset >;
	rideau_pluie.uv_offset = < 0, offset * 0.550000 >;
	reflet.uv_offset = < 0, offset * 0.320000 >;
	__var1 = offset * 0.500000;
	__var2 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	__var1 = offset * 0.400000 + 555.500;
	__var3 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000 * 0.500000;
	__var1 = offset * 0.300000 + 888.800;
	__var4 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000;
	camera.position = < 7.07100 + __var2, -(1.00000) + __var3, -(25.3310) + __var4 >;
	__var1 = offset * 0.200000;
	__var5 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	__var1 = offset * 0.180000 + 555.500;
	__var6 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000 * 0.700000;
	__var1 = offset * 0.150000 + 888.800;
	__var7 = Math.sin( __var1 ) * 0.300000 + Math.sin( __var1 * 2.30000 ) * 0.150000 + Math.sin( __var1 * 5.00000 ) * 0.00700000;
	camera.direction = < 0.0850000 + __var5 * 0.100000, -(0.0180000) + __var6 * 0.100000, 0.850000 + __var7 * 0.100000 >;
	return null;
};
updateRain();
System.timer[0] = new IntervalTimer( 1.00000 / 60.0000, updateRain );
num_splotch = 60;
splotchs = new Array();
frames = new Array();
computeLight = function(/*localvars=8*/ __var1, __var2, __var3) {
	__var4 = __var1 - 3.20000;
	__var5 = __var2 + 5.60000;
	__var6 = __var3 + 7.60000;
	__var7 = Math.sqrt( __var4 * __var4 + __var5 * __var5 + __var6 * __var6 ) / 10.0000;
	return Math.pow( Math.max( 0.000000, 1.00000 - __var7 ), 1.40000 );
	return null;
};
randomizeSplotch = function(/*localvars=7*/ __var1) {
	__var2 = 0;
	__var3 = -(5.50000);
	__var4 = 0;
	__var5 = Math.random();
	if( __var5 < 0.700000 ) {
		__var2 = 1.50000 + Math.random() * 8.50000;
		__var4 = -(12.0000) + Math.random() * 12.0000;
	} else {
		if( __var5 < 0.950000 ) {
			__var2 = 1.70000 + Math.random() * 0.500000;
			__var4 = -(12.0000) + Math.random() * 12.0000;
		} else {
			__var2 = 1.98000 + Math.random() * 0.100000 - 0.0500000;
			__var4 = -(9.06000) + Math.random() * 0.100000 - 0.0500000;
		}
	}
	__var1.position = < __var2, __var3, __var4 >;
	__var6 = 0.700000 + Math.random() * 0.300000;
	__var1.scale = < __var6, __var6, __var6 >;
	__var1.setColor( < 1.00000, 1.00000, 1.00000, computeLight( __var2, __var3, __var4 ) >, 0.000000 );
	return null;
};
for(i = 0; i < num_splotch; i++) {
	splotchs.push( new Actor( "splotch" + i ) );
	frames.push( Math.floor( Math.random() * 8.00000 ) );
	randomizeSplotch( splotchs[i] );
}
updateSplotches = function(/*localvars=2*/) {
	for(__var1 = 0; __var1 < num_splotch; __var1++) {
		frames[__var1]++;
		if( frames[__var1] == 8 ) {
			randomizeSplotch( splotchs[__var1] );
			frames[__var1] = 0;
		}
		splotchs[__var1].uv_offset = < frames[__var1] / 8.00000, 0 >;
	}
	System.printPerf();
	return null;
};
System.timer[1] = new IntervalTimer( 1.00000 / 30.0000, updateSplotches );


Here's an updated rcomage.exe with a few bugs fixed too:


Thanks mr ZiNgA!
14/05/2011 11:13 PM
Find all posts by this user Quote this message in a reply
highboy
Storm Trooper

Posts: 295.2342
Threads: 21
Joined: 13th May 2007
Reputation: -1.78625
E-Pigs: 32.1004
Offline
Post: #33
RE: VSMX File Format
(13/05/2011 04:09 AM)ZiNgA BuRgA Wrote:  Here's an updated rcomage.exe with a few bugs fixed too:

thanks for that ;)

Check out my apps Here
15/05/2011 05:47 AM
Find all posts by this user Quote this message in a reply
zeusfriends
Neophitic Presence

Posts: 4.3967
Threads: 0
Joined: 4th Jan 2011
Reputation: 0
E-Pigs: 0.6890
Offline
Post: #34
RE: VSMX File Format
i was apple to make a VSMX decompiler...and it use the mnemonics used by the PSP processor ...
and it just translate the mnemonics just like Assembely, so you have to use the Javascript keywords to make your own effort (Manually) ... and it's 100% grantee ... and to prove it, anyone want send me your VSMX and i will translate it for you, for free!...

thanks
24/05/2011 06:18 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: