91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
+
-
+
-
-
+
+
|
SDL_BlitSurface(picts,&src,screen,&dst);
}
void draw_cell(int x,int y) {
// To be called only when screen is unlocked!
Uint32 o;
Class*c;
int i;
SDL_Rect dst={x,y,picture_size,picture_size};
SDL_Rect dst={(x-1)*picture_size+left_margin,(y-1)*picture_size,picture_size,picture_size};
if(x<1 || x>64 || y<1 || y>64) return;
SDL_FillRect(screen,&dst,back_color);
o=playfield[y*64+x-65];
while(o!=VOIDLINK) {
if(main_options['e'] || !(objects[o]->oflags&OF_INVISIBLE)) {
c=classes[objects[o]->class];
if(objects[o]->image<c->nimages)
draw_picture((x-1)*picture_size+left_margin,(y-1)*picture_size,c->images[objects[o]->image]&0x7FFF);
if(objects[o]->anim && (objects[o]->anim->status&ANISTAT_VISUAL)) i=objects[o]->anim->vimage; else i=objects[o]->image;
if(i<c->nimages) draw_picture((x-1)*picture_size+left_margin,(y-1)*picture_size,c->images[i]&0x7FFF);
}
o=objects[o]->up;
}
}
void draw_text(int x,int y,const unsigned char*t,int bg,int fg) {
// To be called only when screen is locked!
|