#include <acknex.h>
#include <default.c>
//
D3DVERTEX *vbuff0; //vertex manipulation workspace
//
TEXT* debug_txt =
{ pos_x = 10; pos_y = 10; strings = 5; font="courier#18"; flags = SHOW; }
//
//
void main()
{
wait(1); level_load(NULL); wait(1); diag("\n\n\n");
draw_textmode("Times",0,32,100); warn_level = 3; def_move();
//======================================================================================
//
int i=0; ENTITY* test = ent_create("testmodel.mdl", nullvector, NULL);
//
//--------------------------------------------------------------------------------------
//
ent_buffers(test, 0,0, &vbuff0, NULL,NULL);
str_cpy( (debug_txt.pstring)[0], "Initial values of Normal == ");
str_cat_num((debug_txt.pstring)[0], "%.0f, ", vbuff0[ent_status(test,0)/2].nx);
str_cat_num((debug_txt.pstring)[0], "%.0f, ", vbuff0[ent_status(test,0)/2].ny);
str_cat_num((debug_txt.pstring)[0], "%.0f", vbuff0[ent_status(test,0)/2].nz);
wait(-1); beep();
//
//--------------------------------------------------------------------------------------
//
ent_buffers(test, 0,0, &vbuff0, NULL,NULL);
for(i=0; i<ent_status(test,0); i++) { vbuff0[i].y += random(10)-5; }
//
str_cpy( (debug_txt.pstring)[1], "Immediately after Randomizing == ");
str_cat_num((debug_txt.pstring)[1], "%.0f, ", vbuff0[ent_status(test,0)/2].nx);
str_cat_num((debug_txt.pstring)[1], "%.0f, ", vbuff0[ent_status(test,0)/2].ny);
str_cat_num((debug_txt.pstring)[1], "%.0f", vbuff0[ent_status(test,0)/2].nz);
wait(-1); beep();
//
//--------------------------------------------------------------------------------------
//
ent_buffers(test, 0,0, &vbuff0, NULL,NULL);
str_cpy( (debug_txt.pstring)[2], "Some Frames After Randomizing == ");
str_cat_num((debug_txt.pstring)[2], "%.0f, ", vbuff0[ent_status(test,0)/2].nx);
str_cat_num((debug_txt.pstring)[2], "%.0f, ", vbuff0[ent_status(test,0)/2].ny);
str_cat_num((debug_txt.pstring)[2], "%.0f", vbuff0[ent_status(test,0)/2].nz);
wait(-1); beep();
//
//--------------------------------------------------------------------------------------
//
ent_fixnormals(test, test.frame); wait(-1); beep();
ent_buffers(test, 0,0, &vbuff0, NULL,NULL);
str_cpy( (debug_txt.pstring)[3], "Some Frames After ent_fixnormals == ");
str_cat_num((debug_txt.pstring)[3], "%.0f, ", vbuff0[ent_status(test,0)/2].nx);
str_cat_num((debug_txt.pstring)[3], "%.0f, ", vbuff0[ent_status(test,0)/2].ny);
str_cat_num((debug_txt.pstring)[3], "%.0f", vbuff0[ent_status(test,0)/2].nz);
//
//
}