But using the method of Bigchillghost I got a bunch of 10 H2O files very quickly which resulted in:
.
Yeah, thanks! Best choice - for me at least!Bigchillghost wrote: ↑Fri Feb 19, 2021 1:25 pmThere seems to always be a 0x130-byte header before the vertices block, with the fixed signature 70 01 95 00. So if you must do it by searching for a signature, this should be a good choice.

Took me 15 minutes of expanding my (obsolete) Make_H2O code (and 10 minutes of debugging

(uvs and normals not handled; (.._8.H2O discarded, see code) )
Code: Select all
void SM_of_Fahrenheit_loop(HWND hwnd, char szPathname[], DWORD dwStart) //
{ //
char * pFBuf, szNo[4], * pTmp ;
BYTE cnt, cntMax ;
int nValue[16] ;
DWORD FIcnt, dwFaceIndCnt[100], vCnt, dwVertsCnt[100] ;
DWORD addrFI, addrUV, addrV, j=0, offs2 ; //
DWORD addr[100] ; //
char lines[6][20]= {"","Vb1","16 99","","021000",""} ;
bool bStop= false ;
pFBuf = (char *) lpFBuf ; pTmp= pFBuf ;
if ((*pFBuf&255)!=0x44) { //
chMB("This doesn't seem to be a 'Fahrenheit' file!") ; return ;
}
SendMessage(GetDlgItem(hwnd, ID_LIST), LB_ADDSTRING, 0, (LPARAM) " creating H2O files:") ;
cnt= 0 ;
do { //
nValue[0]= 0x70; nValue[1]= 1; nValue[2]= 0x95; nValue[3]= 0; // assumed signature of magic table
offs2 = FindBytes(lpFBuf, j, dwFileSize-j, nValue, 4) ;
if (offs2!=0) {
pFBuf += offs2 ; j += offs2 ;
addr[cnt]= j +32 ; // vertex count und face index count
fprintf(stream, "70019500...: %x\n", j) ;
pFBuf += 4 ; j += 4 ; // skip signature bytes
}
else bStop= true ;
cnt++ ; // next submesh
} while (!bStop&&(j<dwFileSize)) ;
//fprintf(stream, "\n assumed magic tables: %d\n", cnt-1) ; //
cntMax= cnt-1 ; addrUV= 0 ; cnt= 0 ;
do {
pFBuf= pTmp ; pFBuf += addr[cnt] ; j = addr[cnt] ; // vor auf DW vCnt
GetDW(pFBuf, j, vCnt, false) ; dwVertsCnt[cnt]= vCnt ;
addrV= addr[cnt] + 17*16; // 0x130 bytes header, 32+17*16
GetDW(pFBuf, j, FIcnt, false) ; dwFaceIndCnt[cnt]= FIcnt ;
addrFI = addrV + 40* vCnt ; // always 40? 48 required for .._8.H2O
pFBuf= pTmp ; pFBuf += addrFI ;
while (*pFBuf==0x2D) { pFBuf++ ; addrFI++;} // risky!! skipping the padding
fprintf(stream, "FI: %d, v: %d\n", FIcnt, dwVertsCnt[cnt]) ;
//fprintf(stream, "g SM_%d\n# at 0x%x (FIs at 0x%x)\n", cnt, addrV, addrFI) ;
_itoa(cnt, szNo, 10) ;
if (create_H2O(szPathname, cnt, lines, addrFI, dwFaceIndCnt[cnt], addrUV, 255, addrV, dwVertsCnt[cnt], 2) )
SendMessage(GetDlgItem(hwnd, ID_LIST), LB_ADDSTRING, 0, (LPARAM) szNo) ;
else SendMessage(GetDlgItem(hwnd, ID_LIST), LB_ADDSTRING, 0, (LPARAM) " failed") ;
cnt++ ;
} while (cnt<cntMax) ;
//fprintf(stream, "\n vertex blocks: %d, vMax: %d\n", cnt, vMax) ;
if (strlen(szErrMess)>17) MessageBox(NULL, szErrMess, "error", MB_ICONINFORMATION);
}