Beispiel #1
0
void initFilesystem()
{
/*
при смене карты
MSG_USE_MAP приходит всем, клиентам включая сервак
устанавливает в gameFlags флаг необходимости загрузки
затем в главном цикле при проверке флага загружает данные

*/
	InjectOffs(0x004AB7FD+1,&clientWriteChunk);
	InjectOffs(0x004AB8BC+1,&clientWriteChunk);
	InjectOffs(0x004ABD64+1,&clientOpenFile);
	InjectOffs(0x0043DEF6+1,&mapValidate);
	
	InjectOffs(0x0051A0A1+1,&serverTransferPrepair);
	
	InjectOffs(0x00519AA7+1,&serverTransferStart);

	ASSIGN(mapFileHandle,0x007141D4);
	ASSIGN(noxWriteToFile,0x00565A02);
	ASSIGN(noxFopen,0x0056586C);
	ASSIGN(noxFclose,0x00407533);
	ASSIGN(mapValidateMB,0x004CF470);
	ASSIGN(mapFileDataServ,0x0081B834);
	ASSIGN(mapFileSizeServ,0x0081B838);

	lua_newtable(L);/// в эту таблицу будем что-нить класть если ведем глобальный поиск
	lua_pushcclosure(L,&bz2Loader,1);
	lua_setglobal(L,"bz2Loader");
	lua_register(L,"fileLoad",&loadFileL);
	
}
Beispiel #2
0
void guiInit()
{
    ImageUtilInit();
    ASSIGN(noxGuiDrawCursor,0x00477830);
    ASSIGN(screenGetSize,0x00430C50);
    ASSIGN(guiFontPtrByName,0x0043F360);
    ASSIGN(noxGuiFontHeightMB,0x0043F320);
    ASSIGN(noxSub_43F670,0x43F670);
    ASSIGN(noxDrawGetStringSize,0x0043F840);
    ASSIGN(noxSetRectColorMB,0x00434460);
    ASSIGN(noxDrawRect,0x0049CE30);
    ASSIGN(noxDrawRectAlpha,0x0049CF10);

    ASSIGN(noxDrawListBoxWithImage,0x004A3FC0);
    ASSIGN(noxDrawListBoxNoImage,0x004A3C50);

    ASSIGN(noxRasterDrawLines,0x0049E4B0);
    ASSIGN(noxRasterPointRel,0x0049F570);
    ASSIGN(noxRasterPoint,0x0049F500);

    InjectOffs(0x0043E71A+1,&myWndDrawAll);

    registerclient("cliDrawLines",&drawLines);
    registerclient("cliFloorLines",&drawFloorLines);
    registerclient("cliDelLines",&delLines);
    registerclient("cliFloorToCursor",&drawFloorToCursor);


    registerclient("cliPlayerMouse",&cliPlayerMouseL);
    registerclient("screenGetPos",screenGetPosL);
    registerclient("screenGetSize",screenGetSizeL);
    registerclient("posWorldToScreen",posWorldToScreenL);
    registerclient("stringDraw",stringDrawL);
    registerclient("stringGetSize",stringGetSizeL);

}