parent
5e9cf96106
commit
fa475c754e
|
@ -6002,6 +6002,11 @@ void _combatKillCritterOutsideCombat(Object* critter_obj, char* msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int combatGetTargetHighlight()
|
||||||
|
{
|
||||||
|
return _combat_highlight;
|
||||||
|
}
|
||||||
|
|
||||||
static void criticalsInit()
|
static void criticalsInit()
|
||||||
{
|
{
|
||||||
int mode = 2;
|
int mode = 2;
|
||||||
|
|
|
@ -58,6 +58,7 @@ int _combat_explode_scenery(Object* a1, Object* a2);
|
||||||
void _combat_delete_critter(Object* obj);
|
void _combat_delete_critter(Object* obj);
|
||||||
void _combatKillCritterOutsideCombat(Object* critter_obj, char* msg);
|
void _combatKillCritterOutsideCombat(Object* critter_obj, char* msg);
|
||||||
|
|
||||||
|
int combatGetTargetHighlight();
|
||||||
int criticalsGetValue(int killType, int hitLocation, int effect, int dataMember);
|
int criticalsGetValue(int killType, int hitLocation, int effect, int dataMember);
|
||||||
void criticalsSetValue(int killType, int hitLocation, int effect, int dataMember, int value);
|
void criticalsSetValue(int killType, int hitLocation, int effect, int dataMember, int value);
|
||||||
void criticalsResetValue(int killType, int hitLocation, int effect, int dataMember);
|
void criticalsResetValue(int killType, int hitLocation, int effect, int dataMember);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#include "sfall_opcodes.h"
|
#include "sfall_opcodes.h"
|
||||||
|
|
||||||
#include "art.h"
|
#include "art.h"
|
||||||
|
#include "combat.h"
|
||||||
|
#include "debug.h"
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
#include "interpreter.h"
|
#include "interpreter.h"
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
@ -13,6 +15,24 @@
|
||||||
|
|
||||||
namespace fallout {
|
namespace fallout {
|
||||||
|
|
||||||
|
// read_byte
|
||||||
|
static void opReadByte(Program* program)
|
||||||
|
{
|
||||||
|
int addr = programStackPopInteger(program);
|
||||||
|
|
||||||
|
int value = 0;
|
||||||
|
switch (addr) {
|
||||||
|
case 0x56D38C:
|
||||||
|
value = combatGetTargetHighlight();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
debugPrint("%s: attempt to 'read_byte' at 0x%x", program->name, addr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
programStackPushInteger(program, value);
|
||||||
|
}
|
||||||
|
|
||||||
// set_pc_extra_stat
|
// set_pc_extra_stat
|
||||||
static void opSetPcBonusStat(Program* program)
|
static void opSetPcBonusStat(Program* program)
|
||||||
{
|
{
|
||||||
|
@ -224,6 +244,7 @@ static void opArtExists(Program* program)
|
||||||
|
|
||||||
void sfallOpcodesInit()
|
void sfallOpcodesInit()
|
||||||
{
|
{
|
||||||
|
interpreterRegisterOpcode(0x8156, opReadByte);
|
||||||
interpreterRegisterOpcode(0x815B, opSetPcBonusStat);
|
interpreterRegisterOpcode(0x815B, opSetPcBonusStat);
|
||||||
interpreterRegisterOpcode(0x815D, opGetPcBonusStat);
|
interpreterRegisterOpcode(0x815D, opGetPcBonusStat);
|
||||||
interpreterRegisterOpcode(0x8193, opGetCurrentHand);
|
interpreterRegisterOpcode(0x8193, opGetCurrentHand);
|
||||||
|
|
Loading…
Reference in New Issue