mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added support for editor.msg to message_str_game
Edits to header files.
This commit is contained in:
@@ -121,9 +121,12 @@
|
|||||||
#define MSGBOX_YESNO (0x10) // use YES/NO buttons instead of DONE
|
#define MSGBOX_YESNO (0x10) // use YES/NO buttons instead of DONE
|
||||||
#define MSGBOX_CLEAN (0x20) // no buttons
|
#define MSGBOX_CLEAN (0x20) // no buttons
|
||||||
|
|
||||||
// remove inven obj defines for the 4th argument to HOOK_REMOVEINVOBJ
|
// Some possible defines for the 4th argument to HOOK_REMOVEINVOBJ
|
||||||
|
#define RMOBJ_DROP 4831349 // If the object is dropped manually by the player from the inventory screen
|
||||||
|
#define RMOBJ_TRADE 4683293 // If the object is offered up as a trade
|
||||||
|
#define RMOBJ_DROPMULTI 4571599 // When dropping a part of a stack (RMOBJ_DROP occurs first)
|
||||||
#define RMOBJ_CONSUME_DRUG 4666772 // (inven_action_cursor_)
|
#define RMOBJ_CONSUME_DRUG 4666772 // (inven_action_cursor_)
|
||||||
#define RMOBJ_CONTAINER 4683293 // same as RMOBJ_TRADE (item_move_func_)
|
//#define RMOBJ_CONTAINER 4683293 // same as RMOBJ_TRADE (item_move_func_)
|
||||||
#define RMOBJ_USE_OBJ 4666865 // (inven_action_cursor_)
|
#define RMOBJ_USE_OBJ 4666865 // (inven_action_cursor_)
|
||||||
#define RMOBJ_EQUIP_ARMOR 4658121 // (inven_pickup_)
|
#define RMOBJ_EQUIP_ARMOR 4658121 // (inven_pickup_)
|
||||||
#define RMOBJ_EQUIP_WEAPON 4658675 // (switch_hand_)
|
#define RMOBJ_EQUIP_WEAPON 4658675 // (switch_hand_)
|
||||||
|
|||||||
@@ -104,11 +104,6 @@
|
|||||||
#define ATKTYPE_HOOKKICK (18)
|
#define ATKTYPE_HOOKKICK (18)
|
||||||
#define ATKTYPE_PIERCINGKICK (19)
|
#define ATKTYPE_PIERCINGKICK (19)
|
||||||
|
|
||||||
// Some possible values for the 4th argument to hs_removeinvobj
|
|
||||||
#define RMOBJ_DROP (0x49B875) // If the object is dropped manually by the player from the inventory screen
|
|
||||||
#define RMOBJ_TRADE (0x47761D) // If the object is offered up as a trade
|
|
||||||
#define RMOBJ_DROPMULTI (0x45C1CF) // When dropping a part of a stack (RMOBJ_DROP occurs first)
|
|
||||||
|
|
||||||
// Return values for "typeof"
|
// Return values for "typeof"
|
||||||
#define VALTYPE_NONE (0) // not used yet
|
#define VALTYPE_NONE (0) // not used yet
|
||||||
#define VALTYPE_INT (1)
|
#define VALTYPE_INT (1)
|
||||||
@@ -191,6 +186,7 @@
|
|||||||
#define GAME_MSG_STAT (17)
|
#define GAME_MSG_STAT (17)
|
||||||
#define GAME_MSG_TRAIT (18)
|
#define GAME_MSG_TRAIT (18)
|
||||||
#define GAME_MSG_WORLDMAP (19)
|
#define GAME_MSG_WORLDMAP (19)
|
||||||
|
#define GAME_MSG_EDITOR (20)
|
||||||
#define GAME_MSG_PRO_ITEM (0x1000)
|
#define GAME_MSG_PRO_ITEM (0x1000)
|
||||||
#define GAME_MSG_PRO_CRIT (0x1001)
|
#define GAME_MSG_PRO_CRIT (0x1001)
|
||||||
#define GAME_MSG_PRO_SCEN (0x1002)
|
#define GAME_MSG_PRO_SCEN (0x1002)
|
||||||
@@ -231,6 +227,7 @@
|
|||||||
#define mstr_stat(x) (message_str_game(GAME_MSG_STAT, x))
|
#define mstr_stat(x) (message_str_game(GAME_MSG_STAT, x))
|
||||||
#define mstr_trait(x) (message_str_game(GAME_MSG_TRAIT, x))
|
#define mstr_trait(x) (message_str_game(GAME_MSG_TRAIT, x))
|
||||||
#define mstr_worldmap(x) (message_str_game(GAME_MSG_WORLDMAP, x))
|
#define mstr_worldmap(x) (message_str_game(GAME_MSG_WORLDMAP, x))
|
||||||
|
#define mstr_character(x) (message_str_game(GAME_MSG_EDITOR, x))
|
||||||
|
|
||||||
|
|
||||||
#define BLOCKING_TYPE_BLOCK (0)
|
#define BLOCKING_TYPE_BLOCK (0)
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ const fo::MessageList* Message::gameMsgFiles[] = {
|
|||||||
CASTMSG(MSG_FILE_SKILLDEX),
|
CASTMSG(MSG_FILE_SKILLDEX),
|
||||||
CASTMSG(MSG_FILE_STAT),
|
CASTMSG(MSG_FILE_STAT),
|
||||||
CASTMSG(MSG_FILE_TRAIT),
|
CASTMSG(MSG_FILE_TRAIT),
|
||||||
CASTMSG(MSG_FILE_WORLDMAP)
|
CASTMSG(MSG_FILE_WORLDMAP),
|
||||||
|
CASTMSG(MSG_FILE_EDITOR)
|
||||||
};
|
};
|
||||||
#undef CASTMSG
|
#undef CASTMSG
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace sfall
|
|||||||
#define MSG_FILE_STAT (0x66817C)
|
#define MSG_FILE_STAT (0x66817C)
|
||||||
#define MSG_FILE_TRAIT (0x66BE38)
|
#define MSG_FILE_TRAIT (0x66BE38)
|
||||||
#define MSG_FILE_WORLDMAP (0x672FB0)
|
#define MSG_FILE_WORLDMAP (0x672FB0)
|
||||||
|
#define MSG_FILE_EDITOR (0x56FCA8)
|
||||||
|
|
||||||
typedef std::tr1::unordered_map<int, fo::MessageList*> ExtraGameMessageListsMap;
|
typedef std::tr1::unordered_map<int, fo::MessageList*> ExtraGameMessageListsMap;
|
||||||
|
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ void op_message_str_game(OpcodeContext& ctx) {
|
|||||||
int fileId = ctx.arg(0).rawValue();
|
int fileId = ctx.arg(0).rawValue();
|
||||||
if (fileId >= 0) {
|
if (fileId >= 0) {
|
||||||
int msgId = ctx.arg(1).rawValue();
|
int msgId = ctx.arg(1).rawValue();
|
||||||
if (fileId < 20) { // main msg files
|
if (fileId <= 20) { // main msg files
|
||||||
msg = fo::util::GetMessageStr(Message::gameMsgFiles[fileId], msgId);
|
msg = fo::util::GetMessageStr(Message::gameMsgFiles[fileId], msgId);
|
||||||
} else if (fileId >= 0x1000 && fileId <= 0x1005) { // proto msg files
|
} else if (fileId >= 0x1000 && fileId <= 0x1005) { // proto msg files
|
||||||
msg = fo::util::GetMessageStr(&fo::ptr::proto_msg_files[fileId - 0x1000], msgId);
|
msg = fo::util::GetMessageStr(&fo::ptr::proto_msg_files[fileId - 0x1000], msgId);
|
||||||
|
|||||||
Reference in New Issue
Block a user