Author Message

mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#1   2014-05-13 09:10          
so i have this function in engine block java
and i want to make a copy of SfxTable tab. I tried to do something with SfxTable.java but it didn't work. I don't know how to do it without Native.java file.
yes

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#2   2014-05-13 12:32          
you dont need the native.java, it is just an empty file with a lot of hungarian text that says that the game uses C sources for macros
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O




mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#3   2014-05-13 13:42          
do you have full source of the game?
yes

Unseen.

tw
Posts: 626
http://www.facebook.com/weijyun.fang
Location: Taiwan Taipei
Occupation: Who's in the pumpkin carriage?
Age: 37
V$:
#4   2014-05-13 15:11          
I think original java files for vanilla SLRR is still available on GOM, if I recall correctly.

We have MWM source code in the D/L section, tho. You can also try to study those.
出来ないじゃないやらないだけど



VStanced.com - 一歩先によって

mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#5   2014-05-13 15:16          
i know, i have those. but it's not all source.
yes

RedCarDriver

us
Posts: 1211

Location: United States Arizona
Occupation: it's complicated... more complicated than my relationships
Age: 30
V$: 86310
#6   2014-05-13 18:17          
What I said about this on GOM, posted here for reference:
Doesn't "SfxTable tab2 = tab;" work? I would think it would, unless you're talking about something entirely different.

Also, there's no "Native.java" (or actually, it's blank). Anything referring to "native" means that the code for that is inside the C++ code of the game engine. The game engine is built in C++, and all of the GUIs and most of the parts are built in a Java layer on top of that.

mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#7   2014-05-13 18:50          
"SfxTable tab2 = tab;" doesn't work. Even if you write tab = the_car.getSfxTable(0); and tab2 = the_car.getSfxTable(0); it will link everything into one sfx table.
yes

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#8   2014-05-13 19:06          
# mindeliszz : do you have full source of the game?
Yes but i'm not authorized to share it.

Also i dont have exe source.
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O




RedCarDriver

us
Posts: 1211

Location: United States Arizona
Occupation: it's complicated... more complicated than my relationships
Age: 30
V$: 86310
#9   2014-05-14 04:49          
How about this?
SfxTable tab2 = new SfxTable;
tab2 = tab;
Sorry if I'm stating the obvious here.

mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#10   2014-05-14 07:30          
nope, it doesn't work that way. also should be commas at the end of new sfx table, like this "SfxTable tab2 = new SfxTable();" i already tried everything. Even tried to crate another class that contained SfxTable inside and can be copied.

it's possible with the java file were .getSfxTable() function is. Maybe it's SfxRef.java, i don't know. It has to have a copy constructor, so you could use "SfxTable tab2 = new SfxTable(tab);"

This post was edited by mindeliszz (2014-05-14 07:39, ago)
yes

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#11   2014-05-14 13:51          
i havent understood what you're trying to do honestly
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O




mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#12   2014-05-14 14:23          
i want to play more than 2 sounds at once at same rpm :D
yes

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#13   2014-05-14 17:36          
.__. you could say it before :lol: i'll send you the script i use as soon as i get back home
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O




mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#14   2014-05-14 17:44          
wanted to do it on my own :D
yes

Bigg Boss93

it
Posts: 4024
http://rdbl.co/1Hmg5XL
Location: Italy - Sardegna
Occupation: Swimming out of the shit pool
Age: 30
V$: More than you can afford, pal.
#15   2014-05-14 17:55          
# mindeliszz : public void updatevariables()
{
super.updatevariables();

if (the_car)
{
float vol=DynoData.maxTorque/500;
SfxTable tab;
if (tab = the_car.getSfxTable(0))//on
{
tab.clear();
//INTAKE SOUNDS
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000C2r), 1500, 500.0, 2500.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000C6r), 2000, 1500.0, 5000.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000C4r), 4500, 4000.0, 6000.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000C5r), 5500, 5000.0, 7000.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000C1r), 6500, 6000.0, RPM_limit+600, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000C3r), 6500, RPM_limit-600, 18000.0, 1.0, 1.0);

}

if (tab = the_car.getSfxTable(1))//off
{
tab.clear();
//OTHER SOUNDS HERE(blowoff, exhaust popping etc)
}

if (tab = the_car.getSfxTable(2))
{
tab.clear();
//EXHAUST SOUNDS
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000BAr), 600, 500.0, 1250.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000BCr), 1750, 750.0, 3000.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000C0r), 2500, 2000.0, 5000.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000BEr), 4500, 4000.0, 6500.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000BFr), 6000, 5500.0, 8500.0, 1.0, 1.0);
tab.addItem(new ResourceRef(Shift2_Sounds:0x000000BBr), 8000, 7500.0, 18000.0, 1.0, 1.0);
the_car.setSfxExhaustMinVol(0.9);
}
}
}

tab.addItem(new ResourceRef(Shift2_Sounds:0x000000BAr), 600, 500.0, 1250.0, 1.0, 1.0);

^ this means

tab.addItem(new ResourceRef(FileFolder:FileIDr), Pitch, Min RPM, Max RPM, Min Vol, Max Vol);

So just set intake and exhaust with same rpm bands and it will work fine(i always do it this way).

Also i commonly add other sounds(blowoff, exhaust popping etc) in the first tab because the center one often wont work(dont ask me why because i have no clue).
Diegorborges about my Valo fix: "Now all of you must have your slrr folder like this: C:/BIGBOSSisMYlordANDiamHISbitch/SLRR LOL" :O




mindeliszz

lt
Posts: 547

Location: Lithuania
Occupation: Occupied
Age: 29
V$: One Million Kebabs
#16   2014-05-14 18:20          
nope, it's not working how i want to :D if i put sounds from sfxtable(1) to sfxtable(2) then it duplicates with intake sounds and it sounds poorly.
yes