• R/O
  • SSH
  • HTTPS

oricsdk: Commit


Commit MetaInfo

Revision1367 (tree)
Time2016-01-31 22:27:24
Authordbug

Log Message

Removed unused files

Change Summary

  • delete: users/dbug/games/GlobalGameJam2016/code/screen.s
  • delete: users/dbug/games/GlobalGameJam2016/code/transitions.s
  • delete: users/dbug/games/GlobalGameJam2016/code/digiplayer.s
  • delete: users/dbug/games/GlobalGameJam2016/data/location_kingscastle.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_sognsvann.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_kon_tiki_museum.png
  • delete: users/dbug/games/GlobalGameJam2016/data/ending_out_of_money.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_norwegian_folk_museum.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_akerbrygge.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_munch_museum.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_holmenkolen.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_national_gallery.png
  • delete: users/dbug/games/GlobalGameJam2016/data/valp_outline.png
  • delete: users/dbug/games/GlobalGameJam2016/data/Funcom-mono-8.raw
  • delete: users/dbug/games/GlobalGameJam2016/data/ending_out_of_time.png
  • delete: users/dbug/games/GlobalGameJam2016/data/crap.raw
  • delete: users/dbug/games/GlobalGameJam2016/data/location_akershus_fortress.png
  • delete: users/dbug/games/GlobalGameJam2016/data/how_to_play.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_vigeland.png
  • delete: users/dbug/games/GlobalGameJam2016/data/Decade Reset.ym
  • delete: users/dbug/games/GlobalGameJam2016/data/ending_victory.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_natural_history_museum.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_jernbanetorget.png
  • delete: users/dbug/games/GlobalGameJam2016/data/oslo_map.png
  • delete: users/dbug/games/GlobalGameJam2016/data/funcom_logo_240x200.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_opera.png
  • delete: users/dbug/games/GlobalGameJam2016/data/ending_giveup.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_vikingship_museum.png
  • delete: users/dbug/games/GlobalGameJam2016/data/GlobalGameJamOslo-2015.png
  • delete: users/dbug/games/GlobalGameJam2016/data/location_ibsen_museum.png

Incremental Difference

--- users/dbug/games/GlobalGameJam2016/code/screen.s (revision 1366)
+++ users/dbug/games/GlobalGameJam2016/code/screen.s (nonexistent)
@@ -1,1006 +0,0 @@
1-
2-#include "floppy_description.h"
3-#include "defines.h"
4-
5- .zero
6-
7-_ShowingOsloMap .dsb 1 ; For the screen UI, to decided between showing a location or the Oslo map
8-_OsloLocation .dsb 1 ; This maps to the various locations for which we have pictures and descriptions
9-_NextLocation .dsb 1 ; The location the player wants to move to (initialized to be _OsloLocation on the move screen)
10-_AvailableActions .dsb 1 ; It's a bit mask, which define which of our 8 possible actions are available - used to draw them on screen
11-_GameOver .dsb 1 ; Set to non null if a failure condition happens
12-_VisitedLocationCount .dsb 1 ; How many places were visited
13-
14-_CurrentMenuAction .dsb 1 ; Number between 0 and 7 indicating which option is currently selected by the player
15-
16-_PlayerHasOsloPass .dsb 1 ; The Oslo pass is expensive, but with it you don't need to pay anything after
17-_MoneyToSpend .dsb 1 ; Write the value, and then call "SpendMoney"
18-_TimeToSpend .dsb 1 ; Write the value, and then call "SpendTime"
19-_ScoreToAdd .dsb 1 ; Value to add to the current score
20-
21-_DateDay .dsb 1 ; Only two values: Saturday and Sunday (not used at the moment)
22-current_action .dsb 1
23-action_shifter .dsb 1
24-
25- .text
26-
27-_VisitedLocations .dsb LOADER_LOCATION_LAST-LOADER_LOCATION_FIRST;
28-
29-_InitialiseGame
30-.(
31- lda #0
32- sta _ShowingOsloMap
33- sta _PlayerHasOsloPass
34- sta _VisitedLocationCount
35-
36- lda #GAMEOVER_STILL_OK
37- sta _GameOver
38-
39- ; Give the player 999 nok (to be balanced)
40- ldx #"0"
41- stx _MessageMoneyBalance+1;
42- ldx #"9"
43- stx _MessageMoneyBalance+2;
44- stx _MessageMoneyBalance+3;
45- stx _MessageMoneyBalance+4;
46-
47- ; Set the score to zero
48- ;_MessageScoreValue .byt 1,"00000",0 ; 5 digits score
49- ldx #"0"
50- stx _MessageScoreValue+1;
51- stx _MessageScoreValue+2;
52- stx _MessageScoreValue+3;
53- stx _MessageScoreValue+4;
54- stx _MessageScoreValue+5;
55-
56- ldx #LOADER_LOCATION_LAST-LOADER_LOCATION_FIRST;
57-loop
58- lda #0
59- sta _VisitedLocations-1,x
60- dex
61- bne loop
62-
63- lda #LOADER_LOCATION_OSLOS
64- sta _OsloLocation
65-
66- jsr _InitialiseDate
67-
68- rts
69-.)
70-
71-
72-
73-
74-_InitialiseFontColors
75-.(
76- lda #0
77- tax
78-loop_attribute
79- ldy #8
80-loop
81- sta $9800,x
82- inx
83- dey
84- bne loop
85-
86- clc
87- adc #1
88- cmp #24
89- bne loop_attribute
90-
91- rts
92-.)
93-
94-_InitialiseDate
95-.(
96- lda #0
97- sta _DateDay
98-
99- lda #"0"
100- sta _MessageTime+1
101- sta _MessageTime+2
102- sta _MessageTime+4
103- sta _MessageTime+5
104- rts
105-.)
106-
107-
108-_ShowScore
109-.(
110- lda #<$bb80+40*26+4
111- sta _PrintScreenPtr+0
112- lda #>$bb80+40*26+4
113- sta _PrintScreenPtr+1
114-
115- lda #<_MessageTotalScore
116- sta _PrintMessagePtr+0
117- lda #>_MessageTotalScore
118- sta _PrintMessagePtr+1
119-
120- jsr _PrintSelectedText
121-
122-
123- lda #<_MessageScoreValue
124- sta _PrintMessagePtr+0
125- lda #>_MessageScoreValue
126- sta _PrintMessagePtr+1
127-
128- jsr _PrintSelectedText
129-
130- rts
131-.)
132-
133-
134-_WaitASecond
135-.(
136- ldx #50
137-loop
138- jsr _VSync
139- dex
140- bne loop
141- rts
142-.)
143-
144-_ComputeScore
145-.(
146- ;jsr _IncrementScore
147- jsr _ShowScore
148-
149- jsr _WaitASecond
150- jsr _WaitASecond
151-
152- ; Add 200 points for each visited location
153- lda #<$bb80+40*25+2
154- sta _PrintScreenPtr+0
155- lda #>$bb80+40*25+2
156- sta _PrintScreenPtr+1
157-
158- lda #<_MessageVisitedPlaces
159- sta _PrintMessagePtr+0
160- lda #>_MessageVisitedPlaces
161- sta _PrintMessagePtr+1
162-
163- jsr _PrintSelectedText
164-
165- jsr _WaitASecond
166- .(
167-loop
168- lda _VisitedLocationCount
169- beq done
170- dec _VisitedLocationCount
171- lda #200
172- sta _ScoreToAdd
173- jsr _AddToScore
174- jmp loop
175-done
176- lda #0
177- .)
178- jsr _WaitASecond
179- sta $bb80+40*25+2
180- jsr _WaitASecond
181-
182-
183- ; Add the remaining money
184- lda #<$bb80+40*25+2
185- sta _PrintScreenPtr+0
186- lda #>$bb80+40*25+2
187- sta _PrintScreenPtr+1
188-
189- lda #<_MessageRemainingMoney
190- sta _PrintMessagePtr+0
191- lda #>_MessageRemainingMoney
192- sta _PrintMessagePtr+1
193-
194- jsr _PrintSelectedText
195-
196- jsr _WaitASecond
197- .(
198- lda _GameOver
199- cmp GAMEOVER_NO_MORE_MONEY
200- beq done ; The player was already out of money
201-
202- lda #0
203- sta _GameOver ; We reset the game over flag, so we can detect when we run out of money...
204-
205-loop
206- jsr _DecrementMoneyNoDisplay
207- lda _GameOver
208- bne done
209- jsr _IncrementScore
210- jmp loop
211-done
212- lda #0
213- .)
214- jsr _WaitASecond
215- sta $bb80+40*25+2
216- jsr _WaitASecond
217-
218-
219- rts
220-.)
221-
222-
223-_AddToScore
224-.(
225-loop
226- lda _ScoreToAdd
227- beq done
228- dec _ScoreToAdd
229- jsr _IncrementScore
230- jmp loop
231-done
232- rts
233-.)
234-
235-
236-_IncrementScore
237-.(
238- jsr _IncrementScoreNoDisplay
239- rts
240-.)
241-
242-_IncrementScoreNoDisplay
243-.(
244- ; Lower digit of score
245- inc _MessageScoreValue+5
246- lda _MessageScoreValue+5
247- cmp #":"
248- bne done
249- lda #"0"
250- sta _MessageScoreValue+5
251-
252- ; Secod digit of score
253- inc _MessageScoreValue+4
254- lda _MessageScoreValue+4
255- cmp #":"
256- bne done
257- lda #"0"
258- sta _MessageScoreValue+4
259-
260- ; Third digit of score
261- inc _MessageScoreValue+3
262- lda _MessageScoreValue+3
263- cmp #":"
264- bne done
265- lda #"0"
266- sta _MessageScoreValue+3
267-
268- ; Fourth digit of score
269- inc _MessageScoreValue+2
270- lda _MessageScoreValue+2
271- cmp #":"
272- bne done
273- lda #"0"
274- sta _MessageScoreValue+2
275-
276- ; Fifth digit of score
277- inc _MessageScoreValue+1
278- lda _MessageScoreValue+1
279- cmp #":"
280- bne done
281- lda #"0"
282- sta _MessageScoreValue+1
283-
284-done
285- jsr _ShowScore
286-
287- rts
288-.)
289-
290-_IncrementTime
291-.(
292- lda _GameOver
293- bne skip_increment
294-
295- ; Lower digit of minutes
296- inc _MessageTime+5
297- lda _MessageTime+5
298- cmp #":"
299- bne done
300- lda #"0"
301- sta _MessageTime+5
302-
303- ; Higher digit of minutes
304- inc _MessageTime+4
305- lda _MessageTime+4
306- cmp #"6"
307- bne done
308- lda #"0"
309- sta _MessageTime+4
310-
311- ; Lower digit of hours
312- inc _MessageTime+2
313- lda _MessageTime+2
314- cmp #":"
315- bne done
316- lda #"0"
317- sta _MessageTime+2
318-
319- ; Higher digit of hours
320- inc _MessageTime+1
321- lda _MessageTime+1
322- cmp #":"
323- bne done
324- lda #"0"
325- sta _MessageTime+1
326-
327-done
328- jsr _ShowTimeOfTheDay
329-
330- lda _MessageTime+1
331- cmp #"4"
332- bne skip_increment
333- lda _MessageTime+2
334- cmp #"8"
335- bne skip_increment
336-
337- ; The player has lost: He ran out of time
338- lda #GAMEOVER_TIME_UP
339- sta _GameOver
340-
341-
342-skip_increment
343- rts
344-.)
345-
346-
347-_ShowTimeOfTheDay
348-.(
349- ; Set some colors on the screen
350- lda #<$a000+40*1
351- sta tmp1+0
352- lda #>$a000+40*1
353- sta tmp1+1
354-
355- ldx #8
356-loop
357- lda #16+4
358- ldy #0
359- sta (tmp1),y
360- lda #6
361- iny
362- sta (tmp1),y
363- jsr Add40Tmp1
364- dex
365- bne loop
366-
367- ; Display the day
368- lda #<$a000+40*1+2
369- sta _PrintScreenPtr+0
370- lda #>$a000+40*1+2
371- sta _PrintScreenPtr+1
372-
373- ;lda #<_MessageSaturday
374- ;sta _PrintMessagePtr+0
375- ;lda #>_MessageSaturday
376- ;sta _PrintMessagePtr+1
377-
378- ;jsr _PrintHiresInternal
379-
380- ; Display the time of the day
381-
382- ;lda #<$a000+40*1+2
383- ;sta _PrintScreenPtr+0
384- ;lda #>$a000+40*1+2
385- ;sta _PrintScreenPtr+1
386-
387- lda #<_MessageTime
388- sta _PrintMessagePtr+0
389- lda #>_MessageTime
390- sta _PrintMessagePtr+1
391-
392- jsr _PrintHiresInternal
393-
394- rts
395-.)
396-
397-
398-/*
399-_MessageMoney
400- .byt "Money",0
401-
402-_MessageMood
403- .byt "Mood",0
404-
405-_MessageEnergy
406- .byt "Energy",0
407-*/
408-
409-; 198 lines, starting at position 29
410-_ShowPlayerStatus
411-.(
412- /*
413- ; Display the Mood
414- lda #<$a000+40*2+30+1
415- sta _PrintScreenPtr+0
416- lda #>$a000+40*2+30+1
417- sta _PrintScreenPtr+1
418-
419- lda #<_MessageMood
420- sta _PrintMessagePtr+0
421- lda #>_MessageMood
422- sta _PrintMessagePtr+1
423-
424- jsr _PrintHiresInternal
425-
426-
427- lda #<$a000+40*11+30+2
428- sta _PrintScreenPtr+0
429- lda #>$a000+40*11+30+2
430- sta _PrintScreenPtr+1
431-
432- lda #<_MessageMoodHappy
433- sta _PrintMessagePtr+0
434- lda #>_MessageMoodHappy
435- sta _PrintMessagePtr+1
436-
437- jsr _PrintHiresInternal
438-
439-
440- ; Display the Energy
441- lda #<$a000+40*30+30+1
442- sta _PrintScreenPtr+0
443- lda #>$a000+40*30+30+1
444- sta _PrintScreenPtr+1
445-
446- lda #<_MessageEnergy
447- sta _PrintMessagePtr+0
448- lda #>_MessageEnergy
449- sta _PrintMessagePtr+1
450-
451- jsr _PrintHiresInternal
452-
453- lda #<$a000+40*39+30+3
454- sta _PrintScreenPtr+0
455- lda #>$a000+40*39+30+3
456- sta _PrintScreenPtr+1
457-
458- lda #<_MessageEnergyTired
459- sta _PrintMessagePtr+0
460- lda #>_MessageEnergyTired
461- sta _PrintMessagePtr+1
462-
463- jsr _PrintHiresInternal
464- */
465-
466-
467- ; Display the Money
468- lda #<$a000+40*60+30+1
469- sta _PrintScreenPtr+0
470- lda #>$a000+40*60+30+1
471- sta _PrintScreenPtr+1
472-
473- lda #<_MessageMoney
474- sta _PrintMessagePtr+0
475- lda #>_MessageMoney
476- sta _PrintMessagePtr+1
477-
478- jsr _PrintHiresInternal
479-
480- jsr _ShowMoney
481-
482- rts
483-.)
484-
485-
486-_ShowMoney
487-.(
488- lda #<$a000+40*69+30+1
489- sta _PrintScreenPtr+0
490- lda #>$a000+40*69+30+1
491- sta _PrintScreenPtr+1
492-
493- lda #<_MessageMoneyBalance
494- sta _PrintMessagePtr+0
495- lda #>_MessageMoneyBalance
496- sta _PrintMessagePtr+1
497-
498- jsr _PrintHiresInternal
499- rts
500-.)
501-
502-
503-; _MessageMoneyBalance .byt 2,"9999 nok",0
504-
505-_DecrementMoney
506-.(
507- lda _GameOver
508- bne skip_decrement
509- jsr _DecrementMoneyNoDisplay
510- jsr _ShowMoney
511-skip_decrement
512- rts
513-.)
514-
515-_DecrementMoneyNoDisplay
516-.(
517- lda _GameOver
518- bne skip
519- ; /0123456789
520-
521- ; 4th digit
522- ldx _MessageMoneyBalance+4;
523- dex
524- stx _MessageMoneyBalance+4;
525- cpx #"/"
526- bne skip
527- ldx #"9"
528- stx _MessageMoneyBalance+4;
529-
530- ; 3rd digit
531- ldx _MessageMoneyBalance+3;
532- dex
533- stx _MessageMoneyBalance+3;
534- cpx #"/"
535- bne skip
536- ldx #"9"
537- stx _MessageMoneyBalance+3;
538-
539- ; 2nd digit
540- ldx _MessageMoneyBalance+2;
541- dex
542- stx _MessageMoneyBalance+2;
543- cpx #"/"
544- bne skip
545- ldx #"9"
546- stx _MessageMoneyBalance+2;
547-
548- ; 1st digit
549- ldx _MessageMoneyBalance+1;
550- dex
551- stx _MessageMoneyBalance+1;
552- cpx #"/"
553- bne skip
554- ldx #"0"
555- stx _MessageMoneyBalance+1;
556-
557- ; The player has lost: His money is depleted
558- lda #GAMEOVER_NO_MORE_MONEY
559- sta _GameOver
560-
561-skip
562- rts
563-.)
564-
565-
566-
567-_SpendMoney
568-.(
569-loop
570- lda _MoneyToSpend
571- beq done
572- dec _MoneyToSpend
573- jsr _DecrementMoney
574- jmp loop
575-done
576- rts
577-.)
578-
579-
580-_SpendTime
581-.(
582-loop
583- lda _TimeToSpend
584- beq done
585- dec _TimeToSpend
586- jsr _IncrementTime
587- jmp loop
588-done
589- rts
590-.)
591-
592-
593-; 198 lines, starting at position 29
594-; Shows the "What Do We Do Now?" message, plus the various options
595-_ShowActionMenu
596-.(
597- lda #<$a000+40*94+30+0
598- sta _PrintScreenPtr+0
599- lda #>$a000+40*94+30+0
600- sta _PrintScreenPtr+1
601-
602- lda #<_MessageWhatDoWeDoNow1
603- sta _PrintMessagePtr+0
604- lda #>_MessageWhatDoWeDoNow1
605- sta _PrintMessagePtr+1
606-
607- jsr _PrintHiresInternal
608-
609- lda #<$a000+40*102+30+0
610- sta _PrintScreenPtr+0
611- lda #>$a000+40*102+30+0
612- sta _PrintScreenPtr+1
613-
614- lda #<_MessageWhatDoWeDoNow2
615- sta _PrintMessagePtr+0
616- lda #>_MessageWhatDoWeDoNow2
617- sta _PrintMessagePtr+1
618-
619- jsr _PrintHiresInternal
620-
621- lda #<$a000+40*110+30+0
622- sta _PrintScreenPtr+0
623- lda #>$a000+40*110+30+0
624- sta _PrintScreenPtr+1
625-
626- lda #<_MessageWhatDoWeDoNow3
627- sta _PrintMessagePtr+0
628- lda #>_MessageWhatDoWeDoNow3
629- sta _PrintMessagePtr+1
630-
631- jsr _PrintHiresInternal
632-
633- lda #<$a000+40*118+30+0
634- sta _PrintScreenPtr+0
635- lda #>$a000+40*118+30+0
636- sta _PrintScreenPtr+1
637-
638- lda #<_MessageWhatDoWeDoNow4
639- sta _PrintMessagePtr+0
640- lda #>_MessageWhatDoWeDoNow4
641- sta _PrintMessagePtr+1
642-
643- jsr _PrintHiresInternal
644-
645-
646-
647- ; Force enabling all the options
648- ;lda #1+128
649- ;sta _AvailableActions
650-
651- lda _AvailableActions
652- sta action_shifter
653-
654- lda #0
655- sta current_action
656-
657- lda #<$a000+40*127+30+0
658- sta tmp3+0
659- lda #>$a000+40*127+30+0
660- sta tmp3+1
661-
662-loop
663- lsr action_shifter
664- bcc skip_entry
665-
666- clc
667- lda tmp3+0
668- sta _PrintScreenPtr+0
669- adc #<40*9
670- sta tmp3+0
671-
672- lda tmp3+1
673- sta _PrintScreenPtr+1
674- adc #>40*9
675- sta tmp3+1
676-
677- ldy current_action
678- lda _ActionList_Low,y
679- sta _PrintMessagePtr+0
680- lda _ActionList_High,y
681- sta _PrintMessagePtr+1
682-
683- ; Highlight the current menu entry
684- ldy #0
685- lda (_PrintMessagePtr),y
686- sta __auto_color_patch+1
687- lda _PrintMessagePtr+0
688- sta __auto_addr_patch+1
689- lda _PrintMessagePtr+1
690- sta __auto_addr_patch+2
691-
692- .(
693- lda _CurrentMenuAction
694- cmp current_action
695- bne skip_highlight
696- lda #(16+2)
697- sta (_PrintMessagePtr),y
698-skip_highlight
699- .)
700-
701- jsr _PrintHiresInternal
702-
703- ; Restore the previous message color
704- ldy #0
705-__auto_color_patch
706- lda #$12
707-__auto_addr_patch
708- sta $1234
709-
710-
711-skip_entry
712- inc current_action
713- lda action_shifter
714- bne loop
715-
716-done
717-
718- rts
719-.)
720-
721-
722-_LocationPosX
723- .byt 60 ; LOADER_LOCATION_VIGELAND
724- .byt 112 ; LOADER_LOCATION_OPERA
725- .byt 29 ; LOADER_LOCATION_HOLMENKOLEN
726- .byt 113 ; LOADER_LOCATION_OSLOS
727- .byt 80 ; LOADER_LOCATION_AKERBRYGGE
728- .byt 82 ; LOADER_LOCATION_KINGCASTLE
729- .byt 86 ; LOADER_LOCATION_SOGNSVANN
730- .byt 48 ; LOADER_LOCATION_VIKINGSHIP
731- .byt 135 ; LOADER_LOCATION_MUNCHMUSEUM
732- .byt 79 ; LOADER_LOCATION_IBSENMUSEUM
733- .byt 35 ; LOADER_LOCATION_NORWEGIANFOLK
734- .byt 52 ; LOADER_LOCATION_KONTIKI
735- .byt 93 ; LOADER_LOCATION_AKERSHUS
736- .byt 100 ; LOADER_LOCATION_NATIONALGALLERY
737- .byt 131 ; LOADER_LOCATION_NATURALHISTORY
738-
739-_LocationPosY
740- .byt 111 ; LOADER_LOCATION_VIGELAND
741- .byt 145 ; LOADER_LOCATION_OPERA
742- .byt 30 ; LOADER_LOCATION_HOLMENKOLEN
743- .byt 139 ; LOADER_LOCATION_OSLOS
744- .byt 140 ; LOADER_LOCATION_AKERBRYGGE
745- .byt 124 ; LOADER_LOCATION_KINGCASTLE
746- .byt 10 ; LOADER_LOCATION_SOGNSVANN
747- .byt 154 ; LOADER_LOCATION_VIKINGSHIP
748- .byt 126 ; LOADER_LOCATION_MUNCHMUSEUM
749- .byt 128 ; LOADER_LOCATION_IBSENMUSEUM
750- .byt 152 ; LOADER_LOCATION_NORWEGIANFOLK
751- .byt 155 ; LOADER_LOCATION_KONTIKI
752- .byt 146 ; LOADER_LOCATION_AKERSHUS
753- .byt 129 ; LOADER_LOCATION_NATIONALGALLERY
754- .byt 118 ; LOADER_LOCATION_NATURALHISTORY
755-
756-
757-_TableBitPos
758- .byt %100000
759- .byt %010000
760- .byt %001000
761- .byt %000100
762- .byt %000010
763- .byt %000001
764-
765-; This will use the _NextLocation variable to show two EORed crossed lines to show where the next location will be
766-_ShowLocationTarget
767-.(
768- ; The picture is 174x180 and displayed from the column zero, starting from the line 10
769- sec
770- lda _NextLocation
771- sbc #LOADER_LOCATION_FIRST
772- pha
773- tay
774-
775- ; Draw the horizontal line
776- clc
777- lda _LocationPosY,y
778- adc #10
779- tay
780-
781- lda _ScreenAddrLow,y
782- sta tmp0+0
783- lda _ScreenAddrHigh,y
784- sta tmp0+1
785-
786- ldy #0
787-loop_x
788- lda (tmp0),y
789- eor #1+2+4+8+16+32
790- sta (tmp0),y
791- iny
792- cpy #29
793- bne loop_x
794-
795- ; Draw the vertical line
796- pla
797- tay
798- lda _LocationPosX,y
799- pha
800- tay
801-
802- lda _TableModulo6,y
803- tay
804- lda _TableBitPos,y
805- sta __auto_eor_patch+1
806-
807- pla
808- tay
809- clc
810- lda #<$a000+40*10
811- adc _TableDivBy6,y
812- sta tmp1+0
813- lda #>$a000+40*10
814- adc #0
815- sta tmp1+1
816-
817- ldy #0
818- ldx #180
819-loop_y
820- lda (tmp1),y
821-__auto_eor_patch
822- eor #1+2+4+8+16+32
823- sta (tmp1),y
824- jsr Add40Tmp1
825- dex
826- bne loop_y
827-
828- ;_TableModulo6
829- rts
830-.)
831-
832-
833-
834-
835-/*
836-#define ACTION_LEAVE 0
837-#define ACTION_DISCOVER 1
838-#define ACTION_EAT 2
839-#define ACTION_DRINK 3
840-#define ACTION_REST 4
841-#define ACTION_BUY_PASS 5
842-#define ACTION_AIRPORT 6 ; ???
843-#define ACTION_GIVE_UP 7 ; End the game
844-*/
845-_GetPossibleActionsForLocation
846-.(
847- ; _OsloLocation
848- ; In all locations we can LEAVE/DISCOVER/GIVEUP
849- lda #(1<<ACTION_LEAVE)|(1<<ACTION_DISCOVER)|(1<<ACTION_GIVE_UP)
850-
851- .(
852- ; At Oslo S we can buy an Oslo Pass, but only if we do not have it yet
853- ldx _OsloLocation
854- cpx #LOADER_LOCATION_OSLOS
855- bne skip
856-
857- ; The option to go to the aiport is a victory condition
858- ora #(1<<ACTION_AIRPORT)
859-
860- ldx _PlayerHasOsloPass
861- bne skip
862- ora #(1<<ACTION_BUY_PASS)
863-skip
864- .)
865-
866- sta _AvailableActions
867- rts
868-.)
869-
870-
871-_BuyOsloPass
872-.(
873- ; The Oslo Pass costs 470 nok for two days (255+215)
874- lda #255
875- sta _MoneyToSpend
876- jsr _SpendMoney
877- lda #215
878- sta _MoneyToSpend
879- jsr _SpendMoney
880-
881- ; The playe now has the Oslo pass
882- lda #1
883- sta _PlayerHasOsloPass
884- rts
885-.)
886-
887-
888-
889-_VisitLocation
890-.(
891- ; Mark this location as visited one more time
892- ldx _OsloLocation
893- inc _VisitedLocations-LOADER_LOCATION_FIRST,x
894-
895- lda _VisitedLocations-LOADER_LOCATION_FIRST,x
896- cmp #1
897- bne already_visited
898- inc _VisitedLocationCount
899-already_visited
900-
901- ; We spend one hour visiting a particular location
902- lda #60
903- sta _TimeToSpend
904- jsr _SpendTime
905-
906- ; If we have the Oslo pass we pay nothing, else we pay a mandatory 120 nok
907- ldx _PlayerHasOsloPass
908- bne skip
909- lda #129
910- sta _MoneyToSpend
911- jsr _SpendMoney
912-skip
913-
914- rts
915-.)
916-
917-
918-_MoveToNewLocation
919-.(
920- ; Spend 30 nok for a metro ticket, except if we have an Oslo pass
921- ldx _PlayerHasOsloPass
922- bne skip
923- lda #30
924- sta _MoneyToSpend
925- jsr _SpendMoney
926-skip
927-
928- ; Amount of time to travel is based on the distance between the two places
929- ; _NextLocation
930- ; _OsloLocation
931-
932- sec
933- lda _OsloLocation
934- sbc #LOADER_LOCATION_FIRST
935- tay
936- lda _LocationPosX,y
937- lsr
938- sta tmp0+0
939- lda _LocationPosY,y
940- lsr
941- sta tmp0+1
942-
943- sec
944- lda _NextLocation
945- sbc #LOADER_LOCATION_FIRST
946- tay
947- lda _LocationPosX,y
948- lsr
949- sta tmp1+0
950- lda _LocationPosY,y
951- lsr
952- sta tmp1+1
953-
954- ; At this point we have tmp0 with X/Y for the first location, and tmp1 for the X/Y for the second location (divided by two so it fits in 8 bit without overflows)
955- /*
956- sec
957- lda tmp0+0
958- sbc tmp1+0
959- bmi neg_dx
960-
961-
962-neg_dx
963- */
964- lda #45
965- sta _TimeToSpend
966- jsr _SpendTime
967-
968-
969-
970-
971-
972- ; Move to the new location
973- lda _NextLocation
974- sta _OsloLocation
975-
976- rts
977-.)
978-
979-/*
980-Prices:
981-
982-https://ruter.no/billetter/prisendring/
983-Ruter single ticket: 30 nok
984-Ruter day ticket: 90 nok
985-Ticket control cost: 950 nok
986-
987-Oslo pass one day: 320 nok
988-Oslo pass two days: 470 nok
989-
990-Taxis:
991-Start from taxi stop: 43 nok
992-Start from call: 66 nok
993-Price per kilometer: 13 nok
994-Price per minute: 6.5 nok
995-Minimum price: 109 nok
996-
997-Museums:
998-(29,30) - LOADER_LOCATION_HOLMENKOLEN
999-(86,10) - Sognsvann
1000-(35,152) -
1001-Fram-Museum: 100 nok (from 10 to 16) - Polar explorers, northwest passage
1002-Munch museum: 100 nok (from 10 to 16) - Also has Van Gogh
1003-Ibsem museum: 85 nok (from 11 to 18) - Henrik Ibsen home in Oslo - Henrik Ibsen, Norwegian playwright and poet, was born 1828 in Skien and died 1906 in Arbins gate 1, Oslo. He is recognized as the founder of the modern drama, and alongside William Shakespeare, he is the most performed playwright in the world.
1004-Vigeland museum: 60 nok (from 11 to 16)
1005-AKERSHUS FESTNING: 50 nok (from 10 to 17)
1006-*/
--- users/dbug/games/GlobalGameJam2016/code/transitions.s (revision 1366)
+++ users/dbug/games/GlobalGameJam2016/code/transitions.s (nonexistent)
@@ -1,306 +0,0 @@
1-
2- .zero
3-
4-pos_y .dsb 1
5-save_y .dsb 1
6-
7- .text
8-
9-
10-; 16 entries
11-MiniTableUnroll
12- .byt 0 ; The normal line of the picture
13- .byt 255 ; A black line for special effect
14- .byt 32
15- .byt 29
16- .byt 27
17- .byt 26
18- .byt 25
19- .byt 24
20- .byt 23
21- .byt 22
22- .byt 21
23- .byt 20
24- .byt 19
25- .byt 17
26- .byt 14
27- .byt 10
28- .byt 255 ; A black line for special effect
29-
30-
31-
32-_PictureTransitionUnroll
33-.(
34- ldy #238
35-loop_frame
36- sty pos_y
37-
38- ldx #0
39-loop_roll
40- lda MiniTableUnroll,x
41- bmi no_wrap
42- clc
43- adc pos_y
44-no_wrap
45- tay
46-
47- lda _PictureLoadBufferAddrLow,y
48- sta tmp0+0
49- lda _PictureLoadBufferAddrHigh,y
50- sta tmp0+1
51-
52- clc
53- txa
54- adc pos_y
55- tay
56-
57- lda _ScreenAddrLow,y
58- sta tmp1+0
59- lda _ScreenAddrHigh,y
60- sta tmp1+1
61-
62- ; Copy from right to left to limit the attribute corruption effects
63- ldy #40
64-loop
65- lda (tmp0),y
66- sta (tmp1),y
67- dey
68- bne loop
69-
70- inx
71- cpx #16
72- bne loop_roll
73-
74- jsr _VSync
75-
76- ldy pos_y
77- iny
78- cpy #216
79- bne loop_frame
80-
81- rts
82-.)
83-
84-
85-
86-; A simple copy with multiple simultaneous displayed bands
87-; tmp0 -> tmp1
88-; tmp2 -> tmp3
89-; tmp4 -> tmp5
90-; tmp6 -> tmp7
91-_PictureTransitionVenicianStore
92-.(
93- ldx #0
94-loop_frame
95-
96- lda _PictureLoadBufferAddrLow,x
97- sta tmp0+0
98- lda _PictureLoadBufferAddrHigh,x
99- sta tmp0+1
100-
101- lda _ScreenAddrLow,x
102- sta tmp1+0
103- lda _ScreenAddrHigh,x
104- sta tmp1+1
105-
106-
107- lda _PictureLoadBufferAddrLow+50,x
108- sta tmp2+0
109- lda _PictureLoadBufferAddrHigh+50,x
110- sta tmp2+1
111-
112- lda _ScreenAddrLow+50,x
113- sta tmp3+0
114- lda _ScreenAddrHigh+50,x
115- sta tmp3+1
116-
117- lda _PictureLoadBufferAddrLow+100,x
118- sta tmp4+0
119- lda _PictureLoadBufferAddrHigh+100,x
120- sta tmp4+1
121-
122- lda _ScreenAddrLow+100,x
123- sta tmp5+0
124- lda _ScreenAddrHigh+100,x
125- sta tmp5+1
126-
127-
128- lda _PictureLoadBufferAddrLow+150,x
129- sta tmp6+0
130- lda _PictureLoadBufferAddrHigh+150,x
131- sta tmp6+1
132-
133- lda _ScreenAddrLow+150,x
134- sta tmp7+0
135- lda _ScreenAddrHigh+150,x
136- sta tmp7+1
137-
138- ; Copy from right to left to limit the attribute corruption effects
139- ldy #40
140-loop
141- lda (tmp0),y
142- sta (tmp1),y
143-
144- lda (tmp2),y
145- sta (tmp3),y
146-
147- lda (tmp4),y
148- sta (tmp5),y
149-
150- lda (tmp6),y
151- sta (tmp7),y
152-
153- dey
154- bne loop
155-
156- jsr _VSync
157-
158- inx
159- cpx #50
160- bne loop_frame
161-
162- rts
163-.)
164-
165-
166-
167-; A simple copy from the top and bottom at the same time
168-; tmp0 -> tmp1
169-; tmp2 -> tmp3
170-_PictureTransitionFromTopAndBottom
171-.(
172- ldx #0
173- ldy #199
174-loop_frame
175-
176- lda _PictureLoadBufferAddrLow,x
177- sta tmp0+0
178- lda _PictureLoadBufferAddrHigh,x
179- sta tmp0+1
180-
181- lda _ScreenAddrLow,x
182- sta tmp1+0
183- lda _ScreenAddrHigh,x
184- sta tmp1+1
185-
186- lda _PictureLoadBufferAddrLow,y
187- sta tmp2+0
188- lda _PictureLoadBufferAddrHigh,y
189- sta tmp2+1
190-
191- lda _ScreenAddrLow,y
192- sta tmp3+0
193- lda _ScreenAddrHigh,y
194- sta tmp3+1
195-
196- sty save_y
197-
198- ; Copy from right to left to limit the attribute corruption effects
199- ldy #40
200-loop
201- lda (tmp0),y
202- sta (tmp1),y
203- lda (tmp2),y
204- sta (tmp3),y
205- dey
206- bne loop
207-
208- jsr _VSync
209-
210- ldy save_y
211- dey
212- inx
213- cpx #100
214- bne loop_frame
215-
216- rts
217-.)
218-
219-
220-
221-
222-
223-_InitTransitionDataBuffer1
224- lda #<_BufferPicture1-1
225- sta tmp0+0
226- lda #>_BufferPicture1-1
227- sta tmp0+1
228- jmp _InitTransitionData
229-
230-
231-_InitTransitionDataBuffer2
232- lda #<_BufferPicture2-1
233- sta tmp0+0
234- lda #>_BufferPicture2-1
235- sta tmp0+1
236- jmp _InitTransitionData
237-
238-_InitTransitionDataBuffer3
239- lda #<_BufferPicture3-1
240- sta tmp0+0
241- lda #>_BufferPicture3-1
242- sta tmp0+1
243- jmp _InitTransitionData
244-
245-_InitTransitionDataBuffer4
246- lda #<_BufferPicture4-1
247- sta tmp0+0
248- lda #>_BufferPicture4-1
249- sta tmp0+1
250- jmp _InitTransitionData
251-
252-_InitTransitionData
253-.(
254- lda #<$a000-1
255- sta tmp1+0
256- lda #>$a000-1
257- sta tmp1+1
258-
259- .(
260- ldx #0
261-loop
262- clc
263- lda tmp0+0
264- sta _PictureLoadBufferAddrLow,x
265- adc #40
266- sta tmp0+0
267- lda tmp0+1
268- sta _PictureLoadBufferAddrHigh,x
269- adc #0
270- sta tmp0+1
271-
272- clc
273- lda tmp1+0
274- sta _ScreenAddrLow,x
275- adc #40
276- sta tmp1+0
277- lda tmp1+1
278- sta _ScreenAddrHigh,x
279- adc #0
280- sta tmp1+1
281-
282- inx
283- cpx #200
284- bne loop
285- .)
286-
287- .(
288-loop
289- lda #<_EmptySourceScanLine
290- sta _PictureLoadBufferAddrLow,x
291- lda #>_EmptySourceScanLine
292- sta _PictureLoadBufferAddrHigh,x
293-
294- lda #<_EmptyDestinationScanLine
295- sta _ScreenAddrLow,x
296- lda #>_EmptyDestinationScanLine
297- sta _ScreenAddrHigh,x
298-
299- inx
300- bne loop
301- .)
302-
303- rts
304-.)
305-
306-
--- users/dbug/games/GlobalGameJam2016/code/digiplayer.s (revision 1366)
+++ users/dbug/games/GlobalGameJam2016/code/digiplayer.s (nonexistent)
@@ -1,185 +0,0 @@
1-
2- .zero
3-
4-#define VIA_1 $30f
5-#define VIA_2 $30c
6-
7-//#define VIA_TIMER_DELAY 250 // 4Khz
8-#define VIA_TIMER_DELAY 125 // 8Khz
9-//#define VIA_TIMER_DELAY 100 // 8Khz
10-
11-; 20 kb = 10 seconds
12-; 30 kb = 30 seconds
13-
14-IRQ_SAVE_A .dsb 1
15-IRQ_SAVE_X .dsb 1
16-IRQ_SAVE_Y .dsb 1
17-
18-IRQ_SAVE_A2 .dsb 1
19-IRQ_SAVE_X2 .dsb 1
20-IRQ_SAVE_Y2 .dsb 1
21-
22-
23-digiplayer_start_sample
24-digiplayer_start_sample_low .dsb 1
25-digiplayer_start_sample_high .dsb 1
26-
27-digiplayer_nextsample .dsb 1
28-
29- .text
30-
31-#define START_SAMPLE $400
32-
33-_DigiPlayer_InstallIrq
34-.(
35- //jmp _InterruptInstall
36- sei
37-
38- // Prepare replay
39- jsr _MakeSound
40-
41- lda #<START_SAMPLE
42- sta digiplayer_start_sample_low
43- lda #>START_SAMPLE
44- sta digiplayer_start_sample_high
45-
46-
47- // Set the VIA parameters
48- lda #<VIA_TIMER_DELAY
49- sta $306
50- lda #>VIA_TIMER_DELAY
51- sta $307
52-
53- // Install interrupt
54- lda #<_InterruptCode_Low
55- sta $FFFE
56- lda #>_InterruptCode_Low
57- sta $FFFF
58- cli
59-
60- rts
61-.)
62-
63-
64-_MakeSound
65- // Canal settings
66- ldy #7
67- ldx #%11111111
68- jsr _PsgSetRegister
69-
70- // Volume
71- ldy #10
72- ldx #0
73- jsr _PsgSetRegister
74-
75- // Volume
76- ldy #9
77- ldx #0
78- jsr _PsgSetRegister
79-
80- // Volume
81- ldy #8
82- ldx #0
83- jsr _PsgSetRegister
84- rts
85-
86-
87-// y=control register
88-// x=data register
89-_PsgSetRegister
90- sty VIA_1
91-
92- lda VIA_2
93- ora #$EE ; $EE 238 11101110
94- sta VIA_2
95- lda #$CC ; $CC 204 11001100
96- sta VIA_2
97-
98- stx VIA_1
99- lda #$EC ; $EC 236 11101100
100- sta VIA_2
101- lda #$CC ; $CC 204 11001100
102- sta VIA_2
103- rts
104-
105-
106-
107-
108-Counter .dsb 1
109-
110-
111-//
112-// Interrupt code that replay a sample using volume
113-//
114-
115- .dsb 256-(*&255)
116-
117-_InterruptCode_Low
118- ;jmp _InterruptCode_Low
119-.(
120- inc $FFFF ; Switch to the second interrupt handler
121- bit $304
122-
123- sta IRQ_SAVE_A ; 3
124- sty IRQ_SAVE_Y ; 3
125-
126- //
127- // Get sample low part
128- //
129- ldy #0
130- lda (digiplayer_start_sample),y
131- ;beq end_of_sample
132- inc digiplayer_start_sample
133- bne skip
134- inc digiplayer_start_sample+1
135-skip
136- sta digiplayer_nextsample
137- and #$0F
138-
139- sta VIA_1
140- lda #$EC ; $EC 236 11101100
141- sta VIA_2
142- lda #$CC ; $CC 204 11001100
143- sta VIA_2
144-
145- ldy IRQ_SAVE_Y ; 3
146- lda IRQ_SAVE_A ; 3
147-
148- rti
149-.)
150-
151- .dsb 256-(*&255)
152-
153-_InterruptCode_High
154-.(
155- dec $FFFF ; Switch to the first interrupt handler
156- bit $304 // VIA_T1CL ; Turn off interrupt early. (More on that below
157-
158- sta IRQ_SAVE_A2
159- ;sty IRQ_SAVE_Y2
160-
161- ;
162- ; Get sample high part
163- ;
164- lda digiplayer_nextsample
165- lsr
166- lsr
167- lsr
168- lsr
169-
170- sta VIA_1
171- lda #$EC ; $EC 236 11101100
172- sta VIA_2
173- lda #$CC ; $CC 204 11001100
174- sta VIA_2
175-
176- lda IRQ_SAVE_A2
177- ;ldy IRQ_SAVE_Y2
178-
179- rti
180-.)
181-
182-
183-
184-
185-
Show on old repository browser