mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-08 01:01:36 +08:00
13 lines
407 B
TypeScript
13 lines
407 B
TypeScript
import { ArrayBufferCursor } from "../../../core/data_formats/cursor/ArrayBufferCursor";
|
|
import { Endianness } from "../../../core/data_formats/Endianness";
|
|
|
|
export class Memory extends ArrayBufferCursor {
|
|
constructor(size: number, endianness: Endianness) {
|
|
super(new ArrayBuffer(size), endianness);
|
|
}
|
|
|
|
public zero(): void {
|
|
new Uint32Array(this.backing_buffer).fill(0);
|
|
}
|
|
}
|