3 * libneuro, a light weight abstraction of high or lower libraries
4 * and toolkit for applications.
5 * Copyright (C) 2005-2006 Nicholas Niro, Robert Lemay
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 * not yet included in the main stream, this is a dormant module
28 /*-------------------- Extern Headers Including --------------------*/
31 /*-------------------- Local Headers Including ---------------------*/
33 /*-------------------- Main Module Header --------------------------*/
37 /*-------------------- Other ----------------------------*/
39 /*-------------------- Global Variables ----------------------------*/
41 /*-------------------- Static Variables ----------------------------*/
43 /* 1 is that the pixels will be cleaned during this cycle and 0 is no it won't */
44 static u8 clean_pixel_in_this_cycle
;
46 /* the pixels buffer */
49 typedef struct PIXEL_ENGINE
54 /*-------------------- Static Prototypes ---------------------------*/
58 /*-------------------- Static Functions ----------------------------*/
70 current
= Neuro_GiveEBufCount(tmp
);
76 if (!Neuro_EBufIsEmpty(tmp
))
80 pix
= Neuro_GiveEBuf(tmp
, current
);
88 Neuro_CleanEBuf(&_Pixel
);
91 /*-------------------- Global Functions ----------------------------*/
94 Neuro_PutPixel(v_object
*vobj
, u32 x
, u32 y
, u32 pixel
)
107 if (secureBoundsCheck(&check))
109 printf("Unsecure Pixel position have been catched, dropping the instruction\n");
114 Neuro_AllocEBuf(tmp, sizeof(PIXEL_ENGINE*), sizeof(PIXEL_ENGINE));
116 current = Neuro_GiveEBufCount(tmp);
117 buf = Neuro_GiveEBuf(tmp, current);*/
119 Lib_PutPixel(vobj
, x
, y
, pixel
);
127 Neuro_GetPixel(v_object
*vobj
, u32 x
, u32 y
)
129 return Lib_GetPixel(vobj
, x
, y
);
135 clean_pixel_in_this_cycle
= 1;
138 /*-------------------- Poll ----------------------------------------*/
146 /*-------------------- Constructor Destructor ----------------------*/
151 Neuro_CreateEBuf(&_Pixel
);
159 Neuro_CleanEBuf(&_Pixel
);