Ignore:
Timestamp:
Nov 10, 2005, 8:08:09 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • shitloads of long -> int32_t changes for 64 bit safety.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/include/level.hpp

    r2 r16  
    2727{
    2828  public :
    29   long x,y,w,h,active;
    30   long ambient,view_xoff,view_yoff;
    31   long ambient_speed, view_xoff_speed,view_yoff_speed;
     29  int32_t x,y,w,h,active;
     30  int32_t ambient,view_xoff,view_yoff;
     31  int32_t ambient_speed, view_xoff_speed,view_yoff_speed;
    3232  area_controller *next;
    33   area_controller(long X, long Y, long W, long H, area_controller *Next);
     33  area_controller(int32_t X, int32_t Y, int32_t W, int32_t H, area_controller *Next);
    3434} ;
    3535
    36 extern long last_tile_hit_x,last_tile_hit_y;
     36extern int32_t last_tile_hit_x,last_tile_hit_y;
    3737extern int dev;
    3838class level        // contain map info and objects
     
    4343                 fg_width,fg_height; 
    4444  char *Name,*first_name;
    45   long total_objs;
     45  int32_t total_objs;
    4646  game_object *first,*first_active,*last;
    4747
     
    104104  void mark_seen(int x, int y) { CHECK(x>=0 && y>=0 && x<fg_width && y<fg_height);
    105105                                          (*(map_fg+x+y*fg_width))|=0x8000; }
    106   void clear_fg(long x, long y) { *(map_fg+x+y*fg_width)&=0x7fff; }
     106  void clear_fg(int32_t x, int32_t y) { *(map_fg+x+y*fg_width)&=0x7fff; }
    107107
    108108  unsigned short *get_fgline(int y) { CHECK(y>=0 && y<fg_height); return map_fg+y*fg_width; }
     
    141141  void unactivate_all();
    142142  // forms all the objects in processing range into a linked list
    143   int add_actives(long x1, long y1, long x2, long y2);  //returns total added
     143  int add_actives(int32_t x1, int32_t y1, int32_t x2, int32_t y2);  //returns total added
    144144  void pull_actives(game_object *o, game_object *&last_active, int &t);
    145   int add_drawables(long x1, long y1, long x2, long y2);  //returns total added
    146 
    147   game_object *find_object(long x, long y);
    148 
    149   game_object *damage_intersect(long x1, long y1, long &x2, long &y2, game_object *exclude);
    150   game_object *boundary_setback(game_object *subject, long x1, long y1, long &x2, long &y2);
    151   game_object *all_boundary_setback(game_object *subject, long x1, long y1, long &x2, long &y2);
     145  int add_drawables(int32_t x1, int32_t y1, int32_t x2, int32_t y2);  //returns total added
     146
     147  game_object *find_object(int32_t x, int32_t y);
     148
     149  game_object *damage_intersect(int32_t x1, int32_t y1, int32_t &x2, int32_t &y2, game_object *exclude);
     150  game_object *boundary_setback(game_object *subject, int32_t x1, int32_t y1, int32_t &x2, int32_t &y2);
     151  game_object *all_boundary_setback(game_object *subject, int32_t x1, int32_t y1, int32_t &x2, int32_t &y2);
    152152  int crush(game_object *by_who, int xamount, int yamount);
    153153  int push_characters(game_object *by_who, int xamount, int yamount);  // return 0 if fail on any.
    154154  int platform_push(game_object *by_who, int xamount, int yamount);
    155   void foreground_intersect(long x1, long y1, long &x2, long &y2);
    156   void vforeground_intersect(long x1, long y1, long &y2);
    157 
    158   void hurt_radius(long x, long y,long r, long m, game_object *from, game_object *exclude,
     155  void foreground_intersect(int32_t x1, int32_t y1, int32_t &x2, int32_t &y2);
     156  void vforeground_intersect(int32_t x1, int32_t y1, int32_t &y2);
     157
     158  void hurt_radius(int32_t x, int32_t y,int32_t r, int32_t m, game_object *from, game_object *exclude,
    159159                   int max_push);
    160   void send_signal(long signal);
     160  void send_signal(int32_t signal);
    161161  void next_focus();
    162162  void to_front(game_object *o);
     
    182182                    object_node *save_list, object_node *exclude_list);
    183183  view *make_view_list(int nplayers);
    184   long total_light_links(object_node *list);
    185   long total_object_links(object_node *save_list);
    186   game_object *find_object_in_area(long x, long y, long x1, long y1,
    187                                    long x2, long y2, Cell *list, game_object *exclude);
    188   game_object *find_object_in_angle(long x, long y, long start_angle, long end_angle,
     184  int32_t total_light_links(object_node *list);
     185  int32_t total_object_links(object_node *save_list);
     186  game_object *find_object_in_area(int32_t x, int32_t y, int32_t x1, int32_t y1,
     187                                   int32_t x2, int32_t y2, Cell *list, game_object *exclude);
     188  game_object *find_object_in_angle(int32_t x, int32_t y, int32_t start_angle, int32_t end_angle,
    189189                                    void *list, game_object *exclude);
    190190  object_node *make_not_list(object_node *list);
Note: See TracChangeset for help on using the changeset viewer.