File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 0.2.0
2+
3+ - Add 20 8x8
4+ - Change cursor to go to last uncompleted puzzle in menu
5+
16# 0.1.1
27
38- Add 21 6x6, 7 22x12, 1 8x8, 1 10x10 puzzles
Original file line number Diff line number Diff line change 11[package ]
22name = " nonogram_advance"
3- version = " 0.1.1 "
3+ version = " 0.2.0 "
44publish = false
55authors = [" Emma Britton <emmabritton@pm.me>" ]
66readme = " README.md"
Original file line number Diff line number Diff line change @@ -7,182 +7,182 @@ _######_
77___##___
88########
99
10- ________
11- ________
12- ________
13- ________
14- ________
15- ________
16- ________
17- ________
18-
19- ________
20- ________
21- ________
22- ________
23- ________
24- ________
25- ________
26- ________
10+ __####__
11+ _######_
12+ ########
13+ ____#___
14+ ____#___
15+ ____#___
16+ __#_#___
17+ ___#____
18+
19+ #__#___#
20+ ##_##_##
21+ ########
22+ ########
23+ #_###_##
24+ ###_###_
25+ ########
26+ ########
2727
28- ________
29- ________
30- ________
31- ________
32- ________
33- ________
34- ________
35- ________
28+ #######_
29+ #___#__#
30+ #___#__#
31+ #####__#
32+ #______#
33+ #______#
34+ #______#
35+ ########
3636
3737________
38- ________
39- ________
40- ________
41- ________
42- ________
43- ________
44- ________
38+ __#__#__
39+ _#__#___
40+ ######__
41+ ########
42+ ######_#
43+ ########
44+ ######__
4545
46- ________
47- ________
48- ________
49- ________
50- ________
51- ________
52- ________
46+ _######_
47+ ########
48+ #__##__#
49+ #__##__#
50+ ###__###
51+ ########
52+ __#__#__
5353________
5454
55- ________
56- ________
57- ________
58- ________
59- ________
60- ________
61- ________
62- ________
55+ _#_____#
56+ _#_____#
57+ __#___#_
58+ ___###__
59+ ____#___
60+ ____#___
61+ ____#___
62+ __#####_
6363
6464________
6565________
66- ________
67- ________
68- ________
66+ ###_____
67+ #_######
68+ ###__#_#
6969________
7070________
7171________
7272
73- ________
74- ________
75- ________
76- ________
77- ________
78- ________
79- ________
80- ________
73+ #_______
74+ #__####_
75+ #_______
76+ #__###__
77+ #_______
78+ ########
79+ #_______
80+ ########
8181
82- ________
83- ________
84- ________
85- ________
86- ________
87- ________
88- ________
89- ________
82+ ___##___
83+ __####__
84+ __#__#__
85+ _#____#_
86+ #______#
87+ #______#
88+ _#____#_
89+ __####__
9090
91- ________
92- ________
93- ________
94- ________
95- ________
96- ________
97- ________
98- ________
91+ _______#
92+ ______#_
93+ _____#__
94+ ____#___
95+ _#_#____
96+ _##_____
97+ _###____
98+ #_______
9999
100- ________
101- ________
102- ________
103- ________
104- ________
105- ________
106- ________
107- ________
100+ ########
101+ #______#
102+ #_####_#
103+ #_#__#_#
104+ #_#__#_#
105+ _#_##_#_
106+ __#__#__
107+ ___##___
108108
109109________
110- ________
111- ________
112- ________
113- ________
114- ________
115- ________
110+ ___##___
111+ __####__
112+ _######_
113+ _######_
114+ __####__
115+ ___##___
116116________
117117
118- ________
119- ________
120- ________
121- ________
122- ________
123- ________
124- ________
125- ________
118+ _____#_#
119+ ______#_
120+ _____#_#
121+ ____#___
122+ ___#____
123+ __#_____
124+ _#______
125+ #_______
126126
127- ________
128- ________
129- ________
130- ________
131- ________
132- ________
133- ________
134- ________
127+ ___##___
128+ __#__#__
129+ __#__#__
130+ _######_
131+ _######_
132+ _######_
133+ _##__##_
134+ _######_
135135
136- ________
137- ________
138- ________
139- ________
140- ________
141- ________
142- ________
136+ _##_____
137+ #__#____
138+ #__#____
139+ _###____
140+ ____#___
141+ _____#__
142+ ______#_
143143________
144144
145145________
146- ________
147- ________
148- ________
149- ________
150- ________
151- ________
152- ________
146+ __###___
147+ _#####__
148+ __#_##__
149+ ######_#
150+ _#######
151+ _#_#_#__
152+ ##_#_##_
153153
154- ________
155- ________
156- ________
157- ________
158- ________
159- ________
160- ________
161- ________
154+ ###__###
155+ #_#__#_#
156+ ########
157+ _#_##_#_
158+ ##_##_##
159+ ########
160+ ##____##
161+ _#____#_
162162
163- ________
164- ________
165- ________
166- ________
167- ________
168- ________
169- ________
170- ________
163+ #______#
164+ ###__###
165+ _######_
166+ ##_##_##
167+ _#_##_#_
168+ _######_
169+ ___##___
170+ __####__
171171
172- ________
173- ________
174- ________
175- ________
176- ________
177- ________
178- ________
179- ________
172+ _##__##_
173+ #_####_#
174+ #_####_#
175+ ########
176+ _######_
177+ _######_
178+ _#_##_#_
179+ __####__
180180
181- ________
182- ________
183- ________
184- ________
185- ________
186- ________
187- ________
188- ________
181+ _#____#_
182+ _##__#__
183+ _####___
184+ _######_
185+ #_##_##_
186+ __##_#__
187+ ##_####_
188+ _#####__
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ use agb::sound::mixer::{ChannelId, Mixer};
1717use alloc:: boxed:: Box ;
1818use alloc:: vec;
1919use alloc:: vec:: Vec ;
20+ use agb:: println;
2021
2122pub struct PuzzleMenuScene {
2223 cursor : ( usize , usize ) ,
@@ -38,7 +39,19 @@ impl PuzzleMenuScene {
3839 music_enabled : bool ,
3940 sfx_enabled : bool ,
4041 ) -> Box < dyn Scene > {
41- let is_completed = completed_games. iter ( ) . map ( |v| v > & 0 ) . collect ( ) ;
42+ let is_completed: Vec < bool > = completed_games. iter ( ) . map ( |& v| v > 0 ) . collect ( ) ;
43+ println ! ( "is_completed: {:?}" , is_completed) ;
44+ let cursor = if let Some ( pos) = is_completed. iter ( ) . position ( |& v| !v) {
45+ println ! ( "pos: {pos}" ) ;
46+ let x = pos % size. buttons ( ) [ 0 ] . len ( ) ;
47+ let y = pos / size. buttons ( ) [ 0 ] . len ( ) ;
48+ println ! ( "cursor: ({x},{y})" ) ;
49+ ( x, y)
50+ } else {
51+ ( 0 , 0 )
52+ } ;
53+ let pos = size. buttons ( ) [ cursor. 1 ] [ cursor. 0 ] ;
54+ let button_highlight = Highlight :: new ( pos. 0 , pos. 1 ) ;
4255
4356 let mut empty_sprite = vec ! [ ] ;
4457 match size {
@@ -52,15 +65,15 @@ impl PuzzleMenuScene {
5265 }
5366
5467 Box :: new ( Self {
55- cursor : ( 0 , 0 ) ,
68+ cursor,
5669 backgrounds : background_stack ( [ & bg_gfx:: dots, size. bg ( ) , size. bg_title ( ) ] ) ,
5770 button_highlight_sprites : lvl_button_sprites ( ) ,
5871 size,
5972 empty_sprite,
6073 is_completed,
6174 sfx_enabled,
6275 music_enabled,
63- button_highlight : Highlight :: new ( size . buttons ( ) [ 0 ] [ 0 ] . 0 , size . buttons ( ) [ 0 ] [ 0 ] . 1 ) ,
76+ button_highlight,
6477 } )
6578 }
6679}
You can’t perform that action at this time.
0 commit comments