mirror of
https://github.com/buhman/nds.git
synced 2025-06-18 14:35:38 -04:00
main: rename to "2d_engine"
This commit is contained in:
parent
62d6a3b2a6
commit
e13e4ba987
@ -5,10 +5,10 @@
|
||||
#include "obj.h"
|
||||
#include "oam.h"
|
||||
|
||||
#include "../res/player.data.h"
|
||||
#include "../res/player.data.pal.h"
|
||||
#include "../res/bowser.data.h"
|
||||
#include "../res/bowser.data.pal.h"
|
||||
#include "../texture/player.data.h"
|
||||
#include "../texture/player.data.pal.h"
|
||||
#include "../texture/bowser.data.h"
|
||||
#include "../texture/bowser.data.pal.h"
|
||||
|
||||
static inline uint16_t rgb565(const uint8_t * buf)
|
||||
{
|
||||
@ -390,13 +390,28 @@ struct sign_v cos_table[360] = {
|
||||
|
||||
void main()
|
||||
{
|
||||
// 2d graphics engine A BG
|
||||
io_registers.a.VRAMCNT = (1 << 31) | (1 << 24);
|
||||
#define REG_IME (*(volatile uint32_t *)0x04000208)
|
||||
REG_IME = 0;
|
||||
|
||||
io_registers.a.WVRAMCNT = 0;
|
||||
// 2d graphics engine A BG
|
||||
io_registers.a.VRAMCNT = (1 << 31) | (1 << 24)
|
||||
| 0x80 << 16
|
||||
| 0x80 << 8
|
||||
| 0x80 << 0;
|
||||
|
||||
io_registers.a.WVRAMCNT = 0
|
||||
| 0x80 << 16
|
||||
| 0x80 << 8
|
||||
| 0x80 << 0;
|
||||
|
||||
// 2d graphics engine B OBJ
|
||||
io_registers.a.VRAM_HI_CNT = (1 << 15) | (0b10 << 8);
|
||||
io_registers.a.VRAM_HI_CNT = (1 << 15) | (0b10 << 8)
|
||||
| 0x80 << 0;
|
||||
|
||||
io_registers.a.DISPCAPCNT = 0;
|
||||
|
||||
io_registers.a.MASTER_BRIGHT = (0b01 << 14) | 0b11111;
|
||||
io_registers.b.MASTER_BRIGHT = (0b01 << 14) | 0b11111;
|
||||
|
||||
io_registers.a.POWCNT = 0
|
||||
| POWCNT__lcd_output_destination__a_to_upper__b_to_lower
|
||||
@ -411,8 +426,8 @@ void main()
|
||||
| DISPCNT__bg_character_base_offset(0)
|
||||
| DISPCNT__display_mode__graphics_display
|
||||
| DISPCNT__bg0__enable
|
||||
//| DISPCNT__display_selection_for_bg0__2d_graphics
|
||||
| DISPCNT__display_selection_for_bg0__3d_graphics
|
||||
| DISPCNT__display_selection_for_bg0__2d_graphics
|
||||
//| DISPCNT__display_selection_for_bg0__3d_graphics
|
||||
| DISPCNT__bg_mode__text0_text1_text2_text3
|
||||
;
|
||||
|
@ -6,17 +6,17 @@ ALL = \
|
||||
|
||||
all: arm9.bin
|
||||
|
||||
OBJ = \
|
||||
2D_ENGINE_OBJ = \
|
||||
start.o \
|
||||
main.o \
|
||||
../res/player.data.o \
|
||||
../res/player.data.pal.o \
|
||||
../res/bowser.data.o \
|
||||
../res/bowser.data.pal.o
|
||||
2d_engine.o \
|
||||
../texture/player.data.o \
|
||||
../texture/player.data.pal.o \
|
||||
../texture/bowser.data.o \
|
||||
../texture/bowser.data.pal.o
|
||||
|
||||
include ../texture/texture.mk
|
||||
|
||||
arm9.elf: $(OBJ)
|
||||
2d_engine.elf: $(2D_ENGINE_OBJ)
|
||||
|
||||
triangle.elf: start.o examples/triangle.o
|
||||
|
||||
|
BIN
texture/bowser.data
Normal file
BIN
texture/bowser.data
Normal file
Binary file not shown.
5
texture/bowser.data.h
Normal file
5
texture/bowser.data.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
extern uint32_t _binary_bowser_data_start __asm("_binary_bowser_data_start");
|
||||
extern uint32_t _binary_bowser_data_end __asm("_binary_bowser_data_end");
|
||||
extern uint32_t _binary_bowser_data_size __asm("_binary_bowser_data_size");
|
BIN
texture/bowser.data.pal
Normal file
BIN
texture/bowser.data.pal
Normal file
Binary file not shown.
5
texture/bowser.data.pal.h
Normal file
5
texture/bowser.data.pal.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
extern uint32_t _binary_bowser_data_pal_start __asm("_binary_bowser_data_pal_start");
|
||||
extern uint32_t _binary_bowser_data_pal_end __asm("_binary_bowser_data_pal_end");
|
||||
extern uint32_t _binary_bowser_data_pal_size __asm("_binary_bowser_data_pal_size");
|
BIN
texture/player.data
Normal file
BIN
texture/player.data
Normal file
Binary file not shown.
5
texture/player.data.h
Normal file
5
texture/player.data.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
extern uint32_t _binary_player_data_start __asm("_binary_player_data_start");
|
||||
extern uint32_t _binary_player_data_end __asm("_binary_player_data_end");
|
||||
extern uint32_t _binary_player_data_size __asm("_binary_player_data_size");
|
BIN
texture/player.data.pal
Normal file
BIN
texture/player.data.pal
Normal file
Binary file not shown.
5
texture/player.data.pal.h
Normal file
5
texture/player.data.pal.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
extern uint32_t _binary_player_data_pal_start __asm("_binary_player_data_pal_start");
|
||||
extern uint32_t _binary_player_data_pal_end __asm("_binary_player_data_pal_end");
|
||||
extern uint32_t _binary_player_data_pal_size __asm("_binary_player_data_pal_size");
|
Loading…
Reference in New Issue
Block a user