13 #define Letter_start 135
14 #define letter_start 400
16 #define cc(X, Y, Z) case X: copy_start = Y; copy_width = Z; break
17 #define cw(X, Y) case X: copy_width = Y; break
23 void jprintf_internal(int, const char*);
25 void jpprintf(int x
, int y
, int color
, const char *format
, ...) {
30 start_y
= stop_edge
+ y
* char_height
+ y
-1;
34 printf("You can't jprintf to line %i.\n", y
);
35 printf(" The range is currently: 0-6.\n");
39 start_x
= left_edge
+1 + x
* char_width
;
42 va_start(arguments
, format
);
43 vsnprintf(line
, 80, format
, arguments
);
46 jprintf_internal(color
, line
);
49 void jprintf(int color
, const char *format
, ...) {
53 va_start(arguments
, format
);
54 vsnprintf(line
, 80, format
, arguments
);
57 jprintf_internal(color
, line
);
60 void jprintf_internal(int color
, const char *line
) {
67 printf("You must make at least one call to jpprintf()\n");
73 while(line
[string_position
] != '\0') {
74 cur_char
= line
[string_position
];
76 copy_width
= char_width
;
78 if(cur_char
>='0' && cur_char
<='9') {
79 copy_start
= (cur_char
-'0')*char_width
+num_start
;
81 else if(cur_char
>='A' && cur_char
<='Z') {
82 copy_start
= (cur_char
-'A')*char_width
+Letter_start
;
84 else if(cur_char
>='a' && cur_char
<='z') {
85 copy_start
= (cur_char
-'a')*char_width
+letter_start
;
129 if(start_x
+line_position
+char_width
> right_edge
)
132 if(copy_start
) copyXPMArea(
137 start_x
+line_position
,
141 line_position
+= copy_width
;