Free Hero Mesh

Diff
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Differences From Artifact [3f8604fa56]:

To Artifact [281782dbc2]:


1
2
3
4
5
6
7
8
9
#if 0
gcc ${CFLAGS:--s -O2} -o ${EXE:-~/bin/heromesh} main.c class.o picture.o bindings.o function.o exec.o smallxrm.o sqlite3.o `sdl-config --cflags --libs` -ldl -lpthread
exit
#endif

/*
  This program is part of Free Hero Mesh and is public domain.
*/


|







1
2
3
4
5
6
7
8
9
#if 0
gcc ${CFLAGS:--s -O2} -o ${EXE:-~/bin/heromesh} main.c class.o picture.o bindings.o function.o exec.o edit.o smallxrm.o sqlite3.o `sdl-config --cflags --libs` -ldl -lpthread
exit
#endif

/*
  This program is part of Free Hero Mesh and is public domain.
*/

724
725
726
727
728
729
730

731
732
733
734
735
736
737
    v=malloc(strtoll(v+1,0,0));
    fatal("%p %p :: %lld\n",v,stack_protect_mark,(long long)(((char*)stack_protect_mark)-v));
  }
  if(v[1]) stack_protect_mark=((char*)stack_protect_mark)+strtoll(v+1,0,0);
}
#endif


int main(int argc,char**argv) {
  int optind=1;
  while(argc>optind && argv[optind][0]=='-') {
    int i;
    const char*s=argv[optind++];
    if(s[1]=='-' && !s[2]) break;
    for(i=1;s[i];i++) main_options[s[i]&127]=1;







>







724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
    v=malloc(strtoll(v+1,0,0));
    fatal("%p %p :: %lld\n",v,stack_protect_mark,(long long)(((char*)stack_protect_mark)-v));
  }
  if(v[1]) stack_protect_mark=((char*)stack_protect_mark)+strtoll(v+1,0,0);
}
#endif

#define run_game() fatal("[Not implemented yet]\n")
int main(int argc,char**argv) {
  int optind=1;
  while(argc>optind && argv[optind][0]=='-') {
    int i;
    const char*s=argv[optind++];
    if(s[1]=='-' && !s[2]) break;
    for(i=1;s[i];i++) main_options[s[i]&127]=1;
774
775
776
777
778
779
780
781
782
  max_objects=strtoll(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"",0,0)?:0xFFFF0000L;
  annihilate();
  if(main_options['x']) {
    fprintf(stderr,"Ready for executing SQL statements.\n");
    do_sql_mode();
    return 0;
  }
  return 0; // for(;;) { if(main_options['e']) run_editor(); else run_game(); }
}







|

775
776
777
778
779
780
781
782
783
  max_objects=strtoll(xrm_get_resource(resourcedb,optionquery,optionquery,2)?:"",0,0)?:0xFFFF0000L;
  annihilate();
  if(main_options['x']) {
    fprintf(stderr,"Ready for executing SQL statements.\n");
    do_sql_mode();
    return 0;
  }
  for(;;) { if(main_options['e']) run_editor(); else run_game(); }
}