Ignore:
Timestamp:
Apr 17, 2011, 10:28:20 AM (11 years ago)
Author:
Sam Hocevar
Message:

lisp: populate LispSymbol? with symbol-related methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/level.cpp

    r482 r484  
    10801080      {
    10811081        if (figures[new_type]->seq[k] &&
    1082            !strcmp(lstring_value(symbol_name(figures[new_type]->seq_syms[k])),old_name))
     1082           !strcmp(lstring_value(((LispSymbol *)figures[new_type]->seq_syms[k])->GetName()),old_name))
    10831083        *(s_remap[i]+j)=k;
    10841084      }
     
    11191119          if (figures[new_type]->vars[k])
    11201120          {
    1121         if (!strcmp(lstring_value(symbol_name(figures[new_type]->vars[k])),old_name))
     1121        if (!strcmp(lstring_value(((LispSymbol *)figures[new_type]->vars[k])->GetName()),old_name))
    11221122          *(v_remap[i]+j)=figures[new_type]->var_index[k];
    11231123          }
     
    15601560    for (;j<figures[i]->ts;j++)
    15611561      if (figures[i]->seq[j])
    1562         size+=1+strlen(lstring_value(symbol_name(figures[i]->seq_syms[j])))+1;
     1562        size+=1+strlen(lstring_value(((LispSymbol *)figures[i]->seq_syms[j])->GetName()))+1;
    15631563  }
    15641564  sd.add_by_hand(new spec_entry(SPEC_DATA_ARRAY,"describe_states",NULL,size,0));
     
    15731573    for (;j<figures[i]->tiv;j++)
    15741574      if (figures[i]->vars[j])
    1575         size+=1+strlen(lstring_value(symbol_name(figures[i]->vars[j])))+1;
     1575        size+=1+strlen(lstring_value(((LispSymbol *)figures[i]->vars[j])->GetName()))+1;
    15761576  }
    15771577  sd.add_by_hand(new spec_entry(SPEC_DATA_ARRAY,"describe_lvars",NULL,size,0));
     
    18271827  } else
    18281828  {
    1829     void *fun=make_find_symbol("set_player_defaults");
    1830     if (DEFINEDP(symbol_function(fun)))
     1829    LispSymbol *fun = LispSymbol::FindOrCreate("set_player_defaults");
     1830    if (DEFINEDP(fun->GetFunction()))
    18311831    {
    18321832      view *f;
     
    18381838      current_object=f->focus;
    18391839      void *m=mark_heap(TMP_SPACE);
    1840       eval_function((LispSymbol *)fun,NULL);
     1840      eval_function(fun,NULL);
    18411841      restore_heap(m,TMP_SPACE);
    18421842    }
     
    18871887      if (figures[i]->seq[j])
    18881888      {
    1889     char *state_name=lstring_value(symbol_name(figures[i]->seq_syms[j]));
     1889    char *state_name=lstring_value(((LispSymbol *)figures[i]->seq_syms[j])->GetName());
    18901890    fp->write_uint8(strlen(state_name)+1);
    18911891    fp->write(state_name,strlen(state_name)+1);
     
    19061906        if (figures[i]->vars[j] && figures[i]->var_index[j]==x)
    19071907    {
    1908       char *var_name=lstring_value(symbol_name(figures[i]->vars[j]));
     1908      char *var_name=lstring_value(((LispSymbol *)figures[i]->vars[j])->GetName());
    19091909      fp->write_uint8(strlen(var_name)+1);
    19101910      fp->write(var_name,strlen(var_name)+1);
Note: See TracChangeset for help on using the changeset viewer.