Exemplo n.º 1
0
ScriptEventList* Script::CreateEventList(void)
{
#if RUNTIME_VERSION == RUNTIME_VERSION_1_4_0_525
    return (ScriptEventList*)ThisStdCall(0x005ABF60, this);	// 4th sub above Script::Execute (was 1st above in Oblivion) Execute is the second to last call in Run
#elif RUNTIME_VERSION == RUNTIME_VERSION_1_4_0_525ng
    return (ScriptEventList*)ThisStdCall(0x005AC110, this);	// 4th sub above Script::Execute (was 1st above in Oblivion) Execute is the second to last call in Run
#else
#error
#endif
}
Exemplo n.º 2
0
void Tile::UpdateString(UInt32 valueType, const char* newValue)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_1
	ThisStdCall(0x57FF10, this, valueType, newValue);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2
	ThisStdCall(0x58CE30, this, valueType, newValue);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	ThisStdCall(0x58CED0, this, valueType, newValue);
#else
#error unsupported Oblivion version
#endif
}
Exemplo n.º 3
0
Tile * Tile::ReadXML(const char * xmlPath)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_1
	return (Tile *)ThisStdCall(0x00583410, this, xmlPath);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	return (Tile *)ThisStdCall(0x00590420, this, xmlPath);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2
	return (Tile *)ThisStdCall(0x00590380, this, xmlPath);
#else
#error unsupported Oblivion version
#endif
}
Exemplo n.º 4
0
void PlayerCharacter::TogglePOV(bool bFirstPerson)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_1
	ThisStdCall(0x00655560, this, bFirstPerson);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2
	ThisStdCall(0x0066C040, this, bFirstPerson);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	ThisStdCall(0x0066C580, this, bFirstPerson);
#else
#error unsupported Oblivion version 
#endif
}
Exemplo n.º 5
0
static bool Cmd_PlayIdle_Execute(COMMAND_ARGS)
{
	UInt32 bForceIdle = 0;
	Actor* callingActor = NULL;
	TESForm* idleForm = NULL;
	*result = 0;

	if (!ExtractArgsEx(paramInfo, arg1, opcodeOffsetPtr, scriptObj, eventList, &idleForm, &bForceIdle))
		return true;

	switch (thisObj->typeID)
	{
	case kFormType_ACHR:
	case kFormType_ACRE:
		callingActor = OBLIVION_CAST(thisObj, TESObjectREFR, Actor);
		break;
	default:
		return true;
	}

	if (callingActor->process)
	{
		TESIdleForm* idle = OBLIVION_CAST(idleForm, TESForm, TESIdleForm);

		if (idle && idle->animModel.nifPath.m_data)
		{
			std::string str(idle->animModel.nifPath.m_data);
			if (str.find(".kf") != std::string::npos)
			{
				ActorAnimData* animData = (ActorAnimData*)ThisVirtualStdCall(0x00A6E074, 0x164, callingActor);
				if (animData)
				{						// ### TODO expose the gunk that follows
					if (!animData->unkC8[2] || (UInt32)animData->niNodes24[0] != (UInt32)idle)
					{
						UInt32 unk01 = animData->unkC8[1], unk02 = unk01 + 0x10, unk03 = ThisStdCall(0x00472EA0, animData);

						if (bForceIdle || !unk03 || (unk01 && (*((UInt32*)unk01 + 4) != 3 || (*((UInt32*)unk02) && !((UInt32*)unk02 + 0x24)))))
						{
							ThisStdCall(0x00477DB0, animData, idle, callingActor, (idle->animFlags & 0x7F), 3); // ActorAnimData::QueueIdle (probably)
							if (IsConsoleMode()) {
								Console_Print("PlayIdle >> %s on %08X", idle->animModel.nifPath.m_data, idle->refID);
							}
							*result = 1;
						}
					}
				}
			}
		}
	}

	return true;
}
Exemplo n.º 6
0
bool TES::GetTerrainHeight(float* posVec3, float* outHeight)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	return ThisStdCall(0x00440590, this, posVec3, outHeight) ? true : false;
#else
#error unsupported Oblivion version
#endif
}
Exemplo n.º 7
0
GridCellArray::GridEntry* GridCellArray::GetGridEntry(UInt32 x, UInt32 y)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	return (GridEntry*)ThisStdCall(0x00482150, this, x, y);
#else
#error unsupported oblivion version
#endif
}
Exemplo n.º 8
0
bool DataHandler::ConstructObject(ModEntry::Data* tesFile, bool unk1)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	return ThisStdCall(0x0044DCF0, this, tesFile, unk1) ? true : false;
#else
#error unsupported oblivion version
#endif
}
Exemplo n.º 9
0
void Tile::DoActionEnumeration()
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	ThisStdCall(0x58BEE0, this, 1);
#else
#error unsupported Oblivion version
#endif
}
Exemplo n.º 10
0
TESObjectREFR* TESObjectREFR::Create(bool bTemp)
{
	TESObjectREFR* refr = (TESObjectREFR*)FormHeap_Allocate(sizeof(TESObjectREFR));
	ThisStdCall(s_TESObject_REFR_init, refr);
	if (bTemp)
		CALL_MEMBER_FN(refr, MarkAsTemporary);
	return refr;
}
Exemplo n.º 11
0
void ActiveEffect::Remove(bool bRemoveImmediately)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	ThisStdCall(0x0068EA10, this, bRemoveImmediately);
#else
#error unsupported oblivion version
#endif
}
Exemplo n.º 12
0
TESForm* TESObjectREFR::GetInventoryItem(UInt32 itemIndex, bool bGetWares)
{
	//if getWares == true, looks up info in g_DataHandler->unkCDC

	ExtraContainerChanges::EntryData* data;

#if OBLIVION_VERSION == OBLIVION_VERSION_1_1
	data = (ExtraContainerChanges::EntryData*)ThisStdCall(0x4CEB10, this, itemIndex, bGetWares);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2
	data = (ExtraContainerChanges::EntryData*)ThisStdCall(0x4D88E0, this, itemIndex, bGetWares);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	data = (ExtraContainerChanges::EntryData*)ThisStdCall(0x4D88F0, this, itemIndex, bGetWares);
#else
	#error unsupported Oblivion version
#endif

	if (data)
		return data->type;
	else
		return NULL;
}
Exemplo n.º 13
0
void Tile::UpdateFloat(UInt32 valueType, float newValue)
{
#if OBLIVION_VERSION == OBLIVION_VERSION_1_1
	ThisStdCall(0x57FEF0, this, valueType, newValue);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2
	ThisStdCall(0x58CE10, this, valueType, newValue);
#elif OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	//	ThisStdCall() doesn't handle floating point args correctly
	// do it in asm

	static UInt32 callAddr = 0x0058CEB0;
	__asm
	{
		fld		[newValue]
		push	ecx
		fstp	[esp+0]
		mov		ecx, this
		push	[valueType]
		call	[callAddr]
	}
#else
#error unsupported Oblivion version
#endif
}
Exemplo n.º 14
0
bool PlayerCharacter::SetActiveSpell(MagicItem * item)
{
	return ThisStdCall(s_PlayerCharacter_SetActiveSpell, this, item) != 0;
}
Exemplo n.º 15
0
UInt32 Actor::GetBaseActorValue(UInt32 value)
{
	return ThisStdCall(s_Actor_GetBaseActorValue, this, value);
}
Exemplo n.º 16
0
void Actor::EquipItem(TESObjectREFR * objType, UInt32 unk1, UInt32 unk2, UInt32 unk3, bool lockEquip)
{
	ThisStdCall(s_Actor_EquipItem, this, objType, unk1, unk2, unk3, lockEquip);
}
Exemplo n.º 17
0
void NiObjectNET::SetName(const char* newName)
{
    ThisStdCall(kNiObjectNET_SetNameAddr, this, newName);
}
Exemplo n.º 18
0
TESContainer* TESObjectREFR::GetContainer()
{
	return (TESContainer*)ThisStdCall(s_TESObjectREFR__GetContainer, this);	// First call in REFR::RemoveItem
}
Exemplo n.º 19
0
void Actor::UnequipItem(TESForm* objType, UInt32 unk1, ExtraDataList* itemExtraList, UInt32 unk3, bool lockUnequip, UInt32 unk5)
{
	ThisStdCall(s_Actor_UnequipItem, this, objType, unk1, itemExtraList, unk3, lockUnequip, unk5);
}
Exemplo n.º 20
0
void Sky::RefreshClimate(TESClimate * climate, UInt32 unk1)
{
	ThisStdCall(s_Sky_RefreshClimate, this, climate, unk1);
}
Exemplo n.º 21
0
void Actor::EquipItem(TESForm * objType, UInt32 equipCount, ExtraDataList* itemExtraList, UInt32 unk3, bool lockEquip, UInt32 unk5)
{
	ThisStdCall(s_Actor_EquipItem, this, objType, equipCount, itemExtraList, unk3, lockEquip, unk5);
}