projects
/
physik
/
morpheus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
70f65f1
)
some more dfb stuff
author
hackbard
<hackbard>
Mon, 24 Mar 2003 16:43:31 +0000
(16:43 +0000)
committer
hackbard
<hackbard>
Mon, 24 Mar 2003 16:43:31 +0000
(16:43 +0000)
defines.h
patch
|
blob
|
history
display.c
patch
|
blob
|
history
main.c
patch
|
blob
|
history
diff --git
a/defines.h
b/defines.h
index
0be5bc4
..
19ce139
100644
(file)
--- a/
defines.h
+++ b/
defines.h
@@
-36,7
+36,7
@@
typedef long long unsigned int u64;
/* display stuff */
typedef struct __display {
u32 max_x,max_y,max_z; /* dimensions */
/* 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 */
#ifdef USE_DFB_API
IDirectFB *dfb; /* pointer to dfb main construct */
IDirectFBSurface *primary_surface; /* pointer to dfb primary surface */
@@
-49,6
+49,8
@@
typedef struct __display {
#define DEFAULT_DISPLAY_Z 50
#define DEFAULT_DISPLAY_REF_RATE 100
#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
/* masks for u32 cell */
#define AMORPH 0x00000001
diff --git
a/display.c
b/display.c
index
f61e7e2
..
62612e7
100644
(file)
--- a/
display.c
+++ b/
display.c
@@
-15,7
+15,7
@@
static int screen_width=0;
static int screen_height=0;
#endif
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;
{
#ifdef USE_DFB_API
DFBSurfaceDescription surface_dsc;
@@
-46,9
+46,24
@@
int display_init(int x,int y,int z,display *display,u32 *cell,int *argc,char **a
return 23;
}
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
{
#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;
#endif
return 23;
diff --git
a/main.c
b/main.c
index
07f34c9
..
190955c
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-173,13
+173,14
@@
int main(int argc,char **argv)
/* display stuff */
if((i%display_refresh_rate)==0)
{
/* display stuff */
if((i%display_refresh_rate)==0)
{
- puts("refreshing diplay ...");
+ puts("refreshing di
s
play ...");
// 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);
}
/* */
}
/* display again and quit when button hit */
+ display_draw(&display,display_x,display_y,display_z);
puts("hit button to quit ...");
getchar();
puts("hit button to quit ...");
getchar();