/* display stuff */
typedef struct __display {
u32 max_x,max_y,max_z; /* dimensions */
- u32 *cell_p; /* pointer to cell data */
+ void *cell_p; /* pointer to cell data */
#ifdef USE_DFB_API
IDirectFB *dfb; /* pointer to dfb main construct */
IDirectFBSurface *primary_surface; /* pointer to dfb primary surface */
#define DEFAULT_DISPLAY_Z 50
#define DEFAULT_DISPLAY_REF_RATE 100
+#define DISPLAY_X_FREE 15
+#define DISPLAY_Y_FREE 15
/* masks for u32 cell */
#define AMORPH 0x00000001
static int screen_height=0;
#endif
-int display_init(int x,int y,int z,display *display,u32 *cell,int *argc,char **argv)
+int display_init(int x,int y,int z,display *display,void *cell,int *argc,char **argv)
{
#ifdef USE_DFB_API
DFBSurfaceDescription surface_dsc;
return 23;
}
-int display_draw(u32 *cell,int x,int y,int z)
+int display_draw(display *display,int x,int y,int z)
{
#ifdef USE_DFB_API
+ int x_c,y_c;
+ int display_faktor_x,display_faktor_y;
+ if(((display->max_x+display->max_y+DISPLAY_X_FREE)>=display->screen_width)|
+ ((display->max_y+display->max_z+DISPLAY_Y_FREE)>=display->screen_height))
+ {
+ puts("resolution too low!");
+ return -23;
+ }
+ display_faktor_x=display->screen_width/(display->max_x+display->max_y);
+ display_faktor_y=display->screen_height/(display->max_z+display->max_y);
+ /* draw x-z surface */
+ // for(x_c=1;x_c<=display->max_x,x_c++)
+ // {
+
+
#endif
return 23;
/* display stuff */
if((i%display_refresh_rate)==0)
{
- puts("refreshing diplay ...");
+ puts("refreshing display ...");
// display_draw(&display,display_x,display_y,display_z);
}
/* */
}
/* display again and quit when button hit */
+ display_draw(&display,display_x,display_y,display_z);
puts("hit button to quit ...");
getchar();