635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
|
static void describe_at(int xy) {
unsigned char*s;
Uint32 n;
if(xy<0 || xy>=64*64) return;
n=playfield[xy];
if(n==VOIDLINK) return;
while(n!=VOIDLINK && objects[n]->up!=VOIDLINK) n=objects[n]->up;
if(!classes[objects[n]->class]->gamehelp) return;
if(classes[objects[n]->class]->gamehelp[0]==16 && !classes[objects[n]->class]->gamehelp[1]) {
if(objects[n]->misc1.t!=TY_LEVELSTRING || objects[n]->misc1.u>=nlevelstrings) return;
modal_draw_popup(levelstrings[objects[n]->misc1.u]);
return;
}
s=sqlite3_mprintf("\x0C\x0E%s:%d\\ %s\x0B\x0F%s",classes[objects[n]->class]->name,objects[n]->image,classes[objects[n]->class]->name,classes[objects[n]->class]->gamehelp);
if(!s) fatal("Allocation failed\n");
|
|
>
|
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
|
static void describe_at(int xy) {
unsigned char*s;
Uint32 n;
if(xy<0 || xy>=64*64) return;
n=playfield[xy];
if(n==VOIDLINK) return;
while(n!=VOIDLINK && objects[n]->up!=VOIDLINK) n=objects[n]->up;
while(n!=VOIDLINK && !classes[objects[n]->class]->gamehelp) n=objects[n]->down;
if(n==VOIDLINK) return;
if(classes[objects[n]->class]->gamehelp[0]==16 && !classes[objects[n]->class]->gamehelp[1]) {
if(objects[n]->misc1.t!=TY_LEVELSTRING || objects[n]->misc1.u>=nlevelstrings) return;
modal_draw_popup(levelstrings[objects[n]->misc1.u]);
return;
}
s=sqlite3_mprintf("\x0C\x0E%s:%d\\ %s\x0B\x0F%s",classes[objects[n]->class]->name,objects[n]->image,classes[objects[n]->class]->name,classes[objects[n]->class]->gamehelp);
if(!s) fatal("Allocation failed\n");
|