/[projet1]/public/oric/demos/SlideShowDemo/code/main.c
Defence Force logotype

Contents of /public/oric/demos/SlideShowDemo/code/main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1015 - (show annotations)
Thu Dec 12 20:53:08 2013 UTC (5 years, 11 months ago) by dbug
File MIME type: text/plain
File size: 1609 byte(s)
Archived the latest version of the loader code.
It's still pretty much work in progress, but it would suck that my hard drive dies :p
1 //
2 // This program simply display a picture on the hires screen
3 //
4 #include <lib.h>
5
6 #include "floppy_description.h"
7
8 // irq.s
9 extern void System_InstallIRQ_SimpleVbl();
10 extern void VSync();
11
12 // player.s
13 extern unsigned char MusicLooped;
14 extern Mym_Initialize();
15 extern Mym_ReInitialize();
16
17 // loader_api.s
18 extern unsigned char LoaderApiEntryIndex;
19 extern void LoadFile();
20
21 void Pause()
22 {
23 int i;
24 for (i=0;i<50*5;i++)
25 {
26 VSync();
27 }
28 }
29
30 extern void Player_SetMusic_Birthday();
31
32 unsigned char CurrentMusic=LOADER_FIRST_MUSIC;
33 //int CounterMusicWhatever=50*2;
34
35 void main()
36 {
37 int y;
38 if (!is_overlay_enabled())
39 {
40 hires();
41 }
42 MusicLooped=1;
43
44 System_InstallIRQ_SimpleVbl();
45 LoaderApiEntryIndex=LOADER_FIRST_MUSIC+1;
46 //LoadFile();
47 //Mym_ReInitialize();
48
49 while (1)
50 {
51 if (MusicLooped)
52 {
53 poke(0xbb80+40*25,16 | ((peek(0xbb80+40*25)+1)&7) );
54 //MusicPlaying=1;
55 if ( (CurrentMusic<LOADER_FIRST_MUSIC) || (CurrentMusic>=LOADER_LAST_MUSIC) )
56 {
57 CurrentMusic=LOADER_FIRST_MUSIC;
58 }
59 LoaderApiEntryIndex=CurrentMusic;
60 LoadFile();
61 Mym_ReInitialize();
62 ++CurrentMusic;
63 }
64
65 //--CounterMusicWhatever;
66
67 for (LoaderApiEntryIndex=LOADER_FIRST_PICTURE;LoaderApiEntryIndex<LOADER_LAST_PICTURE;LoaderApiEntryIndex++)
68 {
69 LoadFile();
70 Pause();
71 }
72
73 /*
74 for (LoaderApiEntryIndex=LOADER_FIRST_MUSIC;LoaderApiEntryIndex<LOADER_LAST_MUSIC;LoaderApiEntryIndex++)
75 {
76 LoadFile();
77 Mym_Initialize();
78 //Pause();
79 }
80 */
81 VSync();
82 }
83
84 memset((unsigned char*)0xa000,0,8000);
85 }
86

  ViewVC Help
Powered by ViewVC 1.1.26