Changeset 39 for abuse/trunk/src/include
- Timestamp:
- Mar 2, 2008, 12:29:06 AM (15 years ago)
- Location:
- abuse/trunk/src/include
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/include/ability.hpp
r2 r39 17 17 18 18 #define TOTAL_ABILITIES (walk_top_speed+1) 19 extern char *ability_names[TOTAL_ABILITIES];19 extern char const *ability_names[TOTAL_ABILITIES]; 20 20 long get_ability(int who, ability a); 21 21 long get_ability_default(ability a); -
abuse/trunk/src/include/cache.hpp
r17 r39 37 37 uint32_t crc; 38 38 char *filename; 39 crced_file(char *name);39 crced_file(char const *name); 40 40 ~crced_file(); 41 41 } ; … … 47 47 public : 48 48 crc_manager(); 49 int get_filenumber(char *filename);49 int get_filenumber(char const *filename); 50 50 uint32_t get_crc(int32_t filenumber, int &failed); 51 51 void set_crc(int32_t filenumber, uint32_t crc); … … 53 53 void clean_up(); 54 54 int total_filenames() { return total_files; } 55 int write_crc_file(char *filename);56 int load_crc_file(char *filename);55 int write_crc_file(char const *filename); 56 int load_crc_file(char const *filename); 57 57 } ; 58 58 … … 87 87 int in_use() { if (used) { used=0; return 1; } else return 0; } 88 88 int full() { if (ful) { ful=0; return 1; } else return 0; } 89 int32_t reg_object(char *filename, void *object, int type, int rm_dups); // lisp object90 int32_t reg(char *filename, char*name, int type=-1, int rm_dups=0); // returns id to item89 int32_t reg_object(char const *filename, void *object, int type, int rm_dups); // lisp object 90 int32_t reg(char const *filename, char const *name, int type=-1, int rm_dups=0); // returns id to item 91 91 int32_t reg_lisp_block(Cell *block); 92 92 int loaded(int id); -
abuse/trunk/src/include/chars.hpp
r2 r39 24 24 25 25 #define MAX_STATE (running+1) 26 extern char *state_names[];26 extern char const *state_names[]; 27 27 28 28 class named_field … … 55 55 // then objects will not draw a damage when hitting it 56 56 }; 57 extern char *cflag_names[TOTAL_CFLAGS];57 extern char const *cflag_names[TOTAL_CFLAGS]; 58 58 59 59 // all object functions default to NULL … … 71 71 OFUN_CHANGE_TYPE 72 72 } ; 73 extern char *ofun_names[TOTAL_OFUNS];73 extern char const *ofun_names[TOTAL_OFUNS]; 74 74 75 75 -
abuse/trunk/src/include/config.hpp
r2 r39 12 12 void get_movement(int player, int &x, int &y, int &b1, int &b2, int &b3, int &b4); 13 13 void config_cleanup(); // free any memory allocated 14 int get_keycode(char *str); // -1 means not a valid key code14 int get_keycode(char const *str); // -1 means not a valid key code 15 15 16 16 #endif -
abuse/trunk/src/include/console.hpp
r2 r39 14 14 public : 15 15 16 console(window_manager *WM, JCFont *font, int width, int height, char *Name);16 console(window_manager *WM, JCFont *font, int width, int height, char const *Name); 17 17 int showing() { return con_win!=NULL; } 18 18 void show(); … … 26 26 int wy() { return con_win->y1(); } 27 27 void draw_cursor(); 28 void put_string(char *st);28 void put_string(char const *st); 29 29 void draw_char(int x, int y, char ch); 30 30 void toggle() { if (con_win) hide(); else show(); } 31 void print_f(c onst char*format, ...);31 void print_f(char const *format, ...); 32 32 ~console(); 33 33 } ; … … 37 37 char shcmd[300]; 38 38 public : 39 shell_term(window_manager *WM, JCFont *font, int width, int height, char *Name);39 shell_term(window_manager *WM, JCFont *font, int width, int height, char const *Name); 40 40 virtual ~shell_term() {}; 41 41 int handle_event(event &ev, window_manager *wm); 42 42 virtual void prompt(); 43 virtual void execute(char *st);43 virtual void execute(char const *st); 44 44 } ; 45 45 -
abuse/trunk/src/include/dev.hpp
r16 r39 15 15 void dev_cleanup(); 16 16 void toggle_edit_mode(); 17 char *symbol_str(char*name);17 char const *symbol_str(char const *name); 18 18 19 19 class pal_win … … 85 85 void toggle_light_window(); 86 86 void toggle_search_window(); 87 void show_char_mem(char *name);87 void show_char_mem(char const *name); 88 88 void close_oedit_window(); 89 89 void show_mem(); 90 90 dev_controll(); 91 91 void handle_event(event &ev); 92 void do_command(char *st, event &ev);92 void do_command(char const *st, event &ev); 93 93 int is_pal_win(jwindow *win); 94 94 void dev_draw(view *v); -
abuse/trunk/src/include/extend.hpp
r17 r39 41 41 morph_char *mc; 42 42 int total_vars(); 43 char *var_name(int x);44 int 43 char const *var_name(int x); 44 int var_type(int x); 45 45 void set_var(int x, uint32_t v); 46 46 int32_t get_var(int x); -
abuse/trunk/src/include/game.hpp
r17 r39 50 50 extern int demo_start,idle_ticks; 51 51 52 extern FILE *open_FILE(char const *filename, char const *mode); 53 52 54 class game 53 55 { … … 80 82 game(int argc, char **argv); 81 83 void step(); 82 void show_help(char *st);84 void show_help(char const *st); 83 85 void draw_value(image *screen, int x, int y, int w, int h, int val, int max); 84 86 unsigned char get_color(int x) { return x; } … … 120 122 121 123 int in_area(event &ev, int x1, int y1, int x2, int y2); 122 void load_level(char *name);124 void load_level(char const *name); 123 125 void set_level(level *nl); 124 126 void show_time(); -
abuse/trunk/src/include/gui.hpp
r2 r39 10 10 char key[16]; 11 11 public : 12 ico_button(int X, int Y, int ID, int Up, int down, int upa, int downa, ifield *Next, int act_id=-1, char *help_key=NULL);12 ico_button(int X, int Y, int ID, int Up, int down, int upa, int downa, ifield *Next, int act_id=-1, char const *help_key=NULL); 13 13 14 14 virtual void area(int &x1, int &y1, int &x2, int &y2, window_manager *wm); -
abuse/trunk/src/include/items.hpp
r17 r39 14 14 { 15 15 public : 16 boundary(bFILE *fp,char *er_name);16 boundary(bFILE *fp,char const *er_name); 17 17 uint8_t *inside; // tells which side of the line is on the inside 18 18 boundary(boundary *p); // flips the *inside list -
abuse/trunk/src/include/language.hpp
r2 r39 1 char *lang_string(char*symbol);1 char const *lang_string(char const *symbol); -
abuse/trunk/src/include/level.hpp
r17 r39 85 85 uint16_t background_height() { return bg_height; } 86 86 int load_failed() { return map_fg==NULL; } 87 level(spec_directory *sd, bFILE *fp, char *lev_name);87 level(spec_directory *sd, bFILE *fp, char const *lev_name); 88 88 void load_fail(); 89 level(int width, int height, char *name);90 int save(char *filename, int save_all); // save_all includes player and view information (1 = success)91 void set_name(char *name) { Name=strcpy((char *)jrealloc(Name,strlen(name)+1,"map name"),name); }89 level(int width, int height, char const *name); 90 int save(char const *filename, int save_all); // save_all includes player and view information (1 = success) 91 void set_name(char const *name) { Name=strcpy((char *)jrealloc(Name,strlen(name)+1,"map name"),name); } 92 92 void set_size(int w, int h); 93 93 void remove_light(light_source *which); -
abuse/trunk/src/include/light.hpp
r17 r39 55 55 int32_t inner, int32_t outer, int32_t xshift, int32_t yshift); 56 56 57 void add_light_spec(spec_directory *sd, char *level_name);57 void add_light_spec(spec_directory *sd, char const *level_name); 58 58 void write_lights(bFILE *fp); 59 void read_lights(spec_directory *sd, bFILE *fp, char *level_name);59 void read_lights(spec_directory *sd, bFILE *fp, char const *level_name); 60 60 61 61 -
abuse/trunk/src/include/lisp.hpp
r19 r39 139 139 void *lisp_eq(void *n1, void *n2); 140 140 void *lisp_equal(void *n1, void *n2); 141 lisp_symbol *find_symbol(char *name);141 lisp_symbol *find_symbol(char const *name); 142 142 long list_length(void *i); 143 143 void lprint(void *i); … … 146 146 void *eval_function(lisp_symbol *sym, void *arg_list); 147 147 void *eval_user_fun(lisp_symbol *sym, void *arg_list); 148 void *compile(char *&s);148 void *compile(char const *&s); 149 149 void *symbol_value(void *symbol); 150 150 void *symbol_function(void *symbol); … … 155 155 void resize_tmp(int new_size); 156 156 void resize_perm(int new_size); 157 lisp_symbol *make_find_symbol(char *name);157 lisp_symbol *make_find_symbol(char const *name); 158 158 159 159 void push_onto_list(void *object, void *&list); 160 160 lisp_symbol *add_c_object(void *symbol, int16_t number); 161 lisp_symbol *add_c_function(char *name, short min_args, short max_args, short number);162 lisp_symbol *add_c_bool_fun(char *name, short min_args, short max_args, short number);163 lisp_symbol *add_lisp_function(char *name, short min_args, short max_args, short number);161 lisp_symbol *add_c_function(char const *name, short min_args, short max_args, short number); 162 lisp_symbol *add_c_bool_fun(char const *name, short min_args, short max_args, short number); 163 lisp_symbol *add_lisp_function(char const *name, short min_args, short max_args, short number); 164 164 int read_ltoken(char *&s, char *buffer); 165 165 cons_cell *new_cons_cell(); … … 170 170 lisp_pointer *new_lisp_pointer(void *addr); 171 171 lisp_character *new_lisp_character(uint16_t ch); 172 lisp_string *new_lisp_string(char *string);173 lisp_string *new_lisp_string(char *string, int length);172 lisp_string *new_lisp_string(char const *string); 173 lisp_string *new_lisp_string(char const *string, int length); 174 174 lisp_string *new_lisp_string(int length); 175 175 lisp_fixed_point *new_lisp_fixed_point(int32_t x); -
abuse/trunk/src/include/lisp2.hpp
r2 r39 82 82 void lisp_init (long a, long b); 83 83 void lisp_uninit (void); 84 char * lstring_value (void* x);84 char * lstring_value (void* x); 85 85 long lnumber_value (void* x); 86 86 char lcharacter_value (void* x); -
abuse/trunk/src/include/loadgame.hpp
r2 r39 3 3 4 4 int show_load_icon(); 5 int load_game(int show_all, char *title);5 int load_game(int show_all, char const *title); 6 6 void get_savegame_name(char *buf); // buf should be at least 50 bytes 7 7 void last_savegame_name(char *buf); -
abuse/trunk/src/include/netcfg.hpp
r2 r39 24 24 net_configuration(); 25 25 int input(); // pulls up dialog box and input fileds 26 void cfg_error(char *msg);26 void cfg_error(char const *msg); 27 27 int confirm_inputs(jwindow *j, int server); 28 void error(char *message);28 void error(char const *message); 29 29 int confirm_inputs(input_manager *i, int server); 30 30 ifield *center_ifield(ifield *i,int x1, int x2, ifield *place_below); -
abuse/trunk/src/include/nfserver.hpp
r2 r39 15 15 16 16 int net_start(); 17 bFILE *open_nfs_file(char *filename,char*mode);17 bFILE *open_nfs_file(char const *filename, char const *mode); 18 18 19 19 int net_init(int argc, char **argv); 20 int NF_open_file(char *filename, char*mode);20 int NF_open_file(char const *filename, char const *mode); 21 21 long NF_close(int fd); 22 22 long NF_read(int fd, void *buf, long size); … … 30 30 void net_reload(); 31 31 void read_new_views(); 32 int set_file_server(char *name);32 int set_file_server(char const *name); 33 33 int set_file_server(net_address *addr); 34 34 -
abuse/trunk/src/include/objects.hpp
r18 r39 37 37 38 38 #define TOTAL_OBJECT_VARS 28 39 struct obj_desc { char *name; int type; } ;39 struct obj_desc { char const *name; int type; } ; 40 40 extern obj_desc object_descriptions[TOTAL_OBJECT_VARS]; 41 41 int RC_type_size(int type); -
abuse/trunk/src/include/property.hpp
r2 r39 6 6 { 7 7 property *first; 8 property *find(char *name);8 property *find(char const *name); 9 9 public : 10 10 property_manager() { first=0; } 11 void load(char *filename);12 void save(char *filename);11 void load(char const *filename); 12 void save(char const *filename); 13 13 14 int getd(char *name, int def) { return (int)get(name,def); }15 int get(char *name, int def);16 char *get(char *name, char*def);14 int getd(char const *name, int def) { return (int)get(name,def); } 15 int get(char const *name, int def); 16 char const *get(char const *name, char const *def); 17 17 18 void setd(char *name, int def) { set(name,def); }19 void set(char *name, double def);20 void set(char *name, char*def);18 void setd(char const *name, int def) { set(name,def); } 19 void set(char const *name, double def); 20 void set(char const *name, char const *def); 21 21 ~property_manager(); 22 22 } ; -
abuse/trunk/src/include/specache.hpp
r2 r39 14 14 spec_directory *sd; 15 15 char *filename() { return fn; } 16 filename_node(char *filename, spec_directory *dir)16 filename_node(char const *filename, spec_directory *dir) 17 17 { 18 18 fn=(char *)memcpy(jmalloc(strlen(filename)+1,"spec_dir cache"),filename,strlen(filename)+1); … … 25 25 long size; 26 26 public : 27 spec_directory *get_spec_directory(char *filename, bFILE *fp=NULL);27 spec_directory *get_spec_directory(char const *filename, bFILE *fp=NULL); 28 28 spec_directory_cache() { fn_root=0; size=0; } 29 29 void clear(); // frees up all allocated memory -
abuse/trunk/src/include/view.hpp
r17 r39 119 119 object_node *make_player_onodes(int player_num=-1); 120 120 int total_view_vars(); 121 char *get_view_var_name(int num);121 char const *get_view_var_name(int num); 122 122 ushort make_sync(); 123 123
Note: See TracChangeset
for help on using the changeset viewer.