Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ariadne.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ struct Ariadne { // sizeof = 102
struct Coord3d manoeuvre_requested_position;
unsigned char manoeuvre_state;
short wallhug_angle;
long straight_dist_to_next_waypoint;
int32_t straight_dist_to_next_waypoint;
};

struct PathWayPoint { // sizeof = 8
Expand Down Expand Up @@ -219,8 +219,8 @@ struct Navigation {
unsigned char wallhug_retry_counter;
unsigned char wallhug_state;
unsigned char push_counter;
long dist_to_final_pos;
long distance_to_next_pos;
int32_t dist_to_final_pos;
int32_t distance_to_next_pos;
int32_t angle;
SubtlCodedCoords first_colliding_block;
SubtlCodedCoords second_colliding_block;
Expand Down
2 changes: 1 addition & 1 deletion src/bflib_datetm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int debug_display_frametime = 0;
void initial_time_point()
{
initialized_time_point = TimeNow;
game.process_turn_time = 1.0; // Begin initial turn as soon as possible (like original game)
process_turn_time = 1.0; // Begin initial turn as soon as possible (like original game)
}

long double get_time_tick_ns()
Expand Down
52 changes: 26 additions & 26 deletions src/config_compp.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,38 +45,38 @@ extern "C" {
struct ComputerProcess {
char name[COMMAND_WORD_LEN];
char mnemonic[COMMAND_WORD_LEN];
long priority;
int32_t priority;
// Signed process config values
long process_configuration_value_2;
long process_configuration_value_3;
long process_configuration_value_4; /**< room kind or amount of creatures or gameturn or count of slabs */
long process_configuration_value_5;
int32_t process_configuration_value_2;
int32_t process_configuration_value_3;
int32_t process_configuration_value_4; /**< room kind or amount of creatures or gameturn or count of slabs */
int32_t process_configuration_value_5;
FuncIdx func_check;
FuncIdx func_setup;
FuncIdx func_task;
FuncIdx func_complete;
FuncIdx func_pause;
unsigned char parent;
// Unsigned process parameters storage (stores gameturns)
unsigned long process_parameter_1;
unsigned long process_parameter_2;
unsigned long process_parameter_3;
unsigned long last_run_turn;
uint32_t process_parameter_1;
uint32_t process_parameter_2;
uint32_t process_parameter_3;
uint32_t last_run_turn;
// Signed process parameters storage
long process_parameter_5;
unsigned long flags; /**< Values from ComProc_* enumeration. */
int32_t process_parameter_5;
uint32_t flags; /**< Values from ComProc_* enumeration. */
};

struct ComputerCheck {
char name[COMMAND_WORD_LEN];
char mnemonic[COMMAND_WORD_LEN];
unsigned long flags; /**< Values from ComChk_* enumeration. */
long turns_interval;
uint32_t flags; /**< Values from ComChk_* enumeration. */
int32_t turns_interval;
FuncIdx func;
long primary_parameter;
long secondary_parameter;
long tertiary_parameter;
long last_run_turn;
int32_t primary_parameter;
int32_t secondary_parameter;
int32_t tertiary_parameter;
int32_t last_run_turn;
};

struct ComputerEvent {
Expand All @@ -98,12 +98,12 @@ struct ComputerType {
char name[COMMAND_WORD_LEN];
short tooltip_stridx;
short sprite_idx;
long dig_stack_size;
long processes_time;
long click_rate;
long max_room_build_tasks;
long turn_begin;
long sim_before_dig;
int32_t dig_stack_size;
int32_t processes_time;
int32_t click_rate;
int32_t max_room_build_tasks;
int32_t turn_begin;
int32_t sim_before_dig;
GameTurnDelta drop_delay;
unsigned char processes[COMPUTER_PROCESSES_COUNT];
unsigned char checks[COMPUTER_CHECKS_COUNT];
Expand All @@ -119,9 +119,9 @@ struct ComputerPlayerConfig {
struct ComputerEvent event_types[COMPUTER_EVENTS_TYPES_COUNT];
int32_t computers_count;
struct ComputerType computer_types[COMPUTER_MODELS_COUNT];
long skirmish_first;
long skirmish_last;
long player_assist_default;
int32_t skirmish_first;
int32_t skirmish_last;
int32_t player_assist_default;
unsigned char computer_assist_types[COMPUTER_ASSIST_TYPES_COUNT];

};
Expand Down
8 changes: 4 additions & 4 deletions src/config_creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ struct CreatureJobConfig {
CrtrStateId initial_crstate;
/** The state creature should back to after job is interrupted. */
CrtrStateId continue_crstate;
unsigned long job_flags;
uint32_t job_flags;
};

struct CreatureAngerJobConfig {
Expand All @@ -251,8 +251,8 @@ struct CreatureAngerJobConfig {

struct CreatureModelConfig {
char name[COMMAND_WORD_LEN];
long namestr_idx;
unsigned long model_flags;
int32_t namestr_idx;
uint32_t model_flags;
unsigned short job_primary;
unsigned short job_secondary;
unsigned short jobs_not_do;
Expand Down Expand Up @@ -280,7 +280,7 @@ struct CreatureModelConfig {
short scavenger_cost;
short scavenge_require;
unsigned char scavenge_value;
unsigned long to_level[CREATURE_MAX_LEVEL];
uint32_t to_level[CREATURE_MAX_LEVEL];
unsigned char base_speed;
ThingModel grow_up;
CrtrExpLevel grow_up_level;
Expand Down
4 changes: 3 additions & 1 deletion src/config_magic.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,11 @@ typedef unsigned char (*Expand_Check_Func)(void);
/**
* Configuration parameters for powers.
*/
#pragma pack(1)
struct PowerConfigStats {
char code_name[COMMAND_WORD_LEN];
ThingModel artifact_model;
uint64_t can_cast_flags;
ThingModel artifact_model;
uint32_t config_flags;
unsigned char overcharge_check_idx;
uint32_t work_state;
Expand All @@ -347,6 +348,7 @@ struct PowerConfigStats {
GameTurnDelta duration;
int32_t strength[MAGIC_OVERCHARGE_LEVELS+1];
};
#pragma pack()

/**
* Configuration parameters for specials.
Expand Down
2 changes: 1 addition & 1 deletion src/config_slabsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern const struct ConfigFileData keeper_slabset_file_data;
extern const struct ConfigFileData keeper_columns_file_data;

struct ColumnConfig {
long columns_count;
int32_t columns_count;
struct Column cols[COLUMNS_COUNT];
};

Expand Down
34 changes: 17 additions & 17 deletions src/config_trapdoor.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ struct DoorConfigStats {
char code_name[COMMAND_WORD_LEN];
TextStringId name_stridx;
TextStringId tooltip_stridx;
long bigsym_sprite_idx;
long medsym_sprite_idx;
long pointer_sprite_idx;
long panel_tab_idx;
int32_t bigsym_sprite_idx;
int32_t medsym_sprite_idx;
int32_t pointer_sprite_idx;
int32_t panel_tab_idx;
unsigned char manufct_level;
unsigned long manufct_required;
uint32_t manufct_required;
HitPoints health;
unsigned short slbkind[2];
unsigned short open_speed;
Expand All @@ -65,12 +65,12 @@ struct TrapConfigStats {
char code_name[COMMAND_WORD_LEN];
TextStringId name_stridx;
TextStringId tooltip_stridx;
long bigsym_sprite_idx;
long medsym_sprite_idx;
long pointer_sprite_idx;
long panel_tab_idx;
int32_t bigsym_sprite_idx;
int32_t medsym_sprite_idx;
int32_t pointer_sprite_idx;
int32_t panel_tab_idx;
unsigned char manufct_level;
unsigned long manufct_required;
uint32_t manufct_required;
int shots;
GameTurnDelta shots_delay;
unsigned short initial_delay; // Trap is placed on reload phase, value in game turns.
Expand All @@ -94,13 +94,13 @@ struct TrapConfigStats {
EffectOrEffElModel destroyed_effect;
short size_xy;
short size_z;
unsigned long sprite_anim_idx;
unsigned long attack_sprite_anim_idx;
unsigned long recharge_sprite_anim_idx;
unsigned long sprite_size_max;
unsigned long anim_speed;
unsigned long attack_anim_speed;
unsigned long recharge_anim_speed;
uint32_t sprite_anim_idx;
uint32_t attack_sprite_anim_idx;
uint32_t recharge_sprite_anim_idx;
uint32_t sprite_size_max;
uint32_t anim_speed;
uint32_t attack_anim_speed;
uint32_t recharge_anim_speed;
unsigned char unanimated;
unsigned char unshaded;
unsigned char random_start_frame;
Expand Down
2 changes: 1 addition & 1 deletion src/console_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static long cmd_comp_procs_update(struct GuiBox *gbox, struct GuiBoxOption *gopt
if (cproc != NULL)
{
char *label = (char*)goptn[i].label;
sprintf(label, "%02lx", cproc->flags);
sprintf(label, "%02" PRIx32, cproc->flags);
label[2] = ' ';
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/creature_battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct Thing;
struct PlayerInfo;

struct CreatureBattle {
unsigned long fighters_num;
uint32_t fighters_num;
unsigned short first_creatr;
unsigned short last_creatr;
};
Expand Down
5 changes: 0 additions & 5 deletions src/creature_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,6 @@ struct CreatureControl {
GameTurnDelta hand_blocked_turns;
};

struct Persons {
struct CreatureControl *cctrl_lookup[CREATURES_COUNT];
struct CreatureControl *cctrl_end;
};

struct CreatureSound {
int32_t index;
int16_t count;
Expand Down
4 changes: 2 additions & 2 deletions src/creature_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct PartyMember {
unsigned char flags;
ThingModel crtr_kind;
unsigned char objectv;
long countdown;
int32_t countdown;
CrtrExpLevel exp_level;
unsigned short carried_gold;
unsigned short is_active;
Expand All @@ -81,7 +81,7 @@ struct PartyMember {
struct Party {
char prtname[100];
struct PartyMember members[GROUP_MEMBERS_COUNT];
unsigned long members_num;
uint32_t members_num;
};

#pragma pack()
Expand Down
18 changes: 9 additions & 9 deletions src/creature_instances.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,22 @@ typedef TbBool (*Creature_Target_Search_Func)(struct Thing *, CrInstance, ThingI

struct InstanceInfo {
TbBool instant;
long time;
long fp_time;
long action_time;
long fp_action_time;
long reset_time;
long fp_reset_time;
int32_t time;
int32_t fp_time;
int32_t action_time;
int32_t fp_action_time;
int32_t reset_time;
int32_t fp_reset_time;
unsigned char graphics_idx;
char postal_priority;
short instance_property_flags;
short force_visibility;
unsigned char primary_target;
unsigned char func_idx;
int32_t func_params[2];
long range_min;
long range_max;
long symbol_spridx;
int32_t range_min;
int32_t range_max;
int32_t symbol_spridx;
short tooltip_stridx;
TbBool no_animation_loop;
// Refer to creature_instances_validate_func_list
Expand Down
Loading