+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2017 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
+ * 16 tail library\r
+ */\r
+\r
#include "src/lib/16_tail.h"\r
+#include "src/lib/16_vl.h"\r
\r
-void TL_VidInit(global_game_variables_t *gvar)\r
+//===========================================================================\r
+\r
+/*\r
+====================\r
+=\r
+= TL_DosLibStartup\r
+=\r
+====================\r
+*/\r
+\r
+void TL_DosLibStartup(global_game_variables_t *gvar)\r
{\r
- start_timer(gvar);\r
+ if(gvar->DLStarted)\r
+ return;\r
\r
// DOSLIB: check our environment\r
probe_dos();\r
_DEBUGF("Serial debug output printf test %u %u %u\n",1U,2U,3U);\r
\r
textInit();\r
+ gvar->DLStarted = true;\r
+}\r
+\r
+//===========================================================================\r
+\r
+/*\r
+====================\r
+=\r
+= TL_VidInit\r
+=\r
+====================\r
+*/\r
+\r
+void TL_VidInit(global_game_variables_t *gvar)\r
+{\r
+ start_timer(gvar);\r
+\r
+ if(!gvar->DLStarted) TL_DosLibStartup(gvar);\r
\r
// get old video mode\r
//in.h.ah = 0xf;\r
//int86(0x10, &in, &out);\r
- if(!gvar->video.old_mode) gvar->video.old_mode = vgaGetMode();//out.h.al;\r
- VL_LoadPalFileCore(gvar->video.palette);\r
+ if(!gvar->video.old_mode) gvar->video.old_mode = VL_vgaGetMode();//out.h.al;\r
gvar->video.VL_Initiated = 1;\r
}\r