-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maintenance] [th04/th05] Declare scrolling variables and functions i…
…n C land Part of P0089, funded by [Anonymous] and Blue Bolt.
- Loading branch information
Showing
8 changed files
with
34 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// [scroll_line] is advanced by 1 for every 16 units. | ||
extern SubpixelLength8 scroll_subpixel_line; | ||
|
||
// Amount to add to [scroll_subpixel_line] every frame. | ||
extern SubpixelLength8 scroll_speed; | ||
|
||
// Current line at the top of VRAM. | ||
extern int scroll_line; | ||
extern int scroll_line_on_page[2]; | ||
|
||
// Playfield-space pixels scrolled in the last frame. | ||
extern Subpixel scroll_last_delta; | ||
|
||
// If false, the game doesn't draw stage tiles, assuming that someone else | ||
// draws the background. | ||
extern bool scroll_active; | ||
|
||
// Transforms [y] to its corresponding VRAM line, adding the current | ||
// [scroll_line] or 0 if scrolling is disabled. | ||
int pascal near scroll_subpixel_y_to_vram_seg1(subpixel_t y); | ||
int pascal near scroll_subpixel_y_to_vram_seg3(subpixel_t y); | ||
// Like the one above, but always adds [scroll_line], even if scrolling is | ||
// disabled. | ||
int pascal near scroll_subpixel_y_to_vram_always(subpixel_t y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
public _scroll_subpixel_line, _scroll_speed, _scroll_line, _scroll_active | ||
; [scroll_line] is advanced by 1 for every 16 units. | ||
_scroll_subpixel_line db ? | ||
; Amount to add to [_scroll_subpixel_line] every frame. | ||
_scroll_speed db ? | ||
; Current line at the top of VRAM. | ||
_scroll_line dw ? | ||
; Amount of 1/16th-pixel units scrolled in the last frame. | ||
_scroll_last_delta dw ? | ||
; If set to 0, the game assumes that the background is drawn by someone else! | ||
_scroll_active db ? | ||
db ? | ||
evendata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
public _scroll_line_on_plane, _tile_invalidate_box | ||
_scroll_line_on_plane dw 2 dup(?) | ||
public _scroll_line_on_page, _tile_invalidate_box | ||
_scroll_line_on_page dw 2 dup(?) | ||
_tile_invalidate_box Point <?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters