#76931 - GizmoTheGreen - Sun Mar 26, 2006 12:41 pm
hello, i am 15 years old, and new to DS programming, i know a little of visual basic and ruby.
i made a basic app called DSLasergun
EDIT: it works in dualis and on hardware, though im borrowing friends m3, as i dont have my own, and the purpose of this app, is to pretend your DS i a gun, we love to use it on the breaks in school :)
now, can anyone help me shut of backlight while folded?
also go back to M3 menu by pressing start?
thanks in advance
_________________
Starter of the project TrueLoveDS :D
Will you find True Love?
i made a basic app called DSLasergun
Code: |
#include "nds.h"
#include <nds/bios.h> #include <nds/system.h> #include <nds/arm9/console.h> #include <nds/arm9/sound.h> #include <stdio.h> #include "blaster_raw.h" #include "saberoff_raw.h" int main(void) { powerON( POWER_LCD | POWER_2D_B ); irqInit(); irqSet(IRQ_VBLANK, NULL); irqEnable(IRQ_VBLANK); videoSetMode(0); videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE); vramSetBankC(VRAM_C_SUB_BG); SUB_BG0_CR = BG_MAP_BASE(31); BG_PALETTE_SUB[255] = RGB15(0,25,0); consoleInitDefault((u16*)SCREEN_BASE_BLOCK_SUB(31), (u16*)CHAR_BASE_BLOCK_SUB(0), 16); iprintf("\n DS Lasergun \n\n Use L & R to shoot\n depending on preference...\n\n Press Select to swap screens\n\n\n\n Coded by GizmoTheGreen\n "); setGenericSound( 11025, 127, 64, 1 ); TransferSoundData blaster = { blaster_raw, blaster_raw_size, 11025, 127, 64, 1 }; while(1) { swiWaitForVBlank(); scanKeys(); //s16 userName = PersonalData[name0, name1, name2,name3,name4,name5,name6,name7,name8,name9] u16 keys = keysDown(); u16 up = keysUp(); if ( keys & KEY_R) playSound(&blaster), iprintf("\n Right handed?"); if ( keys & KEY_L) playSound(&blaster), iprintf("\n Left handed?"); if ( keys & KEY_LID) playGenericSound(saberoff_raw, saberoff_raw_size), iprintf("\n Closed"); if ( up & KEY_LID) playGenericSound(saberoff_raw, saberoff_raw_size), iprintf("\n Opened"); if ( keys & KEY_A) iprintf("\n What? This button\n does nothin'... yet..."); if ( keys & KEY_START) iprintf("\n Restarting..."); if ( up & KEY_START) swiSoftReset(); if ( keys & KEY_SELECT) lcdSwap(); } return 0; } |
EDIT: it works in dualis and on hardware, though im borrowing friends m3, as i dont have my own, and the purpose of this app, is to pretend your DS i a gun, we love to use it on the breaks in school :)
now, can anyone help me shut of backlight while folded?
also go back to M3 menu by pressing start?
thanks in advance
_________________
Starter of the project TrueLoveDS :D
Will you find True Love?