engraving offsets for linux d16, attempt to fix MSVC bugs

develop
Petr Mrázek 2010-02-12 23:25:41 +00:00
parent 63f82cd580
commit de32b65c11
4 changed files with 124 additions and 102 deletions

@ -153,20 +153,22 @@ SHMProcess::SHMProcess(vector <memory_info> & known_versions)
char exe_link_name [256];
char target_name[1024];
int target_result;
do
{
// get server and client mutex
d->DFSVMutex = OpenMutex(SYNCHRONIZE,false, "DFSVMutex");
if(d->DFSVMutex == 0)
{
return;
break;
}
d->DFCLMutex = OpenMutex(SYNCHRONIZE,false, "DFCLMutex");
if(d->DFCLMutex == 0)
{
return;
break;
}
if(!attach())
{
return;
break;
}
// All seems to be OK so far. Attached and connected to something that looks like DF
@ -182,7 +184,7 @@ SHMProcess::SHMProcess(vector <memory_info> & known_versions)
d->DFSVMutex = 0;
CloseHandle(d->DFCLMutex);
d->DFCLMutex = 0;
return;
break;
}
if(!bridgeOK)
{
@ -194,7 +196,7 @@ SHMProcess::SHMProcess(vector <memory_info> & known_versions)
d->DFSVMutex = 0;
CloseHandle(d->DFCLMutex);
d->DFCLMutex = 0;
return;
break;
}
/*
* get the PID from DF
@ -263,9 +265,10 @@ SHMProcess::SHMProcess(vector <memory_info> & known_versions)
d->DFSVMutex = 0;
CloseHandle(d->DFCLMutex);
d->DFCLMutex = 0;
return;
break;
}
}
} while (0);
full_barrier
// at this point, DF is attached and suspended, make it run
detach();

@ -1678,6 +1678,11 @@
<Address name="pause_state">0x8F35800</Address> <!-- game is paused -->
<Address name="view_screen">0x878493c</Address> <!-- address of ptr to view screen object -->
<Address name="current_menu_state">0x8f467e0</Address> <!-- menu state - used to get out of menus with space key -->
<!-- engravings -->
<Address name="engravings_vector">0x8f468c0</Address>
<Offset name="engraving_xyz">0x0C</Offset> <!-- 3x word -->
<Offset name="engraving_imageindex">0x20</Offset> <!-- 1x dword -->
<VTable name="viewscreen_vtable">
<class vtable="0x086CA668" name="viewscreen_conversation" />
<class vtable="0x086D52A8" name="viewscreen_setupadventure" />

@ -159,6 +159,21 @@ void SHM_Act (void)
//MessageBox(0,"Broke out of loop properly","FUN", MB_OK);
break;
// client requests contents of STL string at address
/*case DFPP_READ_STL_STRING:
char * real = *(char **)((shm_read_small *)shm)->address;
strncpy(shm + SHM_HEADER,real,1024*1024-1);
full_barrier
((shm_retval *)shm)->pingpong = DFPP_RET_STRING;
goto check_again;
*/
// client requests contents of a C string at address, max length (0 means zero terminated)
/* case DFPP_READ_C_STRING:
break;
// sv -> cl length + string contents
// client wants to set STL string at address to something
case DFPP_WRITE_STL_STRING:
break;*/
default:
((shm_retval *)shm)->value = DFEE_INVALID_COMMAND;
full_barrier

@ -92,7 +92,6 @@ int main ()
DF.ReadStoneMatgloss(mat.stoneMat);
DF.ReadMetalMatgloss(mat.metalMat);
DF.ReadCreatureMatgloss(mat.creatureMat);
DF.ForceResume();
vector <string> objecttypes;
DF.getClassIDMapping(objecttypes);