1 /* Project 16 Source Code~
\r
2 * Copyright (C) 2012-2018 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
\r
4 * This file is part of Project 16.
\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
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
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
23 * palllist experiment
\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
31 * the palette updater stuff i want to make is this:
\r
38 * 5- 0-(I will figure this out later if there is dup numbs)
\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
60 #include "src/lib/ll.h"
\r
63 //def OTHERMERGELISTSTIFF
\r
66 main(int argc, char *argv[])
\r
69 node_t * vga = NULL; node_t * imgpal = NULL;
\r
70 vga = malloc(sizeof(node_t)); imgpal = malloc(sizeof(node_t));
\r
71 vga->val = 24; imgpal->val = 9;
\r
72 vga->next=NULL; imgpal->next=NULL;
\r
73 vga->id=0; imgpal->id=0;
\r
81 if(!(i%3)) printf("\n ");
\r
90 if(!(i%3)) printf("\n ");
\r
96 printf("size of vga = %d\n", listLength(vga));
\r
98 printf("\n=======================\n");
\r
99 printf("vga list printings\n=======================\n");
\r
101 printf("\n=======================\n");
\r
102 printf("imgpal list printings\n=======================\n");
\r
103 print_list(imgpal);
\r
104 // printf("\n=======================\n");
\r
106 i=1;//skip overscan
\r
107 while(i!=listLength(imgpal))
\r
116 /* C/C++ program to merge two sorted linked lists */
\r
117 // from http://www.geeksforgeeks.org/merge-two-sorted-linked-lists/
\r
119 /* Drier program to test above functions*/
\r
122 /* Start with the empty list */
\r
123 struct node* res = NULL;
\r
124 struct node* a = NULL;
\r
125 struct node* b = NULL;
\r
127 /* Let us create two sorted linked lists to test
\r
129 Created lists, a: 5->10->15, b: 2->3->20 */
\r
144 printf("The 2 Linked List are: \n");
\r
145 printList(a); printf("\n");
\r
146 printList(b); printf("\n");
\r
148 /* Remove duplicates from linked list */
\r
149 res = SortedMerge(a, b);
\r
150 // res = LL_merge(a, b);
\r
152 printf("Merged Linked List is: \n");
\r
156 /* C Program to remove duplicates from a sorted linked list */
\r
158 /* Drier program to test above functions*/
\r
161 /* Start with the empty list */
\r
162 struct node* head = NULL;
\r
164 /* Let us create a sorted linked list to test the functions
\r
165 Created linked list will be 11->11->11->13->13->20 */
\r
173 printf("\n Linked list before duplicate removal ");
\r
176 /* Remove duplicates from linked list */
\r
177 removeDuplicates(head);
\r
179 printf("\n Linked list after duplicate removal ");
\r