1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-16 05:05:11 +00:00

nes: updated presets

This commit is contained in:
Steven Hugg 2019-03-05 22:00:54 -05:00
parent f17a3488ed
commit 788854166a
5 changed files with 22 additions and 9 deletions

View File

@ -97,6 +97,7 @@ void main() {
char i;
char oam_id;
// setup graphics
setup_graphics();
// initialize actors with random values
for (i=0; i<NUM_ACTORS; i++) {

View File

@ -98,6 +98,10 @@ void main() {
char oam_id;
char pad; // controller flags
// print instructions
vram_adr(NTADR_A(2,2));
vram_write("\x1c\x1d\x1e\x1f to move metasprite", 24);
// setup graphics
setup_graphics();
// initialize actors with random values
for (i=0; i<NUM_ACTORS; i++) {

View File

@ -99,6 +99,14 @@ void main() {
char pad; // controller flags
char vbright = 4;
// print instructions
vram_adr(NTADR_A(2,2));
vram_write("Press A/B to dec/inc", 20);
vram_adr(NTADR_A(2,3));
vram_write("virtual bright level", 20);
vram_adr(NTADR_A(2,5));
vram_write("\x1e \x1f uses pad_trigger()", 22);
// setup graphics
setup_graphics();
// initialize actors with random values
for (i=0; i<NUM_ACTORS; i++) {
@ -135,11 +143,11 @@ void main() {
actor_x[i] += actor_dx[i];
actor_y[i] += actor_dy[i];
}
// set sprites 0-3 palette directly in OAM buffer
OAMBUF[0].attr |= 3;
OAMBUF[1].attr |= 3;
OAMBUF[2].attr |= 3;
OAMBUF[3].attr |= 3;
// set sprites 0-3 attribute byte directly in OAM buffer
OAMBUF[0].attr |= 3 | OAM_BEHIND;
OAMBUF[1].attr |= 3 | OAM_BEHIND;
OAMBUF[2].attr |= 3 | OAM_BEHIND;
OAMBUF[3].attr |= 3 | OAM_BEHIND;
// hide rest of sprites
// if we haven't wrapped oam_id around to 0
if (oam_id!=0) oam_hide_rest(oam_id);

View File

@ -744,14 +744,14 @@ void play_round() {
} else {
switch (framecount & 3) {
case 1: animate_enemy_explosion(); // continue...
case 3: does_missile_hit_player(); break;
case 2: draw_stars(); break;
case 2: does_missile_hit_player(); break;
case 3: draw_stars(); break;
}
set_sounds();
if (!enemies_left) end_timer--;
draw_next_row();
}
//cflushnow();
cflushnow();
copy_sprites();
#ifdef DEBUG_FRAMERATE
putchar(t0 & 31, 27, CHAR(' '));

2
tss

@ -1 +1 @@
Subproject commit d630ddcb29d74a178cde043d74188fac35d6a21f
Subproject commit 5b5ee67fc06956bc7dce51726e98812d2d897eaa