93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
void draw_cell(int x,int y) {
// To be called only when screen is unlocked!
Uint32 o;
Class*c;
SDL_Rect dst={x,y,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(!(objects[o]->oflags&OF_INVISIBLE)) {
c=classes[objects[o]->class];
if(objects[o]->image<c->nimages) draw_picture(x*picture_size+left_margin,y*picture_size,c->images[objects[o]->image]&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!
|
|
|
>
|
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
void draw_cell(int x,int y) {
// To be called only when screen is unlocked!
Uint32 o;
Class*c;
SDL_Rect dst={x,y,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(!(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);
}
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!
|