I don't know, probably it is matter of experiment with the elevation values and tests.
This year I decided to take a break from SH3.
Everything related is archived, and will rest for year or two.
So, I will not spend big amount of time and brain power for Silent Hunter.
Here, about terrain I can change this elevations table with sh5 one. Just for experiment, to see the result, and because will be quick and easy.
In fact, in sh3.exe have two such tables, the two are identical.
First one is at: 0x530ac0 /or: 00130ac0
And I saw where is used in the code.
Second one, at: 0x5314f0 /or: 001314f0
I don't saw where is used. Maybe is not used.
It is matter of experiment, are it also need to be changed, if I change the first one.
By address of the first one you can search where is used in the code section.
In this function, for example:
Code:
0x506FCE: 53 PUSH EBX ; <==0x00506FC7(*-0x7)
0x506FCF: 33DB XOR EBX,EBX
0x506FD1: 85ED TEST EBP,EBP
0x506FD3: 0F8EA8000000 JLE 0x507081 ; (*+0xAE)
0x506FD9: 56 PUSH ESI
0x506FDA: 57 PUSH EDI
0x506FDB: EB03 JMP 0x506FE0 ; (*+0x5)
0x506FDD: 8D4900 LEA ECX,[ECX]
0x506FE0: 8B44241C MOV EAX,DWORD PTR [ESP+0x1C]; <==0x00506FDB(*-0x5), 0x00507079(*+0x99)
0x506FE4: D90498 FLD DWORD PTR [EAX+EBX*4]
0x506FE7: D9542410 FST DWORD PTR [ESP+0x10]
0x506FEB: D81DC00E5300 FCOMP DWORD PTR [0x530EC0]; .rdata:0x00 0x80 0xBB 0xC4
0x506FF1: DFE0 FNSTSW AX
0x506FF3: F6C441 TEST AH,0x41
0x506FF6: 7A04 JPE 0x506FFC ; (*+0x6)
0x506FF8: 32C0 XOR AL,AL
0x506FFA: EB77 JMP 0x507073 ; (*+0x79)
0x506FFC: D9442410 FLD DWORD PTR [ESP+0x10]; <==0x00506FF6(*-0x6)
0x507000: D81DA8AA5200 FCOMP DWORD PTR [0x52AAA8]; .rdata:0x00 0x00 0xFA 0x45
0x507006: DFE0 FNSTSW AX
0x507008: F6C401 TEST AH,0x1
0x50700B: 7504 JNZ 0x507011 ; (*+0x6)
0x50700D: 0CFF OR AL,0xFF
0x50700F: EB62 JMP 0x507073 ; (*+0x64)
0x507011: D9442410 FLD DWORD PTR [ESP+0x10]; <==0x0050700B(*-0x6)
0x507015: D81DACDA5100 FCOMP DWORD PTR [0x51DAAC]
0x50701B: DFE0 FNSTSW AX
0x50701D: F6C441 TEST AH,0x41
0x507020: 7A0C JPE 0x50702E ; (*+0xE)
0x507022: BFC00A5300 MOV EDI,0x530AC0 ; .rdata:0x00 0x80 0xBB 0xC4
0x507027: BE2F000000 MOV ESI,0x2F
0x50702C: EB0A JMP 0x507038 ; (*+0xC)
0x50702E: BF800B5300 MOV EDI,0x530B80 ; .rdata:0x00 0x00 0x80 0x40 ; <==0x00507020(*-0xE)
0x507033: BECF000000 MOV ESI,0xCF
0x507038: D9442410 FLD DWORD PTR [ESP+0x10]; <==0x0050702C(*-0xC), 0x00507063(*+0x2B)
0x50703C: 8D46FF LEA EAX,[ESI-0x1]
0x50703F: 99 CDQ
0x507040: 2BC2 SUB EAX,EDX
0x507042: 8BC8 MOV ECX,EAX
0x507044: D1F9 SAR ECX,1
0x507046: D81C8F FCOMP DWORD PTR [EDI+ECX*4]
0x507049: DFE0 FNSTSW AX
0x50704E: 7A05 JPE 0x507055 ; (*+0x7)
0x507050: 8D7101 LEA ESI,[ECX+0x1]
0x507053: EB0B JMP 0x507060 ; (*+0xD)
0x507055: 83CAFF OR EDX,0xFF ; <==0x0050704E(*-0x7)
0x507058: 2BD1 SUB EDX,ECX
0x50705A: 8D7C8F04 LEA EDI,[EDI+ECX*4+0x4]
0x50705E: 03F2 ADD ESI,EDX
0x507060: 83FE01 CMP ESI,0x1 ; <==0x00507053(*-0xD)
0x507063: 7FD3 JG 0x507038 ; (*-0x2B)
0x507065: 8B4C2414 MOV ECX,DWORD PTR [ESP+0x14]
0x507069: 8BC7 MOV EAX,EDI
0x50706B: 2DC00A5300 SUB EAX,0x530AC0 ; .rdata:0x00 0x80 0xBB 0xC4
0x507070: C1F802 SAR EAX,0x2
0x507073: 88040B MOV BYTE PTR [EBX+ECX],AL; <==0x00506FFA(*-0x79), 0x0050700F(*-0x64)
0x507076: 43 INC EBX
0x507077: 3BDD CMP EBX,EBP
0x507079: 0F8C61FFFFFF JL 0x506FE0 ; (*-0x99)
0x50707F: 5F POP EDI
0x507080: 5E POP ESI
0x507081: 5B POP EBX ; <==0x00506FD3(*-0xAE)
0x507082: 8BC1 MOV EAX,ECX
0x507084: 5D POP EBP
0x507085: 83C408 ADD ESP,0x8
0x507088: C3 RET
Maybe is possible, let's say, to prioritise the underwater and to simplify the above water terrain. If give it more indexes.
Of course, this will require completely new map and elevations table, if now give 208 to the underwater and 48 to the ground:
The most of the world will go underwater (Sci-Fi mod: Waterworld
).
To better understand it, I need to run it through debugger, but I will not.
Maybe is possible, this 601x601 also to be changed, I think, I once saw this somewhere there.
So, probably many things are possible if someone have desire to do it.