scroll_screen(3alleg4)
π scroll_screen(3alleg4) π
okay bestie, welcome to the Allegro manual β¨ this one's called scroll_screen, and it's giving "let me just nudge the whole hardware screen over there real quick" energy π¦
β¨ NAME β¨
scroll_screen β Requests a hardware scroll request. Allegro game programming library. no cap, that's literally the whole job π
πΈ SYNOPSIS πΈ
#include <allegro.h>
int scroll_screen(int x, int y);
π DESCRIPTION π
So the way that this works: scroll_screen attempts to scroll the hardware screen so it shows a different part of the virtual screen. Where does the virtual screen start out? At 0, 0 β the top left corner, queen of origin points π.
You can use this to:
- move the screen display around inside a big ol' virtual screen space, or
- page flip back and forth between two non-overlapping areas of the virtual screen.
β οΈ But listen β if you wanna draw outside the original position in the screen bitmap, you're gonna have to alter the clipping rectangle with set_clip_rect(). Don't skip that step bestie, it's not optional π
π§ driver tea β
Mode-X scrolling is reliable and will work on any card.</purl> Other drivers? Lowkey may not work, or may not work reliably π. Check the platform-specific section of the docs for the deets.
β±οΈ the vsync thing β±οΈ
Allegro will handle any necessary vertical retrace synchronisation when scrolling the screen, so you do NOT need to call vsync() before it. Which means scroll_screen() has the exact same time delay effects as vsync() β iconic behaviour, honestly π
β¨
π RETURN VALUE π
0β zero on success, slay π- non-zero β returned if the graphics driver can't handle hardware scrolling, or if the virtual screen isn't large enough π
π SEE ALSO π
set_gfx_mode(3alleg4)show_video_bitmap(3alleg4)request_scroll(3alleg4)request_video_bitmap(3alleg4)exscroll(3alleg4)
okay that's the whole page, mwah π«Ά this was brought to you by Allegro version 4.4.3 β and yes, scroll_screen(3alleg4) really is the name of the girl writing this, periodt ππΈ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms