]> hackdaworld.org Git - physik/morpheus.git/commitdiff
-
authorhackbard <hackbard>
Tue, 1 Apr 2003 19:22:33 +0000 (19:22 +0000)
committerhackbard <hackbard>
Tue, 1 Apr 2003 19:22:33 +0000 (19:22 +0000)
defines.h
display.c
main.c

index 7e9b07db3724c1e0d5f9831be48c8eb18d32fc32..60befa56d498a37c2c4492d1e9ab6b73e02d01b6 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -65,5 +65,7 @@ typedef struct __display {
 /* masks for u32 cell */
 #define AMORPH 0x00000001
 #define CRYSTAL 0x00000000
+#define NAMORPH 0xfffffffe
+#define NCRYSTAL 0xffffffff
 #define C_CONC_MASK 0xfffffffe
 
index 6b970578298b8cef1c833587398db5ac19bf6db8..16f379a8358108f5757d45d0ba389b10aa18f76a 100644 (file)
--- a/display.c
+++ b/display.c
@@ -173,6 +173,7 @@ int display_event_init(display *display)
 int display_scan_event(display *display,u32 *x,u32 *y,u32 *z,int *quit)
 {
  DFBInputEvent keyboard_event;
+ display->keyboard_buffer->WaitForEvent(display->keyboard_buffer);
  display->keyboard_buffer->GetEvent(display->keyboard_buffer,DFB_EVENT(&keyboard_event));
  if(keyboard_event.type==DIET_KEYPRESS)
  {
diff --git a/main.c b/main.c
index 7159a7b277188572b02f67f8e3493bb70a8d29cc..1dbe2baac993ada8da463059ad606242be4b4c89 100644 (file)
--- a/main.c
+++ b/main.c
@@ -218,6 +218,11 @@ int main(int argc,char **argv)
 
   // process_cell((u32 *)(cell_p+x+y*(x_cell-1)+z*(x_cell-1)*(y_cell-1)));
   process_cell(cell_p,x,y,z,x_cell,y_cell,z_cell,a_p_range,a_p_faktor,a_p_p0);
+  if(*(u32 *)(cell_p+x+y*(x_cell-1)+z*(x_cell-1)*(y_cell-1)) && *(u32 *)(cell_p+x+y*(x_cell-1)+z*(x_cell-1)*(y_cell-1))!=1)
+  { 
+   printfd("debug: x: %u y: %u z: %u -> %x\n",x,y,z,*(u32 *)(cell_p+x+y*(x_cell-1)+z*(x_cell-1)*(y_cell-1)));
+  }
 
   /* display stuff */
   if((i%display_refresh_rate)==0)
@@ -228,17 +233,11 @@ int main(int argc,char **argv)
  display_draw(&display,display_x,display_y,display_z);
  display_event_init(&display);
 
- /* debug ... */
- for(i=0;i<x_cell*y_cell*z_cell;++i)
- {
-  if(*(u32 *)(cell_p+i))
-  printf("%d -> 0x%x\n",i,*(u32 *)(cell_p+i));
- }
-
  while(!quit)
  {
   display_scan_event(&display,&display_x,&display_y,&display_z,&quit);
   display_draw(&display,display_x,display_y,display_z);
+  printfd("idle?\n");
  }
 
  display_release(&display);