Ejemplo n.º 1
0
int		apply_tunnel(char *line, t_map **map)
{
	char	**str;
	t_map	*tmp;

	str = ft_strsplit(line, '-');
	tmp = *map;
	if (apply_name(tmp, str[0], str[1]) == 0)
		return (0);
	tmp = *map;
	if (apply_name(tmp, str[1], str[0]) == 0)
		return (0);
	return (1);
}
/**
 * @brief Applies the data in the GUI to the entity.
 */
void EditEntityDialog::apply() {

  apply_simple_booleans();
  apply_simple_integers();
  apply_simple_strings();

  apply_behavior();
  apply_breed();
  apply_damage_on_enemies();
  apply_destination();
  apply_destination_map();
  apply_direction();
  apply_font();
  apply_ground();
  apply_layer();
  apply_maximum_moves();
  apply_model();
  apply_name();
  apply_opening_method();
  apply_rank();
  apply_savegame_variable();
  apply_size();
  apply_sound();
  apply_sprite();
  apply_subtype();
  apply_transition();
  apply_treasure();
  apply_type();
  apply_weight();
  apply_xy();
}
Ejemplo n.º 3
0
//----------------------------------------------------------------------
// New method: symbol enumeration callback
//lint -e{818} could be declared as pointing to const
static BOOL CALLBACK EnumerateSymbolsProc(
        PSYMBOL_INFO psym,
        ULONG /*SymbolSize*/,
        PVOID delta)
{
  symbols_found++;
  ea_t ea = (ea_t)(psym->Address + *(adiff_t*)delta);
  const char *name = psym->Name;

  int maybe_func = 0; // maybe
  switch ( psym->Tag )
  {
    case SymTagFunction:
    case SymTagThunk:
#ifndef PDBTOTIL
      auto_make_proc(ea); // certainly a func
#endif
      maybe_func = 1;
      break;
    case SymTagNull:
    case SymTagExe:
    case SymTagCompiland:
    case SymTagCompilandDetails:
    case SymTagCompilandEnv:
    case SymTagData:
    case SymTagAnnotation:
    case SymTagUDT:
    case SymTagEnum:
    case SymTagFunctionType:
    case SymTagPointerType:
    case SymTagArrayType:
    case SymTagBaseType:
    case SymTagTypedef:
    case SymTagBaseClass:
    case SymTagFunctionArgType:
    case SymTagUsingNamespace:
    case SymTagVTableShape:
    case SymTagVTable:
    case SymTagCustom:
    case SymTagCustomType:
    case SymTagManagedType:
    case SymTagDimension:
      maybe_func = -1;
      break;
    case SymTagBlock:
    case SymTagLabel:
    case SymTagFuncDebugStart:
    case SymTagFuncDebugEnd:
      maybe_func = 2;
      break;
    case SymTagPublicSymbol:
    case SymTagFriend:
    default:
      break;
  }

  bool ok = apply_name(ea, name, maybe_func);
  // New dbghelp.dll/symsrv.dll files return names without the terminating zero.
  // So, as soon as we have a long name, shorter names will have garbage at the end.
  // Clean up the name to avoid problems.
  size_t len = strlen(name);
  memset((void*)name, '\0', len);
  return ok;
}