]> 4ch.mooo.com Git - 16.git/blob - src/palllist.c
eb428c1d6b9ba81ea78a72755601e29ea6f0828c
[16.git] / src / palllist.c
1 /* Project 16 Source Code~\r
2  * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
3  *\r
4  * This file is part of Project 16.\r
5  *\r
6  * Project 16 is free software; you can redistribute it and/or modify\r
7  * it under the terms of the GNU General Public License as published by\r
8  * the Free Software Foundation; either version 3 of the License, or\r
9  * (at your option) any later version.\r
10  *\r
11  * Project 16 is distributed in the hope that it will be useful,\r
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14  * GNU General Public License for more details.\r
15  *\r
16  * You should have received a copy of the GNU General Public License\r
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
18  * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
19  * Fifth Floor, Boston, MA 02110-1301 USA.\r
20  *\r
21  */\r
22 /*\r
23  * palllist experiment\r
24  */\r
25 /*\r
26  * An experiment where I make 2 small linked list which points to 2 arrays\r
27  * one is the "hardware palette" array\r
28  * the other is "image palette" array\r
29  * and their respectable pointers point to their [i] stuff\r
30  *\r
31  * the palette updater stuff i want to make is this:\r
32  *\r
33  * VGA          IMG\r
34  * 1-                   2-\r
35  * 2-                   4-\r
36  * 3-                   0-\r
37  * 4-                   9-\r
38  * 5-                   0-(I will figure this out later if  there is dup numbs)\r
39  * 6-\r
40  * 7-\r
41  * 8-\r
42  *\r
43  *              MERGE THEM INTO\r
44  *\r
45  * VGA\r
46  * 1-\r
47  * 2->IMG[0]\r
48  * 3-\r
49  * 4->IMG[1]\r
50  * 5\r
51  * 6\r
52  * 7\r
53  * 8\r
54  * 9->IMG[3]\r
55  * 0->IMG[2]->IMG[4]\r
56  *\r
57  * i am going to work on a really big area of code it will be on the refresh system, the walking/scrolling system, things that use showpage, adding disableing 8087 functions if no 8087 detected, and a bunch of other things i cannot remember off the top of my head because i am BURNT. I need a small break~ -- -- -- -- update! i am working on this i made ZC_WALK and i am going to move to VRL/VRS soon! .\r
58  * ==== PRE SHOWPAGE TO SHOWMV CONVERSION ==== i am going to work on a really big area of code it will be on the refresh system, the walking/scrolling system, things that use showpage, adding disableing 8087 functions if no 8087 detected, and a bunch of other things i cannot remember off the top of my head because i am BURNT. I need a small break~ -- -- -- -- update! i am working on this i made ZC_WALK and i am going to move to VRL/VRS soon!\r
59  */\r
60 #include "src/lib/ll.h"\r
61 \r
62 void\r
63 main(int argc, char *argv[])\r
64 {\r
65         int i;\r
66         node_t * head = NULL;           node_t * heao = NULL;\r
67         head = malloc(sizeof(node_t));  heao = malloc(sizeof(node_t));\r
68         head->val = 0;                  heao->val = 9;\r
69         head->next=NULL;                heao->next=NULL;\r
70         head->id=0;                             heao->id=0;\r
71 \r
72         for(i=1; i<\r
73                 //PAL_SIZE\r
74                 7\r
75                 ; i++)\r
76         {\r
77                 if(!(i%3)) printf("\n   ");\r
78                 printf("%d,", i);\r
79                 pushe(head, i);\r
80         }\r
81 \r
82         printf("\n");\r
83 \r
84         for(i=8; i>0; i--)\r
85         {\r
86                 if(!(i%3)) printf("\n   ");\r
87                 printf("%d,", i);\r
88                 pushe(heao, i);\r
89         }\r
90         print_list(head);\r
91         printf("\n");\r
92         print_list(heao);\r
93         free(head);\r
94         free(heao);\r
95 }\r