/[projet1]/public/oric/routines/rasterization/CircleBench/Main.c
Defence Force logotype

Contents of /public/oric/routines/rasterization/CircleBench/Main.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 248 - (show annotations)
Fri Feb 5 19:08:05 2010 UTC (9 years, 9 months ago) by dbug
File MIME type: text/plain
File size: 2110 byte(s)
588 -> 573 (and cleaned up unused variables)
1
2 #include <lib.h>
3
4 // --------------------------------------
5 // CircleBench
6 // --------------------------------------
7 // (c) 2003-2008 Mickael Pointier.
8 // This code is provided as-is.
9 // I do not assume any responsability
10 // concerning the fact this is a bug-free
11 // software !!!
12 // Except that, you can use this example
13 // without any limitation !
14 // If you manage to do something with that
15 // please, contact me :)
16 // --------------------------------------
17 // --------------------------------------
18 // For more information, please contact me
19 // on internet:
20 // e-mail: enguita@gmail.com
21 // URL: http://www.defence-force.org
22 // --------------------------------------
23 // Note: This text was typed with a Win32
24 // editor. So perhaps the text will not be
25 // displayed correctly with other OS.
26
27
28 // ============================================================================
29 //
30 // Externals
31 //
32 // ============================================================================
33
34 #include "params.h"
35
36 //
37 // ===== circle.s =====
38 //
39 extern unsigned int CentreX; // Coordinate X of the circle centre
40 extern unsigned int CentreY; // Coordinate Y of the circle centre
41 extern unsigned int Radius; // Circle radius
42
43 void circleMidpoint();
44
45
46
47 void circle_Chema()
48 {
49 CentreX=120;
50 CentreY=100;
51 for (Radius=1;Radius<200;Radius++)
52 {
53 circleMidpoint();
54 }
55 }
56
57
58 void circle_basic()
59 {
60 unsigned int i;
61 curset(120,100,0);
62 for (i=1;i<99;i++)
63 {
64 circle(i,1);
65 }
66 }
67
68
69 void test()
70 {
71 unsigned int delay;
72
73 while (1)
74 {
75 // Chema routine first
76 printf("\nChema test: ");
77 *(unsigned int*)0x276=0;
78 circle_Chema();
79 delay=65536-(*(unsigned int*)0x276);
80 printf(" duration (in 100th of second): %d",delay);
81
82
83 // Basic routine second
84 /*
85 printf("\nBasic: ");
86 *(unsigned int*)0x276=0;
87 circle_basic();
88 delay=65536-(*(unsigned int*)0x276);
89 printf(" duration (in 100th of second): %d",delay);
90 */
91
92 }
93 }
94
95 int x,y;
96
97 void main()
98 {
99
100 GenerateTables();
101 hires();
102 paper(4);
103 test();
104 }
105
106

  ViewVC Help
Powered by ViewVC 1.1.26