+++ /dev/null
-/* Project 16 Source Code~\r
- * Copyright (C) 2012-2018 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
- *\r
- * This file is part of Project 16.\r
- *\r
- * Project 16 is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * Project 16 is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program. If not, see <http://www.gnu.org/licenses/>, or\r
- * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
- * Fifth Floor, Boston, MA 02110-1301 USA.\r
- *\r
- */\r
-/*\r
- * palllist experiment\r
- */\r
-/*\r
- * An experiment where I make 2 small linked list which points to 2 arrays\r
- * one is the "hardware palette" array\r
- * the other is "image palette" array\r
- * and their respectable pointers point to their [i] stuff\r
- *\r
- * the palette updater stuff i want to make is this:\r
- *\r
- * VGA IMG\r
- * 1- 2-\r
- * 2- 4-\r
- * 3- 0-\r
- * 4- 9-\r
- * 5- 0-(I will figure this out later if there is dup numbs)\r
- * 6-\r
- * 7-\r
- * 8-\r
- *\r
- * MERGE THEM INTO\r
- *\r
- * VGA\r
- * 1-\r
- * 2->IMG[0]\r
- * 3-\r
- * 4->IMG[1]\r
- * 5\r
- * 6\r
- * 7\r
- * 8\r
- * 9->IMG[3]\r
- * 0->IMG[2]->IMG[4]\r
- *\r
- * 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
- * ==== 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
- */\r
-#include "src/lib/ll.h"\r
-\r
-#if 0\r
-//def OTHERMERGELISTSTIFF\r
-\r
-void\r
-main(int argc, char *argv[])\r
-{\r
- int i;\r
- node_t * vga = NULL; node_t * imgpal = NULL;\r
- vga = malloc(sizeof(node_t)); imgpal = malloc(sizeof(node_t));\r
- vga->val = 24; imgpal->val = 9;\r
- vga->next=NULL; imgpal->next=NULL;\r
- vga->id=0; imgpal->id=0;\r
-\r
- printf(" ");\r
- for(i=1; i<=\r
- //PAL_SIZE\r
- 6\r
- ; i++)\r
- {\r
- if(!(i%3)) printf("\n ");\r
- printf("%d,", i);\r
- pushe(vga, i);\r
- }\r
-\r
- printf("\n\n ");\r
-\r
- for(i=4; i>0; i--)\r
- {\r
- if(!(i%3)) printf("\n ");\r
- printf("%d,", i);\r
- pushe(imgpal, i);\r
- }\r
- printf("\n");\r
-\r
- printf("size of vga = %d\n", listLength(vga));\r
-//#if 0\r
- printf("\n=======================\n");\r
- printf("vga list printings\n=======================\n");\r
- print_list(vga);\r
- printf("\n=======================\n");\r
- printf("imgpal list printings\n=======================\n");\r
- print_list(imgpal);\r
-// printf("\n=======================\n");\r
-//#endif\r
- i=1;//skip overscan\r
- while(i!=listLength(imgpal))\r
- {\r
- \r
- }\r
- free(vga);\r
- free(imgpal);\r
-}\r
-#else\r
-#if 0\r
-/* C/C++ program to merge two sorted linked lists */\r
-// from http://www.geeksforgeeks.org/merge-two-sorted-linked-lists/\r
-\r
-/* Drier program to test above functions*/\r
-void main()\r
-{\r
- /* Start with the empty list */\r
- struct node* res = NULL;\r
- struct node* a = NULL;\r
- struct node* b = NULL;\r
-\r
- /* Let us create two sorted linked lists to test\r
- the functions\r
- Created lists, a: 5->10->15, b: 2->3->20 */\r
- pushll(&a, 15);\r
- pushll(&a, 10);\r
- pushll(&a, 4);\r
- pushll(&a, 3);\r
- pushll(&a, 2);\r
- pushll(&a, 1);\r
- pushll(&a, 0);\r
-\r
- pushll(&b, 20);\r
- pushll(&b, 3);\r
- pushll(&b, 2);\r
- pushll(&b, 4);\r
-\r
- printf("\n");\r
- printf("The 2 Linked List are: \n");\r
- printList(a); printf("\n");\r
- printList(b); printf("\n");\r
-\r
- /* Remove duplicates from linked list */\r
- res = SortedMerge(a, b);\r
-// res = LL_merge(a, b);\r
- \r
- printf("Merged Linked List is: \n");\r
- printList(res);\r
-}\r
-#endif\r
-/* C Program to remove duplicates from a sorted linked list */\r
-\r
-/* Drier program to test above functions*/\r
-void main()\r
-{\r
- /* Start with the empty list */\r
- struct node* head = NULL;\r
- \r
- /* Let us create a sorted linked list to test the functions\r
- Created linked list will be 11->11->11->13->13->20 */\r
- pushll(&head, 20);\r
- pushll(&head, 13);\r
- pushll(&head, 13);\r
- pushll(&head, 11);\r
- pushll(&head, 11);\r
- pushll(&head, 11);\r
-\r
- printf("\n Linked list before duplicate removal ");\r
- printList(head);\r
-\r
- /* Remove duplicates from linked list */\r
- removeDuplicates(head);\r
-\r
- printf("\n Linked list after duplicate removal ");\r
- printList(head);\r
-}\r
-#endif\r