mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-26 09:06:33 +11:00
Marker is a better name for this probably
This commit is contained in:
parent
7c3725497c
commit
1562e63bee
1 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ pub struct VRamManager<'a> {
|
||||||
vram_free_pointer: Option<usize>,
|
vram_free_pointer: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
const END_OF_FREE_LIST_REFERENCE: u16 = u16::MAX;
|
const END_OF_FREE_LIST_MARKER: u16 = u16::MAX;
|
||||||
|
|
||||||
impl<'a> VRamManager<'a> {
|
impl<'a> VRamManager<'a> {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
|
@ -135,7 +135,7 @@ impl<'a> VRamManager<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
let index_to_copy_into = if let Some(ptr) = self.vram_free_pointer.take() {
|
let index_to_copy_into = if let Some(ptr) = self.vram_free_pointer.take() {
|
||||||
if self.references[ptr] != END_OF_FREE_LIST_REFERENCE {
|
if self.references[ptr] != END_OF_FREE_LIST_MARKER {
|
||||||
self.vram_free_pointer = Some(self.references[ptr] as usize);
|
self.vram_free_pointer = Some(self.references[ptr] as usize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ impl<'a> VRamManager<'a> {
|
||||||
if let Some(ptr) = self.vram_free_pointer {
|
if let Some(ptr) = self.vram_free_pointer {
|
||||||
self.references[index] = ptr as u16;
|
self.references[index] = ptr as u16;
|
||||||
} else {
|
} else {
|
||||||
self.references[index] = END_OF_FREE_LIST_REFERENCE;
|
self.references[index] = END_OF_FREE_LIST_MARKER;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.vram_free_pointer = Some(index);
|
self.vram_free_pointer = Some(index);
|
||||||
|
|
Loading…
Add table
Reference in a new issue