final release
This commit is contained in:
parent
a665fcc7ea
commit
c415f3b2e6
32
src/main.cpp
32
src/main.cpp
@ -9,6 +9,7 @@
|
|||||||
#include <nds/arm9/cache.h>
|
#include <nds/arm9/cache.h>
|
||||||
#include <nds/arm9/decompress.h>
|
#include <nds/arm9/decompress.h>
|
||||||
#include <nds/arm9/video.h>
|
#include <nds/arm9/video.h>
|
||||||
|
#include <nds/arm9/videoGL.h>
|
||||||
#include <nds/bios.h>
|
#include <nds/bios.h>
|
||||||
#include <nds/debug.h>
|
#include <nds/debug.h>
|
||||||
#include <nds/dma.h>
|
#include <nds/dma.h>
|
||||||
@ -17,8 +18,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <maxmod9.h>
|
#include <maxmod9.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/_intsup.h>
|
#include <gl2d.h>
|
||||||
#include <sys/_stdint.h>
|
|
||||||
|
|
||||||
#define TIMER_SPEED (BUS_CLOCK/1024)
|
#define TIMER_SPEED (BUS_CLOCK/1024)
|
||||||
|
|
||||||
@ -123,13 +123,16 @@ mm_word on_stream_request( mm_word length, mm_addr dest, mm_stream_formats forma
|
|||||||
int main(void) {
|
int main(void) {
|
||||||
|
|
||||||
videoSetMode(MODE_5_3D);
|
videoSetMode(MODE_5_3D);
|
||||||
videoSetModeSub(MODE_0_2D);
|
videoSetModeSub(MODE_5_2D);
|
||||||
|
|
||||||
vramSetBankA(VRAM_A_MAIN_BG);
|
vramSetBankA(VRAM_A_MAIN_BG);
|
||||||
vramSetBankB(VRAM_B_TEXTURE);
|
vramSetBankB(VRAM_B_TEXTURE);
|
||||||
|
vramSetBankC(VRAM_C_SUB_BG);
|
||||||
vramSetBankF(VRAM_F_TEX_PALETTE);
|
vramSetBankF(VRAM_F_TEX_PALETTE);
|
||||||
|
|
||||||
consoleDemoInit();
|
lcdMainOnBottom();
|
||||||
|
|
||||||
|
// consoleDemoInit();
|
||||||
consoleDebugInit(DebugDevice_NOCASH);
|
consoleDebugInit(DebugDevice_NOCASH);
|
||||||
|
|
||||||
nitroFSInit(NULL);
|
nitroFSInit(NULL);
|
||||||
@ -144,8 +147,22 @@ int main(void) {
|
|||||||
size_t pal_len = LoadFile("nitro:/palette.bin", &pal);
|
size_t pal_len = LoadFile("nitro:/palette.bin", &pal);
|
||||||
|
|
||||||
ptr_background = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0, 0);
|
ptr_background = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0, 0);
|
||||||
|
ptr_subbackground = bgInitSub(3, BgType_Bmp8, BgSize_B8_256x256, VRAM_C_SUB_BG, 0);
|
||||||
|
|
||||||
dmaCopy(pal, BG_PALETTE, pal_len);
|
dmaCopy(pal, BG_PALETTE_SUB, pal_len);
|
||||||
|
|
||||||
|
// glScreen2D();
|
||||||
|
|
||||||
|
// glLoadTileSet(
|
||||||
|
// img_washer,
|
||||||
|
// 512, 512,
|
||||||
|
// 512, 521,
|
||||||
|
// GL_RGB256,
|
||||||
|
// TEXTURE_SIZE_512, TEXTURE_SIZE_512,
|
||||||
|
// GL_TEXTURE_WRAP_S|GL_TEXTURE_WRAP_T|TEXGEN_OFF|GL_TEXTURE_COLOR0_TRANSPARENT,
|
||||||
|
// 8,
|
||||||
|
// (u16*)sagiri_washer_pal,
|
||||||
|
// (u8*)sagiri_washer);
|
||||||
|
|
||||||
// DC_FlushAll();
|
// DC_FlushAll();
|
||||||
|
|
||||||
@ -199,8 +216,7 @@ int main(void) {
|
|||||||
|
|
||||||
mmStreamOpen( &mystream );
|
mmStreamOpen( &mystream );
|
||||||
|
|
||||||
// free(pal);
|
free(pal);
|
||||||
// free(sagiri_bg);
|
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
||||||
@ -221,7 +237,7 @@ int main(void) {
|
|||||||
void onVBL()
|
void onVBL()
|
||||||
{
|
{
|
||||||
// DC_FlushRange(&chunk[256*192*4 * queue.front + 256*192*chunk_counter], 256*192*4);
|
// DC_FlushRange(&chunk[256*192*4 * queue.front + 256*192*chunk_counter], 256*192*4);
|
||||||
dmaCopyAsynch(&frame_buffer[frame_size*chunk_size*frame_queue.front + frame_size*chunk_counter], bgGetGfxPtr(ptr_background), frame_size);
|
dmaCopyAsynch(&frame_buffer[frame_size*chunk_size*frame_queue.front + frame_size*chunk_counter], bgGetGfxPtr(ptr_subbackground), frame_size);
|
||||||
// if (frame_queue.current < frame_queue.size*0.4) {
|
// if (frame_queue.current < frame_queue.size*0.4) {
|
||||||
// fprintf(stderr, "%i\n ", chunk_counter);
|
// fprintf(stderr, "%i\n ", chunk_counter);
|
||||||
// fprintf(stderr, "count: %i, %i\n ", chunk_counter, frame_queue.current);
|
// fprintf(stderr, "count: %i, %i\n ", chunk_counter, frame_queue.current);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user