/*Copyright 2003 Jacob Robbins*/

#include "../include.h"




void event_map_action_zero(event_map_action_t* act){
  act->action_type = EVENT_MAP_ACTION_TYPE_CALLBACK_FUNCTION;
  act->target_index = 0;
  act->source_offset = 0;
  act->fixed_event = 0;
  act->function_index = 0;
  act->next = 0;
}

char event_map_action_get_type(event_map_action_t* act) {return act->action_type;}
int event_map_action_set_type(event_map_action_t* act, char newtype) {
  if ((newtype == EVENT_MAP_ACTION_TYPE_REMAP_EXTERN)||(newtype == EVENT_MAP_ACTION_TYPE_REMAP_LOCAL)||\
      (newtype == EVENT_MAP_ACTION_TYPE_CALLBACK_FUNCTION)){
    act->action_type = newtype;
  }else{
    return -1;
  }
  return 0;
}

int event_map_action_get_target_index(event_map_action_t* act) {return act->target_index;}
void event_map_action_set_target_index(event_map_action_t* act, int newindex) {act->target_index = newindex;}

size_t event_map_action_get_source_offset(event_map_action_t* act) {return act->source_offset;}
void event_map_action_set_source_offset(event_map_action_t* act, size_t newoffset) {act->source_offset = newoffset;}

void* event_map_action_get_fixed_event(event_map_action_t* act) {return act->fixed_event;}
void event_map_action_set_fixed_event(event_map_action_t* act, void* newfixed) {act->fixed_event =  newfixed;}

int event_map_action_get_function_index(event_map_action_t* act) {return act->function_index;}
void event_map_action_set_function_index(event_map_action_t* act, int new_func) {act->function_index = new_func;}



