Mail Archives: djgpp/1997/06/05/02:10:36
hi, does anyone know how Allegro deal with the virtual screen
memory alloctaion?
I have declared a screen of resolution 320x200 with 320x400 virtual
screen, but when I executed the following funcion, it just return a
mass of junk! ( this can be tested with Allegro example 2 )
void move_block() {
unsigned long waddress, raddress;
_farsetsel(screen->seg);
raddress = bmp_read_line(screen, now_y);
waddress = bmp_write_line(screen, 0);
movedata(screen->seg, raddress, screen->seg, waddress, SCREEN_W*SCREEN_H);
}
I guess the problem is in my memory calculation, but I can't find the
right way doing this. Any help would be highly appreciated!
- Chuang Li-chung-
--
- Raw text -