Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some console commands. #213

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
69af8d3
Added some console commands.
AdamPlenty Aug 31, 2020
3aa1eb7
Added more commands.
AdamPlenty Sep 1, 2020
376f3ac
give.trap and give.door now have an optional 3rd parameter
AdamPlenty Sep 1, 2020
e86759b
Added more commands.
AdamPlenty Sep 2, 2020
1511dc1
Added more commands
AdamPlenty Sep 2, 2020
a012274
Add and change to toggle_flag_word
AdamPlenty Sep 3, 2020
a848e56
Corrected parameters.
AdamPlenty Sep 3, 2020
617462a
Added cls and ver commands.
AdamPlenty Sep 3, 2020
2630a0d
Added commands.
AdamPlenty Sep 4, 2020
89e7279
Added more commands.
AdamPlenty Sep 5, 2020
67f8596
Add more commands.
AdamPlenty Sep 6, 2020
fba73f8
Added commands for object creation and thing destruction.
AdamPlenty Sep 11, 2020
ec39f4e
Add command to place terrain.
AdamPlenty Sep 15, 2020
9fbb964
Added more commands.
AdamPlenty Sep 25, 2020
2180cdb
Creature creation now creates at the cursor if possible.
AdamPlenty Sep 25, 2020
5c84493
Update console_cmd.c
AdamPlenty Sep 25, 2020
5e35b59
Creature creation level parameter no longer required
AdamPlenty Sep 25, 2020
3e27de7
Added command to check if slab is blocking
AdamPlenty Sep 27, 2020
802fcf9
Add command to get the column index
AdamPlenty Sep 29, 2020
f777e06
Add command to get cubes
AdamPlenty Sep 29, 2020
2fab414
Creature creation and pool commands should now recognise creature names.
AdamPlenty Oct 9, 2020
dbaabe3
Do the same for traps and doors.
AdamPlenty Oct 9, 2020
c22e6b7
Slab placement should now recognise names.
AdamPlenty Oct 10, 2020
436ab44
Slab placement should now recognise rooms and place its assigned slab.
AdamPlenty Oct 10, 2020
f4ebe88
Added commands to manipulate spell and creature availability.
AdamPlenty Oct 11, 2020
4eec3ee
Update console_cmd.c
AdamPlenty Oct 11, 2020
f94a27a
Fix add gold cheat.
AdamPlenty Oct 13, 2020
e42099e
Update console_cmd.c
AdamPlenty Oct 14, 2020
0a92c1d
Added command to display real time taken.
AdamPlenty Oct 22, 2020
6b19a52
Fix minutes.
AdamPlenty Oct 22, 2020
fb8355d
Added toggle for timer.
AdamPlenty Oct 22, 2020
fe7bfac
Update console_cmd.c
AdamPlenty Oct 23, 2020
08f214b
Update console_cmd.c
AdamPlenty Oct 25, 2020
e8c0bc9
Fixed game quitting entirely after level is level is restarted using …
AdamPlenty Oct 25, 2020
bec96f5
Added command to switch between timer types.
AdamPlenty Oct 25, 2020
5f46727
Made timer toggling and switching update turns if needed.
AdamPlenty Nov 2, 2020
a3ec06d
Update console_cmd.c
AdamPlenty Nov 2, 2020
251c800
Update console_cmd.c
AdamPlenty Nov 5, 2020
bba99f3
Update console_cmd.c
AdamPlenty Nov 5, 2020
32c2bb3
You can now specify a player by word for player kill and creature cre…
AdamPlenty Nov 8, 2020
5d0790a
Now for the other commands that take a player number as a parameter.
AdamPlenty Nov 9, 2020
1832df6
Heart health command now shows the percentage.
AdamPlenty Nov 9, 2020
8b51e29
Added commands to retreive the names of certain things.
AdamPlenty Nov 12, 2020
8ea3449
Update console_cmd.c
AdamPlenty Nov 13, 2020
6bdbcf9
Added command to relevel a creature.
AdamPlenty Nov 14, 2020
6303f67
Added command to retrieve a player's score.
AdamPlenty Nov 15, 2020
e67bc4c
Added command to enter Thing Query mode.
AdamPlenty Nov 17, 2020
0bb603e
Added more commands
AdamPlenty Nov 20, 2020
4da5459
Fixed most compiler warnings
AdamPlenty Nov 24, 2020
5d236d3
Added a few sundries
AdamPlenty Dec 7, 2020
059f4c0
Update console_cmd.c
AdamPlenty Dec 13, 2020
b7dab64
Update console_cmd.c
AdamPlenty Dec 27, 2020
655b669
Added a couple of more commands.
AdamPlenty Dec 29, 2020
bc3a4f0
Update frontend.h
AdamPlenty Dec 29, 2020
da0faef
Revert "Added a couple of more commands."
AdamPlenty Jan 2, 2021
c3e5d9f
Revert "Update frontend.h"
AdamPlenty Jan 2, 2021
b8dfa66
Tweaks and sundries
AdamPlenty Jan 3, 2021
8cc4c74
Optimisations
AdamPlenty Jan 5, 2021
67001ce
Added commands for zooming to Action Points and Hero Gates
AdamPlenty Jan 5, 2021
a686e49
Fixed typo in command paramater
AdamPlenty Jan 6, 2021
87dd8c3
You can now specify a savegame name when using the console to save ga…
AdamPlenty Jan 7, 2021
3ca95f2
Removed unneeded if statement.
AdamPlenty Jan 7, 2021
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
14 changes: 14 additions & 0 deletions src/bflib_basics.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ void toggle_flag_byte(unsigned char *flags,unsigned char mask)
*flags ^= mask;
}

/**
* Toggles a masked bit in the flags field to the value.
* This version assumes the flag field is 2 bytes long.
* @param flags Pointer to the flags byte.
* @param mask Bitmask for the flag.
*/
void toggle_flag_word(unsigned short *flags,unsigned short mask)
{
if ((*flags & mask) == 0)
*flags |= mask;
else
*flags ^= mask;
}

/**
* Toggles a masked bit in the flags field to the value.
* This version assumes the flag field is 4 bytes long.
Expand Down
1 change: 1 addition & 0 deletions src/bflib_basics.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ void set_flag_byte(unsigned char *flags,unsigned char mask,short value);
void set_flag_word(unsigned short *flags,unsigned short mask,short value);
void set_flag_dword(unsigned long *flags,unsigned long mask,short value);
void toggle_flag_byte(unsigned char *flags,unsigned char mask);
void toggle_flag_word(unsigned short *flags,unsigned short mask);
void toggle_flag_dword(unsigned long *flags,unsigned long mask);
long saturate_set_signed(long long val,unsigned short nbits);
unsigned long saturate_set_unsigned(unsigned long long val,unsigned short nbits);
Expand Down
2 changes: 2 additions & 0 deletions src/config_campaigns.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ const struct NamedCommand cmpgn_human_player_options[] = {
{"GREEN", 2},
{"YELLOW", 3},
{"WHITE", 4},
{"GOOD", 4},
{"HERO", 4},
{NULL, 0},
};

Expand Down
1 change: 1 addition & 0 deletions src/config_campaigns.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ extern struct CampaignsList mappacks_list;
extern const struct NamedCommand cmpgn_map_commands[];
extern const struct NamedCommand cmpgn_map_cmnds_options[];
extern const struct NamedCommand cmpgn_map_cmnds_kind[];
extern const struct NamedCommand cmpgn_human_player_options[];
Loobinex marked this conversation as resolved.
Show resolved Hide resolved
/******************************************************************************/
TbBool load_campaign(const char *cmpgn_fname,struct GameCampaign *campgn,unsigned short flags, short fgroup);
TbBool free_campaign(struct GameCampaign *campgn);
Expand Down
1 change: 1 addition & 0 deletions src/config_rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct SacrificeRecipe {
/******************************************************************************/
extern const char keeper_rules_file[];
extern const struct NamedCommand research_desc[];
extern const struct NamedCommand rules_game_classicbugs_commands[];
Loobinex marked this conversation as resolved.
Show resolved Hide resolved
/******************************************************************************/
long get_research_id(long item_type, const char *trg_name, const char *func_name);
TbBool load_rules_config(const char *conf_fname, unsigned short flags);
Expand Down
Loading