685
686
687
688
689
690
691
692
693
694
695
696
697
698
|
case SDL_VIDEOEXPOSE:
goto redraw;
case SDL_QUIT:
exit(0);
break;
}
}
static void add_object_at(int x,int y,MRU*m,int d) {
Uint32 n,u;
Class*c;
if(x<1 || x>pfwidth || y<1 || y>pfheight || !m || !m->class) return;
c=classes[m->class];
if(!c) return;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
|
case SDL_VIDEOEXPOSE:
goto redraw;
case SDL_QUIT:
exit(0);
break;
}
}
static void mru_edit_obj(Uint32 obj) {
Object*o;
MRU m;
if(obj>=nobjects) return;
o=objects[obj];
if(!o) return;
m.class=o->class;
m.img=o->image;
m.misc1=o->misc1;
m.misc2=o->misc2;
m.misc3=o->misc3;
m.dir=o->dir;
mru_edit(&m);
o->image=m.img;
o->misc1=m.misc1;
o->misc2=m.misc2;
o->misc3=m.misc3;
o->dir=m.dir;
}
static void add_object_at(int x,int y,MRU*m,int d) {
Uint32 n,u;
Class*c;
if(x<1 || x>pfwidth || y<1 || y>pfheight || !m || !m->class) return;
c=classes[m->class];
if(!c) return;
|
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
|
return -1;
case '^S': // Save level
save_level();
return 1;
case '^T': // Level title
edit_string(&level_title);
return 0;
case 'ex': // Export level
if(argc<2) return prev;
export_level(sqlite3_column_text(args,1));
return prev;
case 'go': // Select level
load_level(number);
return 1;
|
>
>
>
|
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
|
return -1;
case '^S': // Save level
save_level();
return 1;
case '^T': // Level title
edit_string(&level_title);
return 0;
case 'em': // Edit Misc/Dir of object
if(argc>1 && sqlite3_column_type(args,1)!=SQLITE_NULL) mru_edit_obj(sqlite3_column_int64(args,1));
return 0;
case 'ex': // Export level
if(argc<2) return prev;
export_level(sqlite3_column_text(args,1));
return prev;
case 'go': // Select level
load_level(number);
return 1;
|