diff options
| author | Patrick Kingston <patrick@pkingston.xyz> | 2026-02-14 21:49:56 -0500 |
|---|---|---|
| committer | Patrick Kingston <patrick@pkingston.xyz> | 2026-02-14 21:49:56 -0500 |
| commit | aa76c61e2feac971ae22b43b14e14d1fa88638d5 (patch) | |
| tree | 7621a58d7f09bce4f5c2d566c4206fbfd3c6fcf7 /main.fab | |
| parent | 079c9b078b144ee21f62a5ca40299052c664edf0 (diff) | |
Create setting screen uninteractive
Diffstat (limited to 'main.fab')
| -rw-r--r-- | main.fab | 86 |
1 files changed, 70 insertions, 16 deletions
@@ -3,7 +3,7 @@ vars /ecavars U curr_gen = 0 // Swap these offsets back and forth per generation U next_gen = 32 UU drawing_row_offset = 0 // Use this to track which row we're drawing - U current_rule = 73 + U current_rule = %01001001 fn init_eca_state() // Scroll to attributes @@ -117,10 +117,6 @@ nmi eca_nmi() mode eca_main() : nmi eca_nmi : vars /ecavars - nmi - nmi - nmi - nmi // Initialize the screen init_eca_state() // Wait 60 frames before beginning @@ -130,21 +126,63 @@ mode eca_main() while true nmi update_pads() - if pads[0].held & BUTTON_START + if pads[0].released & BUTTON_START goto mode settings() : preserves /ecavars calc_and_advance_gen() -//charmap settingsscreen("E", 48) +charmap settingsmap(".E!@#I$T%R^&*L()_i{}|ta:01", 47) //Back up to 47 to grab a blank space + +data /settingsscreen + // Initing settings to Initial Rule which is 73 %01001001 + [] settingschars + ("................................" + "................................" + "................................" + "....E!I$.R^L(..................." + "....@#T%.&*)_..................." + "................................" + "................................" + "....111....110....101....100...." + ".....0......1......0......0....." + "................................" + "....011....010....001....000...." + ".....1......0......0......1....." + "................................" + "................................" + "................................" + "................................" + "....E!I$.i{t...................." + "....@#T%.}|:a..................." + "................................" + "................................" + "00000000000000000000000000000000" + "................................" + "................................" + "................................" + "................................" + "................................" + "................................" + "................................" + "................................" + "................................"settingsmap) vars /settings_vars U slow_counter = 0 + U editing_rule = 1 // Start off editing the rule + U rule_pos = 0 // Start off on highest bit + U generation_pos = 0 + U cursor_x = 0 + U cursor_y = 0 + U cursor_frame = 0 + U loaded = 0 nmi settings_nmi() // Turn on rendering sprites and bg ppu_upload_oam_poll_pads(0) - {PPUMASK}(PPUMASK_ON | PPUMASK_NO_CLIP) + if loaded + {PPUMASK}(PPUMASK_ON | PPUMASK_NO_CLIP) ppu_reset_scroll(0, 0) @@ -152,20 +190,36 @@ mode settings() : nmi settings_nmi : vars /ecavars : vars /settings_vars - nmi - nmi - nmi - nmi + + // Turn rendering off while we load the screen + {PPUMASK}(~PPUMASK_ON) + + ppu_reset_addr($2000) + // Load the settings screen + CCC/settingsscreen settingsp = @settingschars + for UU i = 0; i < 960; i += 1 + {PPUDATA}(settingsp{i}) + + for UU i = 0; i < 64; i += 1 + {PPUDATA}(%00000000) + + loaded = 1 + + {PPUMASK}(PPUMASK_ON) + + // Set the init to the current generation and set the rule to the current rule + // TODO ^ + while true nmi update_pads() //update_cursor() //upload_cursor() - if pads[0].held & BUTTON_START + if pads[0].released & BUTTON_START goto mode eca_main() : preserves /ecavars -charmap (".#-=n!@~E$%^S&*(C)_+A{}|12345678qwertyuiop<asd>") +charmap titlemap(".#-=N!@~E$%^S&*(C)_+A{}|12345678qwertyuiop<asd>") data /titlescreen [] title @@ -177,7 +231,7 @@ data /titlescreen ".........##############........." ".........##..........##........." ".........##..........##........." - ".........##..n!E$S&..##........." + ".........##..N!E$S&..##........." ".........##..@~%^*(..##........." ".........##....C)....##........." ".........##...._+....##........." @@ -199,7 +253,7 @@ data /titlescreen "................................" "................................" "................................" - "................................") + "................................"titlemap) vars /titlescreen UU wipeline = 0 |
