SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
05-07-13, 05:19 AM | #9916 |
Samurai Navy
|
I used that quite frequently, how are you going to improve it?
|
05-07-13, 09:07 AM | #9917 |
Black Magic
|
|
05-07-13, 09:08 AM | #9918 |
Samurai Navy
|
|
05-07-13, 09:10 AM | #9919 |
Black Magic
|
|
05-07-13, 10:42 AM | #9920 |
Ace of the Deep
|
Ok, as much as me programming and you programming on a totally different level (will have to admit that you operate with stuff that I can only imagine about), this made me laugh to the point of falling off my chair. This is very familliar. Had to do similar thing recently.
|
05-07-13, 11:04 AM | #9921 |
Black Magic
|
Your problem was because of incorrect entries in Sh.sdl file. I see you used S3D to edit the file and that is probably why you got the errors. Hex editor or my SDL Editor app is best way to edit that file I sent you an early xmas present
|
05-07-13, 12:36 PM | #9922 |
Torpedoman
Join Date: Feb 2011
Location: Ubooting
Posts: 118
Downloads: 246
Uploads: 0
|
hi , congratulations for the mod , the less i check is really good , but i have some installation troubles maybe , at starting a game , some permanent winwos stay and , are unclosable , map , unsusable , any input is ignored , so ? any help ? i place the mod following the sobers megamod , no way of making it run properly , any help welcome
|
05-07-13, 01:05 PM | #9923 | |
Ocean Warrior
|
Quote:
1. your game is not patched to v 1.2 2. corrupted files.. you should use 7zip to extract files and everything will be OK..
__________________
. Where does human stupidity end? . El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
|
05-07-13, 01:11 PM | #9924 | |
Lieutenant
Join Date: Mar 2010
Location: South Atlantic
Posts: 262
Downloads: 673
Uploads: 2
|
Quote:
After copying all your files, including the new sh.sdl, I still seem to be having the same problem Maybe it's my configuration or something else. The sound won't play, and if I remove the try/except block, I get the same error as before. Now when I use a default sound like Menu.Click or Menu.Periscope.Move in my script it works fine. I've tried renaming the sound to Menu.Warning , make it the same length/bitrate/etc as the ones that played, but I either get the same error or it goes into the except block. |
|
05-07-13, 01:12 PM | #9925 | |
Torpedoman
Join Date: Feb 2011
Location: Ubooting
Posts: 118
Downloads: 246
Uploads: 0
|
Quote:
|
|
05-07-13, 01:15 PM | #9926 | |
Ocean Warrior
|
Quote:
__________________
. Where does human stupidity end? . El sueño de la razón produce monstruos © - and for some people awakening will be cruel |
|
05-07-13, 01:30 PM | #9927 |
Torpedoman
Join Date: Feb 2011
Location: Ubooting
Posts: 118
Downloads: 246
Uploads: 0
|
pretty much apreciated volodya
|
05-07-13, 04:11 PM | #9928 | |
Black Magic
|
Quote:
|
|
05-07-13, 06:36 PM | #9929 | |
Black Magic
|
Quote:
CPU Disasm Address Hex dump Command Comments 05664C2E |> 8B4424 18 MOV EAX,DWORD PTR SS:[ESP+18] ; Case 3E8 of switch SHSound_act.5664BA9 05664C32 |. 389E 48010000 CMP BYTE PTR DS:[ESI+148],BL 05664C38 |.- 75 08 JNE SHORT SHSound_act.05664C42 05664C3A |. 3BC3 CMP EAX,EBX 05664C3C |.- 0F84 87010000 JE SHSound_act.05664DC9 05664C42 |> 8B4C86 50 MOV ECX,DWORD PTR DS:[EAX*4+ESI+50] 05664C46 |. 3BCB CMP ECX,EBX 05664C48 |.- 0F84 7B010000 JE SHSound_act.05664DC9 05664C4E |. 0FB681 460200 MOVZX EAX,BYTE PTR DS:[ECX+246] what we're looking at is the index of the sound to play is loaded into EAX. EAX is compared to EBX (0). If 0 then sound doesn't exist and the function exits. If sound exists then pointer to the sound is loaded into ECX. Now here's where the error is coming from: the CMP EAX,EBX. The problem is if the game doesn't recognize the sound called for it passes -1 to the function. Comparing -1 to EBX (0) definitely isn't equal so game tries to load pointer from protected memory area and thus error occurs. I'm going to release a patch for this that will have the function fail gracefully if the sound isn't recognized thus preventing the error being thrown. What this means is Menu.PlaySound() only plays sounds that are hard coded in the game - we cannot add new sounds for it |
|
05-07-13, 09:34 PM | #9930 | |
Lieutenant
Join Date: Mar 2010
Location: South Atlantic
Posts: 262
Downloads: 673
Uploads: 2
|
Quote:
That explains it! Thanks for letting me know. In any case I wanted to try my hand at writing a C# .dll for sh5 and I can start by creating a sound dll (maybe similar to the one you made) it'll be good for compatibility with other UIs, and I'll also learn in the process!. I've seen a few C# DirectSound implementations online and they don't look too difficult (I'm not a professional programmer, but I find it very interesting). I wanted to ask you a couple of technical questions. I'm playing around with the menu editor/scripting, trying to learn more stuff, and I wanted to know if any of these are possible: 1 - When I create a button and use its ".Clicked" property, the mouse click event is called when the mouse button is released. Is there a way to get a mouse event as soon as the user presses down the button instead of only when it is released? I've seen dials that do that, but I'm not sure if it's doable with buttons. 2 - I tried to create an EditBox to input some text, but they seem to be limited to 30 characters or something like that. Is there a way to increase this limit? Thanks! |
|
Tags |
dbrn, favorite, new ui |
|
|