From 9e35115be8950e2891232027aaf4bef7be44ace2 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Fri, 24 Nov 2023 18:19:30 -0700 Subject: rm old camera --- src/main.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 24a5e01..f147f2f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,13 +1,30 @@ -#include "Camera.hpp" +#include "palette.hpp" +#include "vector.hpp" #include int main() { + // interrupt & mode 4 foo irq_init(NULL); irq_enable(II_VBLANK); + REG_DISPCNT = DCNT_MODE4 | DCNT_BG2; - REG_DISPCNT = DCNT_MODE4; + // initialize our palette + palette::put_palette((std::uint16_t *)MEM_PAL); + // begin + bmp16_line(1, 3, 1 + SCREEN_WIDTH / 2 - 2, SCREEN_HEIGHT, 0x0101, vid_page, + SCREEN_WIDTH); + vid_flip(); + bmp16_line(2, 3, 2 + SCREEN_WIDTH / 2 - 2, SCREEN_HEIGHT, 0x0101, vid_page, + SCREEN_WIDTH); + + std::uint32_t frame = 0; while (1) { + frame = (frame + 1) % 60; + if (frame == 0) { + vid_flip(); + } + VBlankIntrWait(); } } -- cgit v1.2.3-70-g09d2