Browse Source

testing view options

master
milang 7 months ago
parent
commit
061b900bb3
7 changed files with 443 additions and 456 deletions
  1. BIN
      1v13D.g1a
  2. BIN
      INIT/CasioRAM.mem
  3. +416
    -393
      build-fx/map
  4. BIN
      build-fx/src/1v13D.bin
  5. BIN
      build-fx/src/main.o
  6. +1
    -1
      project.cfg
  7. +26
    -62
      src/main.c

BIN
1v13D.g1a View File


BIN
INIT/CasioRAM.mem View File


+ 416
- 393
build-fx/map
File diff suppressed because it is too large
View File


BIN
build-fx/src/1v13D.bin View File


BIN
build-fx/src/main.o View File


+ 1
- 1
project.cfg View File

@@ -16,7 +16,7 @@ ICON_CG_SEL = assets-cg/icon-cg-sel.png
# Additional compiler flags
CFLAGS = -std=c11 -Os
# Additional linker flags
LDFLAGS = -llog -lfxengine -lgint-fx -lprof
LDFLAGS = -lfxengine -llog-fx -lgint-fx -lprof

# FxEngine font
# FONT.FxEngine.png = charset:print grid.size:3x5 grid.padding:1 proportional:true

+ 26
- 62
src/main.c View File

@@ -57,13 +57,10 @@ int main(void)

int main(void)
{
fe_custom_panic();
//init_controls();
ll_set_state(1);
ll_set_panic();
ll_send("Log Beginning\n");
dclear(C_WHITE);
//render_integer_point point[4]={{{10,0,0},{0,0,0}},{{10,10,0},{0,0,0}},{{10,0,10},{0,0,0}},{{10,10,10},{0,0,0}}};
//FE_face face={&point[0],&point[1],&point[2],1,2};
//FE_face face2={&point[3],&point[1],&point[2],0,2};

uint32_t color[32] =
{
0b11111111111111111111111111111111,
@@ -99,31 +96,26 @@ int main(void)
0b11111111111111111111111111111111,
0b11111111111111111111111111111111
};

fe_texture_rich * bmp = fe_texture_new_rich(32, 32, color, 0, 0, 0);

//fe_texture_debug(bmp);

fe_ivertex v[4]=
{
{
{300,-100,-100},
{30,-10,-10},
{0,0,0}
},
{
{30,100,100},
{30,10,10},
{0,0,0}
},
{
{300,-100,100},
{30,-10,10},
{0,0,0}
},
{
{300,100,-100},
{30,10,-10},
{0,0,0}
}
};

fe_object object;
fe_object_init(&object);
fe_object_set_points(&object, &v, 4, 0);
@@ -146,16 +138,17 @@ int main(void)
0
}
};
fe_object_set_faces(&object, &triangle, 1, 0);


fe_object_set_faces(&object, &triangle, 2, 0);
bool state=1;
//fe_object_debug(&object);
fe_camera cam = {{0,0,0},{0,0,0},0,0,0};
fe_camera cam = {{20,20,0},{20,20,0},0,0,0};
int fps;
while (1)
{
label:;
int state=1;

key_event_t event = pollevent();
if (event.type!=KEYEV_NONE)
while (event.type!=KEYEV_NONE)
{
//ll_log(str);
if (event.key == KEY_LEFT)
@@ -193,59 +186,30 @@ int main(void)

cam.dv = fe_modulo_2pi(cam.dv);





if (event.key == KEY_EXIT)
break;
if (event.key == KEY_MENU)
return;
if (event.key==KEY_F1 && event.type==KEYEV_DOWN)
state = !state;
goto label;
{
ll_pause();
}
event=pollevent();
}

fe_view_set(&cam);
fe_object_display(&object);

char str[1000];
/* sprintf(str, "S1 %d %d %d",
fe_object_get_vertex(&object, 0)->x,
fe_object_get_vertex(&object, 0)->y,
fe_object_get_vertex(&object, 0)->z);
fe_log(str);

sprintf(str, "S2 %d %d %d",
fe_object_get_vertex(&object, 1)->x,
fe_object_get_vertex(&object, 1)->y,
fe_object_get_vertex(&object, 1)->z);
fe_log(str);

sprintf(str, "S3 %d %d %d",
fe_object_get_vertex(&object, 2)->x,
fe_object_get_vertex(&object, 2)->y,
fe_object_get_vertex(&object, 2)->z);
*/

sprintf(str, "Camera Settings :\n>> x %d; y %d; z %d\n>> dh %d; dv %d",
char str[300];
sprintf(str, "\nCamera Settings :\n>> x %d; y %d; z %d;\n>> dh %d; dv %d;\n",
cam.pos.x,
cam.pos.y,
cam.pos.z,
(int)(cam.dh*180/pi),
(int)(cam.dv*180/pi)
);
ll_log(str);



if (state)
{
fe_display(1);
}
else
{
fe_update(1);
ll_display_log();
}
ll_send(str);
sprintf(str,"FPS=%d",fps);
dtext(1,1,str,C_BLACK,C_NONE);
fps=fe_display(0);

}



Loading…
Cancel
Save