mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-03 08:40:59 +00:00
GLK: COMPREHEND: Field renamings for Transylvania monsters
This commit is contained in:
parent
cf1f157f9f
commit
2527b97605
engines/glk
@ -315,22 +315,22 @@ extern void gs_set_object_seen(sc_gameref_t gs, sc_int object, sc_bool seen);
|
||||
extern void gs_set_object_unmoved(sc_gameref_t gs,
|
||||
sc_int object, sc_bool unmoved);
|
||||
extern void gs_set_object_static_unmoved(sc_gameref_t gs,
|
||||
sc_int object, sc_bool unmoved);
|
||||
sc_int _object, sc_bool unmoved);
|
||||
extern sc_int gs_object_openness(sc_gameref_t gs, sc_int object);
|
||||
extern sc_int gs_object_state(sc_gameref_t gs, sc_int object);
|
||||
extern sc_bool gs_object_seen(sc_gameref_t gs, sc_int object);
|
||||
extern sc_bool gs_object_unmoved(sc_gameref_t gs, sc_int object);
|
||||
extern sc_bool gs_object_static_unmoved(sc_gameref_t gs, sc_int object);
|
||||
extern sc_int gs_object_position(sc_gameref_t gs, sc_int object);
|
||||
extern sc_int gs_object_parent(sc_gameref_t gs, sc_int object);
|
||||
extern void gs_object_move_onto(sc_gameref_t gs, sc_int object, sc_int onto);
|
||||
extern void gs_object_move_into(sc_gameref_t gs, sc_int object, sc_int into);
|
||||
extern void gs_object_make_hidden(sc_gameref_t gs, sc_int object);
|
||||
extern void gs_object_player_get(sc_gameref_t gs, sc_int object);
|
||||
extern sc_int gs_object_state(sc_gameref_t gs, sc_int _object);
|
||||
extern sc_bool gs_object_seen(sc_gameref_t gs, sc_int _object);
|
||||
extern sc_bool gs_object_unmoved(sc_gameref_t gs, sc_int _object);
|
||||
extern sc_bool gs_object_static_unmoved(sc_gameref_t gs, sc_int _object);
|
||||
extern sc_int gs_object_position(sc_gameref_t gs, sc_int _object);
|
||||
extern sc_int gs_object_parent(sc_gameref_t gs, sc_int _object);
|
||||
extern void gs_object_move_onto(sc_gameref_t gs, sc_int _object, sc_int onto);
|
||||
extern void gs_object_move_into(sc_gameref_t gs, sc_int _object, sc_int into);
|
||||
extern void gs_object_make_hidden(sc_gameref_t gs, sc_int _object);
|
||||
extern void gs_object_player_get(sc_gameref_t gs, sc_int _object);
|
||||
extern void gs_object_npc_get(sc_gameref_t gs, sc_int object, sc_int npc);
|
||||
extern void gs_object_player_wear(sc_gameref_t gs, sc_int object);
|
||||
extern void gs_object_npc_wear(sc_gameref_t gs, sc_int object, sc_int npc);
|
||||
extern void gs_object_to_room(sc_gameref_t gs, sc_int object, sc_int room);
|
||||
extern void gs_object_to_room(sc_gameref_t gs, sc_int _object, sc_int room);
|
||||
extern sc_int gs_npc_count(sc_gameref_t gs);
|
||||
extern void gs_set_npc_location(sc_gameref_t gs, sc_int npc, sc_int _location);
|
||||
extern sc_int gs_npc_location(sc_gameref_t gs, sc_int npc);
|
||||
@ -707,31 +707,31 @@ enum {
|
||||
};
|
||||
|
||||
extern sc_bool obj_is_static(sc_gameref_t game, sc_int object);
|
||||
extern sc_bool obj_is_container(sc_gameref_t game, sc_int object);
|
||||
extern sc_bool obj_is_container(sc_gameref_t game, sc_int _object);
|
||||
extern sc_bool obj_is_surface(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_container_object(sc_gameref_t game, sc_int n);
|
||||
extern sc_int obj_surface_object(sc_gameref_t game, sc_int n);
|
||||
extern sc_bool obj_indirectly_in_room(sc_gameref_t game,
|
||||
sc_int object, sc_int Room);
|
||||
sc_int _object, sc_int Room);
|
||||
extern sc_bool obj_indirectly_held_by_player(sc_gameref_t game, sc_int object);
|
||||
extern sc_bool obj_directly_in_room(sc_gameref_t game,
|
||||
sc_int object, sc_int Room);
|
||||
sc_int _object, sc_int Room);
|
||||
extern sc_int obj_stateful_object(sc_gameref_t game, sc_int n);
|
||||
extern sc_int obj_dynamic_object(sc_gameref_t game, sc_int n);
|
||||
extern sc_int obj_wearable_object(sc_gameref_t game, sc_int n);
|
||||
extern sc_int obj_standable_object(sc_gameref_t game, sc_int n);
|
||||
extern sc_int obj_get_size(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_get_weight(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_get_weight(sc_gameref_t game, sc_int _object);
|
||||
extern sc_int obj_get_player_size_limit(sc_gameref_t game);
|
||||
extern sc_int obj_get_player_weight_limit(sc_gameref_t game);
|
||||
extern sc_int obj_get_container_maxsize(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_get_container_capacity(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_lieable_object(sc_gameref_t game, sc_int n);
|
||||
extern sc_bool obj_appears_plural(sc_gameref_t game, sc_int object);
|
||||
extern sc_bool obj_appears_plural(sc_gameref_t game, sc_int _object);
|
||||
extern void obj_setup_initial(sc_gameref_t game);
|
||||
extern sc_int obj_container_index(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_surface_index(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_stateful_index(sc_gameref_t game, sc_int object);
|
||||
extern sc_int obj_stateful_index(sc_gameref_t game, sc_int _object);
|
||||
extern sc_char *obj_state_name(sc_gameref_t game, sc_int object);
|
||||
extern sc_bool obj_shows_initial_description(sc_gameref_t game, sc_int object);
|
||||
extern void obj_turn_update(sc_gameref_t game);
|
||||
|
@ -70,21 +70,21 @@ void TransylvaniaGame::updateMonster(const TransylvaniaMonster *monsterInfo) {
|
||||
room = &_rooms[_currentRoom];
|
||||
turn_count = _variables[VAR_TURN_COUNT];
|
||||
|
||||
monster = get_item(monsterInfo->object);
|
||||
monster = get_item(monsterInfo->_object);
|
||||
if (monster->room == _currentRoom) {
|
||||
// The monster is in the current room - leave it there
|
||||
return;
|
||||
}
|
||||
|
||||
if ((room->flags & monsterInfo->room_allow_flag) &&
|
||||
!_flags[monsterInfo->dead_flag] &&
|
||||
turn_count > monsterInfo->min_turns_before) {
|
||||
if ((room->flags & monsterInfo->_roomAllowFlag) &&
|
||||
!_flags[monsterInfo->_deadFlag] &&
|
||||
turn_count > monsterInfo->_minTurnsBefore) {
|
||||
/*
|
||||
* The monster is alive and allowed to move to the current
|
||||
* room. Randomly decide whether on not to. If not, move
|
||||
* it back to limbo.
|
||||
*/
|
||||
if ((g_comprehend->getRandomNumber(0x7fffffff) % monsterInfo->randomness) == 0) {
|
||||
if ((g_comprehend->getRandomNumber(0x7fffffff) % monsterInfo->_randomness) == 0) {
|
||||
move_object(monster, _currentRoom);
|
||||
_variables[0xf] = turn_count + 1;
|
||||
} else {
|
||||
|
@ -29,11 +29,11 @@ namespace Glk {
|
||||
namespace Comprehend {
|
||||
|
||||
struct TransylvaniaMonster {
|
||||
uint8 object;
|
||||
uint8 dead_flag;
|
||||
unsigned min_turns_before;
|
||||
unsigned room_allow_flag;
|
||||
unsigned randomness;
|
||||
uint8 _object;
|
||||
uint8 _deadFlag;
|
||||
unsigned _minTurnsBefore;
|
||||
unsigned _roomAllowFlag;
|
||||
unsigned _randomness;
|
||||
};
|
||||
|
||||
class TransylvaniaGame : public ComprehendGame {
|
||||
|
Loading…
x
Reference in New Issue
Block a user