#105113 - shadowghost21 - Fri Oct 06, 2006 2:28 am
I am writing a LegoCad program for the NDS in C using the PAlib. The parts library for the pc version of the program are in dats. Each DAT contains some coordinates ill post an example of a 1x1 brick
0 is a comment 1, is an include (with the file to include at the end) and 4, is a quad. Now I need to take info from this DAT and put them into coordinates to draw bricks. im not quite sure how to go about this. If any one can give me some advice, example code (quick and dirty) to get an idea, it would save me many a headache for the next few days.
Code: |
0 Brick 1 x 1 0 Name: 3005.dat 0 Author: James Jessiman 0 Original LDraw Part 0 LDRAW_ORG Part UPDATE 2002-03 0 BFC CERTIFY CCW 0 2002-05-07 KJM BFC Certification 0 BFC INVERTNEXT 1 16 0 24 0 6 0 0 0 -20 0 0 0 6 box5.dat 4 16 10 24 10 6 24 6 -6 24 6 -10 24 10 4 16 -10 24 10 -6 24 6 -6 24 -6 -10 24 -10 4 16 -10 24 -10 -6 24 -6 6 24 -6 10 24 -10 4 16 10 24 -10 6 24 -6 6 24 6 10 24 10 1 16 0 24 0 10 0 0 0 -24 0 0 0 10 box5.dat 1 16 0 0 0 1 0 0 0 1 0 0 0 1 stud.dat 0 |
0 is a comment 1, is an include (with the file to include at the end) and 4, is a quad. Now I need to take info from this DAT and put them into coordinates to draw bricks. im not quite sure how to go about this. If any one can give me some advice, example code (quick and dirty) to get an idea, it would save me many a headache for the next few days.