\hypertarget{fire__saver_8c_source}{}\doxysection{fire\+\_\+saver.\+c}
\label{fire__saver_8c_source}\index{dev/syscons/fire/fire\_saver.c@{dev/syscons/fire/fire\_saver.c}}
\mbox{\hyperlink{fire__saver_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1999 Brad Forschinger}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer,}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00012}00012 \textcolor{comment}{ *    without modification, immediately at the beginning of the file.}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00015}00015 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00017}00017 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00019}00019 \textcolor{comment}{ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00020}00020 \textcolor{comment}{ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00021}00021 \textcolor{comment}{ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00022}00022 \textcolor{comment}{ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00023}00023 \textcolor{comment}{ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00024}00024 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00025}00025 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00026}00026 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00027}00027 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00028}00028 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00029}00029 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00031}00031 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00032}00032 \textcolor{comment}{ * brad forschinger, 19990504 <retch@flag.blackened.net>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00033}00033 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00034}00034 \textcolor{comment}{ * written with much help from warp\_saver.c}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00035}00035 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00036}00036 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/syslog.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/consio.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/fbio.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <dev/fb/fbreg.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <dev/fb/splashreg.h>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{syscons_8h}{dev/syscons/syscons.h}}>}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00051}\mbox{\hyperlink{fire__saver_8c_a1bf66374306733d33e7b6c0cded75d7b}{00051}} \textcolor{preprocessor}{\#define SAVER\_NAME       "{}fire\_saver"{}}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00053}\mbox{\hyperlink{fire__saver_8c_af333739f5e307cd7cd6e64e7d228fcbd}{00053}} \textcolor{preprocessor}{\#define RED(n)           ((n) * 3 + 0)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00054}\mbox{\hyperlink{fire__saver_8c_af1f7ec126ee7b4a36eb2bbdd91dcfcca}{00054}} \textcolor{preprocessor}{\#define GREEN(n)         ((n) * 3 + 1)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00055}\mbox{\hyperlink{fire__saver_8c_a4c2c562834d8a2504714f4dbc6973db6}{00055}} \textcolor{preprocessor}{\#define BLUE(n)          ((n) * 3 + 2)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00057}\mbox{\hyperlink{fire__saver_8c_ae9302cc31d620f8d502ad4fb600622ab}{00057}} \textcolor{preprocessor}{\#define SET\_ORIGIN(adp, o) do \{                         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00058}00058 \textcolor{preprocessor}{        int oo = o;                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00059}00059 \textcolor{preprocessor}{        if (oo != last\_origin)                          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00060}00060 \textcolor{preprocessor}{            vidd\_set\_win\_org(adp, last\_origin = oo);    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00061}00061 \textcolor{preprocessor}{        \} while (0)}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00063}\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{00063}} \textcolor{keyword}{static} u\_char           *\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00064}\mbox{\hyperlink{fire__saver_8c_a26fe287880bc4ec25b4b68e6d3e59cb4}{00064}} \textcolor{keyword}{static} u\_char           *\mbox{\hyperlink{fire__saver_8c_a26fe287880bc4ec25b4b68e6d3e59cb4}{vid}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00065}\mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{00065}} \textcolor{keyword}{static} \textcolor{keywordtype}{int}               \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}}, \mbox{\hyperlink{fire__saver_8c_a341de0b3221e0c0f0c5766c827f242f1}{scrmode}}, \mbox{\hyperlink{fire__saver_8c_a51dd8d6cd777d66b127d0884b642e666}{bpsl}}, \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}}, \mbox{\hyperlink{fire__saver_8c_a2e9cb51790f9acde6aadcd48a3b66c86}{scrh}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00066}\mbox{\hyperlink{fire__saver_8c_a8ffc28e1a87c1d25631581bb6b50ce35}{00066}} \textcolor{keyword}{static} u\_char            \mbox{\hyperlink{fire__saver_8c_a8ffc28e1a87c1d25631581bb6b50ce35}{fire\_pal}}[768];}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00067}\mbox{\hyperlink{fire__saver_8c_a6c4737ed3d372e2e2ccc7dcc5d309bfd}{00067}} \textcolor{keyword}{static} \textcolor{keywordtype}{int}               \mbox{\hyperlink{fire__saver_8c_a6c4737ed3d372e2e2ccc7dcc5d309bfd}{blanked}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00070}\mbox{\hyperlink{fire__saver_8c_a3a32f927ac44aeded9223bbdfb3070d8}{00070}} \mbox{\hyperlink{fire__saver_8c_a3a32f927ac44aeded9223bbdfb3070d8}{fire\_update}}(video\_adapter\_t *adp)}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00071}00071 \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00072}00072         \textcolor{keywordtype}{int} \mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}}, \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00073}00073         \textcolor{keywordtype}{int} o, p;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00074}00074         \textcolor{keywordtype}{int} last\_origin = -\/1;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00076}00076         \textcolor{comment}{/* make a new bottom line */}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00077}00077         \textcolor{keywordflow}{for} (\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} = 0, \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} = \mbox{\hyperlink{fire__saver_8c_a2e9cb51790f9acde6aadcd48a3b66c86}{scrh}}; \mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} < \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}}; \mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}}++)}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00078}00078                 \mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} + (\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} * \mbox{\hyperlink{fire__saver_8c_a51dd8d6cd777d66b127d0884b642e666}{bpsl}})] = random() \% 160 + 96;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00080}00080         \textcolor{comment}{/* fade the flames out */}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00081}00081         \textcolor{keywordflow}{for} (\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} = 0; \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} < \mbox{\hyperlink{fire__saver_8c_a2e9cb51790f9acde6aadcd48a3b66c86}{scrh}}; \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}}++) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00082}00082                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} = 0; \mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} < \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}}; \mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}}++) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00083}00083                         \mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} + (\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}})] =}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00084}00084                             (\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[(\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} + 0) + ((\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} + 0) * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}})] +}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00085}00085                              \mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[(\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} -\/ 1) + ((\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} + 1) * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}})] +}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00086}00086                              \mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[(\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} + 0) + ((\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} + 1) * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}})] +}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00087}00087                              \mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[(\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} + 1) + ((\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} + 1) * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}})]) / 4;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00088}00088                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} + (\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}})] > 0)}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00089}00089                                 \mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}[\mbox{\hyperlink{plasma__saver_8c_a6150e0515f7202e2fb518f7206ed97dc}{x}} + (\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}})]-\/-\/;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00090}00090                 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00091}00091         \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00093}00093         \textcolor{comment}{/* blit our buffer into video ram */}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00094}00094         \textcolor{keywordflow}{for} (\mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} = 0, p = 0, o = 0; \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} < \mbox{\hyperlink{fire__saver_8c_a2e9cb51790f9acde6aadcd48a3b66c86}{scrh}}; \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}}++, p += \mbox{\hyperlink{fire__saver_8c_a51dd8d6cd777d66b127d0884b642e666}{bpsl}}) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00095}00095                 \textcolor{keywordflow}{while} (p > \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}}) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00096}00096                         p -\/= \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00097}00097                         o += \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00098}00098                 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00099}00099                 \mbox{\hyperlink{fire__saver_8c_ae9302cc31d620f8d502ad4fb600622ab}{SET\_ORIGIN}}(adp, o);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00100}00100                 \textcolor{keywordflow}{if} (p + \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}} < \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}}) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00101}00101                         bcopy(\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}} + \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}}, \mbox{\hyperlink{fire__saver_8c_a26fe287880bc4ec25b4b68e6d3e59cb4}{vid}} + p, \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}});}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00102}00102                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00103}00103                         bcopy(\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}} + \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}}, \mbox{\hyperlink{fire__saver_8c_a26fe287880bc4ec25b4b68e6d3e59cb4}{vid}} + p, \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}} -\/ p);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00104}00104                         \mbox{\hyperlink{fire__saver_8c_ae9302cc31d620f8d502ad4fb600622ab}{SET\_ORIGIN}}(adp, o + \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}});}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00105}00105                         bcopy(\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}} + \mbox{\hyperlink{plasma__saver_8c_a0a2f84ed7838f07779ae24c5a9086d33}{y}} * \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}} + (\mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}} -\/ p), \mbox{\hyperlink{fire__saver_8c_a26fe287880bc4ec25b4b68e6d3e59cb4}{vid}},}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00106}00106                               \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}} -\/ (\mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}} -\/ p));}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00107}00107                         p -\/= \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00108}00108                         o += \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00109}00109                 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00110}00110         \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00112}00112 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00114}00114 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00115}\mbox{\hyperlink{fire__saver_8c_ab2e10ae66e8590d415ec7c3e171fa6b0}{00115}} \mbox{\hyperlink{fire__saver_8c_ab2e10ae66e8590d415ec7c3e171fa6b0}{fire\_saver}}(video\_adapter\_t *adp, \textcolor{keywordtype}{int} blank)}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00116}00116 \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00117}00117         \textcolor{keywordtype}{int} pl;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00119}00119         \textcolor{keywordflow}{if} (blank) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00120}00120                 \textcolor{comment}{/* switch to graphics mode */}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00121}00121                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{fire__saver_8c_a6c4737ed3d372e2e2ccc7dcc5d309bfd}{blanked}} <= 0) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00122}00122                         pl = splhigh();}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00123}00123                         vidd\_set\_mode(adp, \mbox{\hyperlink{fire__saver_8c_a341de0b3221e0c0f0c5766c827f242f1}{scrmode}});}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00124}00124                         vidd\_load\_palette(adp, \mbox{\hyperlink{fire__saver_8c_a8ffc28e1a87c1d25631581bb6b50ce35}{fire\_pal}});}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00125}00125                         \mbox{\hyperlink{fire__saver_8c_a6c4737ed3d372e2e2ccc7dcc5d309bfd}{blanked}}++;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00126}00126                         \mbox{\hyperlink{fire__saver_8c_a26fe287880bc4ec25b4b68e6d3e59cb4}{vid}} = (u\_char *)adp-\/>va\_window;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00127}00127                         \mbox{\hyperlink{fire__saver_8c_ad778fec4abd2bd32f8f3d585609a58c0}{banksize}} = adp-\/>va\_window\_size;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00128}00128                         \mbox{\hyperlink{fire__saver_8c_a51dd8d6cd777d66b127d0884b642e666}{bpsl}} = adp-\/>va\_line\_width;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00129}00129                         splx(pl);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00130}00130                         vidd\_clear(adp);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00131}00131                 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00132}00132                 \mbox{\hyperlink{fire__saver_8c_a3a32f927ac44aeded9223bbdfb3070d8}{fire\_update}}(adp);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00133}00133         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00134}00134                 \mbox{\hyperlink{fire__saver_8c_a6c4737ed3d372e2e2ccc7dcc5d309bfd}{blanked}} = 0;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00135}00135         \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00137}00137     \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00138}00138 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00140}00140 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00141}\mbox{\hyperlink{fire__saver_8c_a41316c94b2ee019039141cee95ace274}{00141}} \mbox{\hyperlink{fire__saver_8c_a41316c94b2ee019039141cee95ace274}{fire\_init}}(video\_adapter\_t *adp)}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00142}00142 \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00143}00143         video\_info\_t info;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00144}00144         \textcolor{keywordtype}{int} i, red, green, blue;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00146}00146         \textcolor{keywordflow}{if} (!vidd\_get\_info(adp, M\_VGA\_CG320, \&info)) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00147}00147                 \mbox{\hyperlink{fire__saver_8c_a341de0b3221e0c0f0c5766c827f242f1}{scrmode}} = M\_VGA\_CG320;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00148}00148         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00149}00149                 log(LOG\_NOTICE,}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00150}00150                     \textcolor{stringliteral}{"{}\%s: the console does not support M\_VGA\_CG320\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00151}00151                     \mbox{\hyperlink{fire__saver_8c_a1bf66374306733d33e7b6c0cded75d7b}{SAVER\_NAME}});}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00152}00152                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00153}00153         \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00154}00154     }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00155}00155         \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}} = info.vi\_width;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00156}00156         \mbox{\hyperlink{fire__saver_8c_a2e9cb51790f9acde6aadcd48a3b66c86}{scrh}} = info.vi\_height;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00158}00158         \mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}} = (u\_char *)malloc(\mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}} * (\mbox{\hyperlink{fire__saver_8c_a2e9cb51790f9acde6aadcd48a3b66c86}{scrh}} + 1), M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00159}00159         \textcolor{keywordflow}{if} (\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00160}00160                 bzero(\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}, \mbox{\hyperlink{fire__saver_8c_a3396a316d98df733b5a5187860d92c2a}{scrw}} * (\mbox{\hyperlink{fire__saver_8c_a2e9cb51790f9acde6aadcd48a3b66c86}{scrh}} + 1));}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00161}00161         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00162}00162                 log(LOG\_NOTICE,}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00163}00163                     \textcolor{stringliteral}{"{}\%s: buffer allocation is failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00164}00164                     \mbox{\hyperlink{fire__saver_8c_a1bf66374306733d33e7b6c0cded75d7b}{SAVER\_NAME}});}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00165}00165                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00166}00166         \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00167}00167 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00168}00168         \textcolor{comment}{/* intialize the palette */}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00169}00169         red = green = blue = 0;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00170}00170         \textcolor{keywordflow}{for} (i = 0; i < 256; i++) \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00171}00171                 red++;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00172}00172                 \textcolor{keywordflow}{if} (red > 128)}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00173}00173                         green += 2;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00174}00174                 \mbox{\hyperlink{fire__saver_8c_a8ffc28e1a87c1d25631581bb6b50ce35}{fire\_pal}}[\mbox{\hyperlink{fire__saver_8c_af333739f5e307cd7cd6e64e7d228fcbd}{RED}}(i)] = red;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00175}00175                 \mbox{\hyperlink{fire__saver_8c_a8ffc28e1a87c1d25631581bb6b50ce35}{fire\_pal}}[\mbox{\hyperlink{fire__saver_8c_af1f7ec126ee7b4a36eb2bbdd91dcfcca}{GREEN}}(i)] = green;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00176}00176                 \mbox{\hyperlink{fire__saver_8c_a8ffc28e1a87c1d25631581bb6b50ce35}{fire\_pal}}[\mbox{\hyperlink{fire__saver_8c_a4c2c562834d8a2504714f4dbc6973db6}{BLUE}}(i)] = blue;}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00177}00177         \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00178}00178 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00179}00179         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00180}00180 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00182}00182 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00183}\mbox{\hyperlink{fire__saver_8c_a946c6555ebf779b7e6e14751c3fd1bbe}{00183}} \mbox{\hyperlink{fire__saver_8c_a946c6555ebf779b7e6e14751c3fd1bbe}{fire\_term}}(video\_adapter\_t *adp)}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00184}00184 \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00185}00185         free(\mbox{\hyperlink{fire__saver_8c_a57b7aeec0cdd7dc33c87931745f9ee74}{buf}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00186}00186         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00187}00187 \}}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00189}\mbox{\hyperlink{fire__saver_8c_a8ad2d0ecd749be0ba307622cc7329ebc}{00189}} \textcolor{keyword}{static} scrn\_saver\_t \mbox{\hyperlink{fire__saver_8c_a8ad2d0ecd749be0ba307622cc7329ebc}{fire\_module}} = \{}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00190}00190         \mbox{\hyperlink{fire__saver_8c_a1bf66374306733d33e7b6c0cded75d7b}{SAVER\_NAME}},}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00191}00191         \mbox{\hyperlink{fire__saver_8c_a41316c94b2ee019039141cee95ace274}{fire\_init}},}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00192}00192         \mbox{\hyperlink{fire__saver_8c_a946c6555ebf779b7e6e14751c3fd1bbe}{fire\_term}},}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00193}00193         \mbox{\hyperlink{fire__saver_8c_ab2e10ae66e8590d415ec7c3e171fa6b0}{fire\_saver}},}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00194}00194         NULL}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00195}00195 \};}
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{fire__saver_8c_source_l00197}\mbox{\hyperlink{fire__saver_8c_ac0db15bb169fe59600e8e3e4c1835429}{00197}} \mbox{\hyperlink{fire__saver_8c_ac0db15bb169fe59600e8e3e4c1835429}{SAVER\_MODULE}}(\mbox{\hyperlink{fire__saver_8c_ab2e10ae66e8590d415ec7c3e171fa6b0}{fire\_saver}}, \mbox{\hyperlink{fire__saver_8c_a8ad2d0ecd749be0ba307622cc7329ebc}{fire\_module}});}

\end{DoxyCode}
