You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(136) |
Dec
(218) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(214) |
Feb
(208) |
Mar
(186) |
Apr
(15) |
May
(3) |
Jun
(35) |
Jul
(6) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(58) |
Aug
(123) |
Sep
(31) |
Oct
(9) |
Nov
|
Dec
(1) |
2006 |
Jan
(25) |
Feb
(10) |
Mar
(25) |
Apr
(61) |
May
|
Jun
(78) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <yu...@us...> - 2004-02-21 00:40:56
|
Update of /cvsroot/timewarp/source/newships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19686/source/newships Modified Files: shpchoex.cpp shpraame.cpp shprekas.cpp shpxxxma.cpp Log Message: Deleted unneeded files, deleted needles keyflag enum Index: shpchoex.cpp =================================================================== RCS file: /cvsroot/timewarp/source/newships/shpchoex.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shpchoex.cpp 29 Jan 2004 21:20:29 -0000 1.10 --- shpchoex.cpp 21 Feb 2004 00:29:19 -0000 1.11 *************** *** 597,601 **** //limit enemy movement ! ((Ship*)grabbed)->nextkeys &= ~(KEYFLAG_LEFT | KEYFLAG_RIGHT | KEYFLAG_THRUST); --- 597,601 ---- //limit enemy movement ! ((Ship*)grabbed)->nextkeys &= ~(keyflag::left | keyflag::right | keyflag::thrust); Index: shpraame.cpp =================================================================== RCS file: /cvsroot/timewarp/source/newships/shpraame.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** shpraame.cpp 29 Jan 2004 21:20:30 -0000 1.13 --- shpraame.cpp 21 Feb 2004 00:29:19 -0000 1.14 *************** *** 195,199 **** angle=grabangle; grabshipangle = grabbed->get_angle(); ! nextkeys &= ~(KEYFLAG_LEFT | KEYFLAG_RIGHT | KEYFLAG_THRUST); // x = grabbed->normal_x()-((cos(grabangle )) * grabdistance); --- 195,199 ---- angle=grabangle; grabshipangle = grabbed->get_angle(); ! nextkeys &= ~(keyflag::left | keyflag::right | keyflag::thrust); // x = grabbed->normal_x()-((cos(grabangle )) * grabdistance); Index: shprekas.cpp =================================================================== RCS file: /cvsroot/timewarp/source/newships/shprekas.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shprekas.cpp 29 Jan 2004 21:20:30 -0000 1.8 --- shprekas.cpp 21 Feb 2004 00:29:19 -0000 1.9 *************** *** 88,92 **** if (specialMatchSpeed) { ! nextkeys &= ~(KEYFLAG_THRUST); recharge_step=0; //recharge_rate=0;//Bad! --- 88,92 ---- if (specialMatchSpeed) { ! nextkeys &= ~(keyflag::thrust); recharge_step=0; //recharge_rate=0;//Bad! Index: shpxxxma.cpp =================================================================== RCS file: /cvsroot/timewarp/source/newships/shpxxxma.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** shpxxxma.cpp 15 Feb 2004 16:37:50 -0000 1.13 --- shpxxxma.cpp 21 Feb 2004 00:29:19 -0000 1.14 *************** *** 273,277 **** grabshipangle = normalize(grabbed->get_angle(),PI2); ! nextkeys &= ~(KEYFLAG_LEFT | KEYFLAG_RIGHT | KEYFLAG_THRUST | KEYFLAG_SPECIAL | KEYFLAG_FIRE); // x = grabbed->normal_x()- (cos(grabangle ) * grabdistance); --- 273,277 ---- grabshipangle = normalize(grabbed->get_angle(),PI2); ! nextkeys &= ~(keyflag::left | keyflag::right | keyflag::thrust | keyflag::special | keyflag::fire); // x = grabbed->normal_x()- (cos(grabangle ) * grabdistance); |
From: <yu...@us...> - 2004-02-21 00:40:55
|
Update of /cvsroot/timewarp/source/sc3ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19686/source/sc3ships Modified Files: shpdakvi.cpp Log Message: Deleted unneeded files, deleted needles keyflag enum Index: shpdakvi.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc3ships/shpdakvi.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shpdakvi.cpp 29 Jan 2004 21:20:31 -0000 1.5 --- shpdakvi.cpp 21 Feb 2004 00:29:19 -0000 1.6 *************** *** 145,149 **** angle=grabangle; grabshipangle = grabbed->get_angle(); ! nextkeys &= ~(KEYFLAG_LEFT | KEYFLAG_RIGHT | KEYFLAG_THRUST); pos = grabbed->normal_pos()-((unit_vector(grabangle )) * grabdistance); --- 145,149 ---- angle=grabangle; grabshipangle = grabbed->get_angle(); ! nextkeys &= ~(keyflag::left | keyflag::right | keyflag::thrust); pos = grabbed->normal_pos()-((unit_vector(grabangle )) * grabdistance); |
From: <yu...@us...> - 2004-02-21 00:40:55
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19686/source/melee Modified Files: mframe.h mship.h Log Message: Deleted unneeded files, deleted needles keyflag enum Index: mframe.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mframe.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mframe.h 15 Feb 2004 13:11:45 -0000 1.15 --- mframe.h 21 Feb 2004 00:29:17 -0000 1.16 *************** *** 268,272 **** // this is used in queries, to see if it's detectable and should be examined. ! virtual inline bool detectable(); Planet *nearest_planet(); //returns the nearest planet, or NULL if no planets are nearby --- 268,272 ---- // this is used in queries, to see if it's detectable and should be examined. ! virtual bool detectable(); Planet *nearest_planet(); //returns the nearest planet, or NULL if no planets are nearby Index: mship.h =================================================================== RCS file: /cvsroot/timewarp/source/melee/mship.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mship.h 6 Feb 2004 20:23:15 -0000 1.16 --- mship.h 21 Feb 2004 00:29:18 -0000 1.17 *************** *** 7,47 **** typedef short KeyCode; - enum { - KEYFLAG_LEFT = (1), - KEYFLAG_RIGHT = (1<<1), - KEYFLAG_THRUST = (1<<2), - KEYFLAG_BACK = (1<<3), - KEYFLAG_FIRE = (1<<4), - KEYFLAG_SPECIAL = (1<<5), - KEYFLAG_ALTFIRE = (1<<6), - KEYFLAG_NEXT = (1<<7), - KEYFLAG_PREV = (1<<8), - KEYFLAG_CLOSEST = (1<<9), - KEYFLAG_EXTRA1 = (1<<10), - KEYFLAG_EXTRA2 = (1<<11), - KEYFLAG_EXTRA3 = (1<<12), - KEYFLAG_EXTRA4 = (1<<13), - KEYFLAG_EXTRA5 = (1<<14), - KEYFLAG_SUICIDE = (1<<15), - }; - struct keyflag { enum { ! left = KEYFLAG_LEFT, ! right = KEYFLAG_RIGHT, ! thrust = KEYFLAG_THRUST, ! back = KEYFLAG_BACK, ! fire = KEYFLAG_FIRE, ! special = KEYFLAG_SPECIAL, ! altfire = KEYFLAG_ALTFIRE, ! next = KEYFLAG_NEXT, ! prev = KEYFLAG_PREV, ! closest = KEYFLAG_CLOSEST, ! extra1 = KEYFLAG_EXTRA1, ! extra2 = KEYFLAG_EXTRA2, ! extra3 = KEYFLAG_EXTRA3, ! extra4 = KEYFLAG_EXTRA4, ! extra5 = KEYFLAG_EXTRA5, ! suicide = KEYFLAG_SUICIDE }; }; --- 7,28 ---- typedef short KeyCode; struct keyflag { enum { ! left = (1<<0), ! right = (1<<1), ! thrust = (1<<2), ! back = (1<<3), ! fire = (1<<4), ! special = (1<<5), ! altfire = (1<<6), ! next = (1<<7), ! prev = (1<<8), ! closest = (1<<9), ! extra1 = (1<<10), ! extra2 = (1<<11), ! extra3 = (1<<12), ! extra4 = (1<<13), ! extra5 = (1<<14), ! suicide = (1<<15), }; }; |
From: <yu...@us...> - 2004-02-21 00:40:55
|
Update of /cvsroot/timewarp/gamex/player In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19686/gamex/player Modified Files: playerinfo.ini Log Message: Deleted unneeded files, deleted needles keyflag enum Index: playerinfo.ini =================================================================== RCS file: /cvsroot/timewarp/gamex/player/playerinfo.ini,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** playerinfo.ini 15 Feb 2004 13:06:38 -0000 1.5 --- playerinfo.ini 21 Feb 2004 00:29:18 -0000 1.6 *************** *** 1,8 **** RU = 1200.000000 ! Angle = 15.079642 PlanetCode = -1 Moon = -1 Planet = -1 ! Star = 0 ! PosY = 516.297241 ! PosX = 1940.026123 --- 1,8 ---- RU = 1200.000000 ! Angle = 10.288713 PlanetCode = -1 Moon = -1 Planet = -1 ! Star = -1 ! PosY = 379.324890 ! PosX = 256.044312 |
From: <yu...@us...> - 2004-02-21 00:40:54
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19686/source Modified Files: scp.cpp Log Message: Deleted unneeded files, deleted needles keyflag enum Index: scp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/scp.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** scp.cpp 20 Feb 2004 08:42:43 -0000 1.51 --- scp.cpp 21 Feb 2004 00:29:18 -0000 1.52 *************** *** 149,159 **** { d_shadow_box_proc, 40, 40, 180, 215, 255, 0, 0, 0, 0, 0, NULL, NULL, NULL }, { my_d_button_proc, 45, 45, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Melee" , NULL, NULL }, ! { my_d_button_proc, 45, 80, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Extended Menu" , NULL, NULL }, ! { my_d_button_proc, 45, 115, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Teams" , NULL, NULL }, ! { my_d_button_proc, 45, 150, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Options", NULL, NULL }, ! { my_d_button_proc, 45, 185, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Help", NULL, NULL }, ! { my_d_button_proc, 45, 220, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Exit", NULL, NULL }, #ifdef INCLUDE_GAMEX ! { my_d_button_proc, 550, 440, 50, 30, 255, 0, 0, D_EXIT | D_SPECIAL_BUTTON, 0, 0, (void *)"FG" , NULL, NULL }, #endif --- 149,159 ---- { d_shadow_box_proc, 40, 40, 180, 215, 255, 0, 0, 0, 0, 0, NULL, NULL, NULL }, { my_d_button_proc, 45, 45, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Melee" , NULL, NULL }, ! { my_d_button_proc, 45, 80, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Extended Menu" , NULL, NULL }, ! { my_d_button_proc, 45, 115, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Teams" , NULL, NULL }, ! { my_d_button_proc, 45, 150, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Options", NULL, NULL }, ! { my_d_button_proc, 45, 185, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Help", NULL, NULL }, ! { my_d_button_proc, 45, 220, 170, 30, 255, 0, 0, D_EXIT, 0, 0, (void *)"Exit", NULL, NULL }, #ifdef INCLUDE_GAMEX ! { my_d_button_proc, 550, 440, 50, 30, 255, 0, 0, D_EXIT | D_SPECIAL_BUTTON, 0, 0, (void *)"FG" , NULL, NULL }, #endif |
From: <yu...@us...> - 2004-02-21 00:40:52
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19686/source/games Modified Files: gtrug.cpp Log Message: Deleted unneeded files, deleted needles keyflag enum Index: gtrug.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gtrug.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gtrug.cpp 14 Feb 2004 13:18:37 -0000 1.8 --- gtrug.cpp 21 Feb 2004 00:29:17 -0000 1.9 *************** *** 50,54 **** break; case ORDER_ATTACK: { ! k &= ~(KEYFLAG_NEXT | KEYFLAG_PREV | KEYFLAG_CLOSEST); //TODO check following 2 lines //if (!target || (target->get_serial() == target_serial)) --- 50,54 ---- break; case ORDER_ATTACK: { ! k &= ~(keyflag::next | keyflag::prev | keyflag::closest); //TODO check following 2 lines //if (!target || (target->get_serial() == target_serial)) *************** *** 60,64 **** // break; //} ! k |= KEYFLAG_NEXT; } break; --- 60,64 ---- // break; //} ! k |= keyflag::next; } break; *************** *** 72,78 **** } double ra = min_delta(m.angle(), ship->get_angle()); ! if (ra < -PI/64) k |= KEYFLAG_LEFT; ! if (ra > PI/64) k |= KEYFLAG_RIGHT; ! k |= KEYFLAG_THRUST; } break; --- 72,78 ---- } double ra = min_delta(m.angle(), ship->get_angle()); ! if (ra < -PI/64) k |= keyflag::left; ! if (ra > PI/64) k |= keyflag::right; ! k |= keyflag::thrust; } break; |
From: <yu...@us...> - 2004-02-21 00:40:52
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19686 Removed Files: bugs.txt dialog.lua djgpp.txt liballeg.a libjgmod.a libjgmod.lib Log Message: Deleted unneeded files, deleted needles keyflag enum --- dialog.lua DELETED --- --- djgpp.txt DELETED --- --- liballeg.a DELETED --- --- libjgmod.a DELETED --- --- libjgmod.lib DELETED --- |
From: <yu...@us...> - 2004-02-20 20:51:48
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4522 Modified Files: twwin.dsp Log Message: Removing dependance from MSVCP60.dll (for release configuration only) |
From: <or...@us...> - 2004-02-20 08:53:49
|
Update of /cvsroot/timewarp/source/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26959/source/util Modified Files: errors.cpp errors.h errors_c.c profile.cpp Log Message: "error.dmo" demo recording saved on errors tw_sys.log more verbose, particularly for errors other error-handling-related tweaks bug fix in tw dialog player suppress inappropriate error message in title music loading changed error("quit") to quit("quit") in the last place or two Index: errors.cpp =================================================================== RCS file: /cvsroot/timewarp/source/util/errors.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** errors.cpp 14 Feb 2004 13:18:38 -0000 1.8 --- errors.cpp 20 Feb 2004 08:42:44 -0000 1.9 *************** *** 16,23 **** # define MAX_TRACE_LENGTH_MASK (MAX_TRACE_LENGTH - 1) - struct TraceData { - SOURCE_LINE *srcline; - int level; - }; static int _stack_level = 0; --- 16,19 ---- *************** *** 30,33 **** --- 26,49 ---- tw_error("Exceeded maximum stacktrace level"); } + + int get_stacktrace_data ( SOURCE_LINE **stack, int max ) { + int n = max; + n = n < _stack_level ? n : _stack_level; + for (int i = 0; i < n; i++) stack[i] = _stack_data[i]; + return n; + } + + int get_trace_data ( TraceData *trace, int max ) { + int n = max; + n = n < _trace_calls ? n : _trace_calls; + n = n < MAX_TRACE_LENGTH ? n : MAX_TRACE_LENGTH; + for (int i = 0; i < n; i++) { + trace[i] = _trace_data[ + (_trace_calls - n + i) & MAX_TRACE_LENGTH_MASK + ]; + } + return n; + } + UserStackTraceHelper::UserStackTraceHelper ( SOURCE_LINE *srcline ) { int i = (_trace_calls++) & MAX_TRACE_LENGTH_MASK; *************** *** 122,127 **** return *s; } ! int tw_alert(const char *message, const char *b1, const char *b2, const char *b3, const char *b4) { ! char *s1 = strdup(message); char *s2 = NULL, *s3 = NULL; --- 138,152 ---- return *s; } ! ! int _tw_alert ( ! bool popup, ! char *message, ! const char *b1, ! const char *b2 = NULL, ! const char *b3 = NULL, ! const char *b4 = NULL ! ) ! { ! char *s1 = message; char *s2 = NULL, *s3 = NULL; *************** *** 160,164 **** } ! int i = tw_popup_dialog(&videosystem.window, dialog, 2) - 2; return i + 1; //return alert3(s1, s2, s3, b1, b2, b3, 0, 0, 0); --- 185,192 ---- } ! int i; ! ! if (popup) i = tw_popup_dialog(&videosystem.window, dialog, 2) - 2; ! else i = tw_do_dialog (&videosystem.window, dialog, 2) - 2; return i + 1; //return alert3(s1, s2, s3, b1, b2, b3, 0, 0, 0); *************** *** 166,209 **** ! static void tw_error_handler (const char *file, int line, const char *message) { char error_string[4096]; int i; #ifdef DO_STACKTRACE ! // add GEO: ! extern void game_create_errorlog(const char *exitmessage = 0); ! #endif ! if (!strncmp(message, "quit", 4)) throw 0; ! if (!strncmp(message, "Quit", 4)) throw 0; ! if (!strncmp(message, "QUIT", 4)) throw 0; ! if (__error_flag & 2) return; ! strcpy(error_string, message); ! if (line >= 0) { ! sprintf(error_string + strlen(message), ! "\n\n%s, Line %d", file, line); } - #ifdef DO_STACKTRACE - char *STstring = get_stack_trace_string(8); - sprintf(error_string + strlen(message), "\n\n%s", STstring); - free(STstring); ! // add GEO: ! game_create_errorlog(message); #endif if (videosystem.width <= 0) { allegro_message("Critical Error$: %s\n", error_string); throw -1; } ! i = tw_alert(error_string, "&Abort", "&Retry", "&Debug", "&Ignore"); ! if (i == 3) { __error_flag |= 1; # if defined ALLEGRO_MSVC __asm int 3; ! # elif defined __GNUC__ && defined __I386__ asm("int $0x03"); # else --- 194,349 ---- ! int tw_alert(const char *message, const char *b1, const char *b2, const char *b3, const char *b4) { ! char *s1 = strdup(message); ! int r = _tw_alert( true, s1, b1, b2, b3, b4 ); ! free(s1); ! return r; ! } ! ! ! static void tw_error_handler ( ! int in_catch_statement, ! const char *file, ! int line, ! const char *message ! ) ! { char error_string[4096]; int i; + if (__error_flag & 2) return; + + char *cp = &error_string[0]; + if (file) { + char *_file = strstr(file, "source"); + if (_file) file = _file; + } + + log_debug("tw_error_handler invoked: "); + int len = strlen(message); + memcpy(error_string, message, len); + cp += len; + if (line >= 0) {//display line # and file name + log_debug( "(from %s, Line %d)\n", file, line); + cp += sprintf(cp, "\n(from %s, line %d)\n", file, line); + } + else { + log_debug("(from unspecified file & linenumber)\n"); + cp += sprintf(cp, "\n"); + } + log_debug("begin error message:\n%s\nend error message\n", message); + #ifdef DO_STACKTRACE ! //there needs to be enough space for the whole trace... ! //if it gets printed into error_string ! enum {TRACE_LENGTH = 16}; ! enum {MAX_STACK = 24}; ! if (1) {//always displaying trace ! log_debug( "Trace:\n"); ! cp += sprintf(cp, "Trace:\n"); ! TraceData trace[TRACE_LENGTH]; ! int n = get_trace_data(&trace[0], TRACE_LENGTH); ! char blanks[MAX_STACK]; ! int i; ! for (i = 0; i < 24; i++) blanks[i] = ' '; ! for (i = 0; i < n; i++) { ! int level = trace[i].level; ! if (level > MAX_STACK) { ! log_debug("maximum stack level exceeded? (stack level = %d\n", level); ! continue; ! } ! blanks[level] = 0; ! log_debug( "%2d %2d %s", i, level, blanks); ! cp += sprintf(cp, "%2d %2d %s", i, level, blanks); ! blanks[level] = ' '; ! SOURCE_LINE *srcline = trace[i].srcline; ! if (srcline->name) { ! log_debug( "%s, line %d (\"%s\")\n", srcline->file, srcline->line, srcline->name); ! cp += sprintf(cp, "%s, line %d (\"%s\")\n", srcline->file, srcline->line, srcline->name); ! } ! else { ! log_debug( "%s, line %d\n", srcline->file, srcline->line); ! cp += sprintf(cp, "%s, line %d\n", srcline->file, srcline->line); ! } ! } } ! if (!in_catch_statement) {//display stack only if it's meaningfull ! log_debug( "Stacktrace:\n"); ! cp += sprintf(cp, "Stacktrace:\n"); ! SOURCE_LINE *stack[MAX_STACK]; ! int n = get_stacktrace_data(&stack[0], MAX_STACK); ! char blanks[MAX_STACK]; ! int i; ! for (i = 0; i < 24; i++) blanks[i] = ' '; ! i = n - 8; ! i = i > 0 ? i : 0; ! for (; i < n; i++) { ! ! int level = i; ! blanks[level] = 0; ! log_debug( "%2d %s", level, blanks); ! cp += sprintf(cp, "%2d %s", level, blanks); ! blanks[level] = ' '; ! ! if (stack[i]->name) { ! log_debug( "%s, line %d (\"%s\")\n", stack[i]->file, stack[i]->line, stack[i]->name); ! cp += sprintf(cp, "%s, line %d (\"%s\")\n", stack[i]->file, stack[i]->line, stack[i]->name); ! } ! else { ! log_debug( "%s, line %d\n", stack[i]->file, stack[i]->line); ! cp += sprintf(cp, "%s, line %d\n", stack[i]->file, stack[i]->line); ! } ! } ! //char *STstring = get_stack_trace_string(8); ! //len += sprintf(error_string + len, "\n\n%s", STstring); ! //free(STstring); ! } #endif + if (videosystem.width <= 0) { allegro_message("Critical Error$: %s\n", error_string); + log_debug("\nUnable to display messge, shutting down\n"); throw -1; } ! log_debug("Pressenting graphical error prompt\n"); ! ! const char *es[] = {"&Abort", "&Retry", "&Debug", "&Ignore"}; ! enum { ! ES_ABORT = 0, ! ES_RETRY, ! ES_DEBUG, ! ES_IGNORE ! }; ! int selection = -1; ! ! if ( in_catch_statement ) { ! int les[] = { ES_ABORT, ES_DEBUG }; ! i = _tw_alert( false, error_string, es[les[0]], es[les[1]] ); ! if (i > 0) selection = les[i - 1]; ! } ! else { ! int les[] = { ES_ABORT, ES_RETRY, ES_DEBUG, ES_IGNORE }; ! i = _tw_alert( false, error_string, es[les[0]], es[les[1]], es[les[2]], es[les[3]] ); ! if (i > 0) selection = les[i - 1]; ! } ! if (selection < 0) selection = ES_ABORT; ! log_debug("Option \"%s\" selected\n", es[selection]); ! ! videosystem.screen_corrupted = true; ! ! if (selection == ES_DEBUG) {//"Debug" __error_flag |= 1; + if (in_catch_statement) { + return; + } # if defined ALLEGRO_MSVC __asm int 3; ! # elif defined __GNUC__ && defined __i386__ asm("int $0x03"); # else *************** *** 212,226 **** return; } ! if (i == 4) { __error_flag |= 2; return; } ! if (i == 2) return; ! throw 0; } static void _register_tw_error_hanlde() {_error_handler = &tw_error_handler;} CALL_BEFORE_MAIN(_register_tw_error_hanlde); ! --- 352,372 ---- return; } ! ! if (selection == ES_IGNORE) {//"Ignore" __error_flag |= 2; return; } ! ! if (selection == ES_RETRY) {//"Retry" return; ! } ! ! //"Abort" ! if (in_catch_statement) return; ! else throw 0; } static void _register_tw_error_hanlde() {_error_handler = &tw_error_handler;} CALL_BEFORE_MAIN(_register_tw_error_hanlde); ! *************** *** 242,246 **** //const int tw_error_str_len = 2048; // should be pleny of room. ! char tw_error_str[tw_error_str_len]; void caught_error(const char *format, ...) { --- 388,392 ---- //const int tw_error_str_len = 2048; // should be pleny of room. ! //char tw_error_str[tw_error_str_len]; void caught_error(const char *format, ...) { *************** *** 260,265 **** // added GEO: ! strncpy(tw_error_str, STstring, tw_error_str_len-1); ! tw_error_str[tw_error_str_len-1] = 0; // for later use. This needs to be stored, cause this is the only place where // the stacks lead to the bug location ?? Or not ?? --- 406,411 ---- // added GEO: ! //strncpy(tw_error_str, STstring, tw_error_str_len-1); ! //tw_error_str[tw_error_str_len-1] = 0; // for later use. This needs to be stored, cause this is the only place where // the stacks lead to the bug location ?? Or not ?? *************** *** 267,275 **** free(STstring); #endif - // the following makes calls to subroutines that are monitored; I'll disable - // further monitoring by ... - int i = tw_alert(error_string, "Okay", "Debug"); - if (i == 2) __error_flag |= 1; return; --- 413,418 ---- free(STstring); #endif + _error_handler( 1, NULL, -1, error_string); return; Index: errors.h =================================================================== RCS file: /cvsroot/timewarp/source/util/errors.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** errors.h 14 Feb 2004 13:18:38 -0000 1.12 --- errors.h 20 Feb 2004 08:42:44 -0000 1.13 *************** *** 5,8 **** --- 5,10 ---- #define USE_ALLEGRO + #define USE_EXCEPTIONS + #define COMPILE_TIME_ASSERT(condition) typedef char _compile_time_assert_type_ ## __LINE__ [(condition) ? 1 : -1]; *************** *** 20,27 **** void caught_error(const char *format, ...); ! const int tw_error_str_len = 2048; // should be plenty of room. ! extern char tw_error_str[tw_error_str_len]; ! bool get_stacklist_info(int N, const char **filename, int **linenum, int **level); ! bool get_stacktrace_info(int N, const char **filename, int **linenum, int **level); --- 22,29 ---- void caught_error(const char *format, ...); ! //const int tw_error_str_len = 2048; // should be plenty of room. ! //extern char tw_error_str[tw_error_str_len]; ! //bool get_stacklist_info(int N, const char **filename, int **linenum, int **level); ! //bool get_stacktrace_info(int N, const char **filename, int **linenum, int **level); *************** *** 45,48 **** --- 47,54 ---- #if defined DO_STACKTRACE + struct TraceData { + SOURCE_LINE *srcline; + int level; + }; class UserStackTraceHelper { public: UserStackTraceHelper( SOURCE_LINE *srcline); *************** *** 54,58 **** //# define _STACKTRACE(A) static const SOURCE_LINE _srcline = { __LINE__, __FILE__, A }; UserStackTraceHelper _stacktrace_ ( &_srcline ); // this is defined locally in subroutines, so it's de-allocated on exit of the subroutine. - char *get_stack_trace_string(int max); #else # define STACKTRACE --- 60,63 ---- *************** *** 61,65 **** #ifdef DO_STACKTRACE ! char *get_stack_trace_string(int max); #endif --- 66,73 ---- #ifdef DO_STACKTRACE ! int get_stacktrace_data ( SOURCE_LINE **stack, int max ); ! int get_trace_data ( TraceData *trace, int max ); ! ! char *get_stack_trace_string(int max); #endif *************** *** 103,107 **** //# define tw_error _prep_error(__FILE__, __LINE__); _error void error_handler ( const char *message); ! extern void (*_error_handler) ( const char *src_file, int line, const char *message ); typedef void (*ERROR_FUNC_TYPE)(const char *fmt, ...); --- 111,120 ---- //# define tw_error _prep_error(__FILE__, __LINE__); _error void error_handler ( const char *message); ! extern void (*_error_handler) ( ! int in_catch_statement, //"retry" is invalid inside a catch statement ! const char *src_file, ! int line, ! const char *message ! ); typedef void (*ERROR_FUNC_TYPE)(const char *fmt, ...); Index: errors_c.c =================================================================== RCS file: /cvsroot/timewarp/source/util/errors_c.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** errors_c.c 17 Feb 2004 04:07:00 -0000 1.8 --- errors_c.c 20 Feb 2004 08:42:44 -0000 1.9 *************** *** 9,18 **** int __error_flag = 0; ! static void default_error_handler ( const char * file, int line, const char * message ) { log_debug("!!!\nDefault error handler is terminating the program\n"); tw_exit(1); } ! void (*_error_handler) ( const char *file, int line, const char *message) = &default_error_handler; --- 9,18 ---- int __error_flag = 0; ! static void default_error_handler ( int in_catch_statement, const char * file, int line, const char * message ) { log_debug("!!!\nDefault error handler is terminating the program\n"); tw_exit(1); } ! void (*_error_handler) ( int in_catch_statement, const char *file, int line, const char *message) = &default_error_handler; *************** *** 36,40 **** } else error_string[0] = 0; ! _error_handler(file, line, error_string); } --- 36,40 ---- } else error_string[0] = 0; ! _error_handler( 0, file, line, error_string); } *************** *** 72,76 **** else error_string[0] = 0; ! _error_handler(NULL, -1, error_string); } --- 72,76 ---- else error_string[0] = 0; ! _error_handler(0, NULL, -1, error_string); } Index: profile.cpp =================================================================== RCS file: /cvsroot/timewarp/source/util/profile.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** profile.cpp 14 Feb 2004 13:18:38 -0000 1.1 --- profile.cpp 20 Feb 2004 08:42:44 -0000 1.2 *************** *** 246,254 **** if (!runs) runs = 1; #ifdef _MSC_VER ! int r = _snprintf ( #else ! int r = snprintf ( #endif ! dest, max, "%3d.%d%% %8d %8d %s", per / 10, per % 10, iround(data[i].time / double(runs) * _time_ratio * (1000.0 * 1000.0 * 1000)), //1000ths of microseconds --- 246,256 ---- if (!runs) runs = 1; #ifdef _MSC_VER ! int r = _snprintf ( dest, max, ! #elif defined VSNPRINTF ! int r = snprintf ( dest, max, #else ! int r = sprintf ( dest, #endif ! "%3d.%d%% %8d %8d %s", per / 10, per % 10, iround(data[i].time / double(runs) * _time_ratio * (1000.0 * 1000.0 * 1000)), //1000ths of microseconds |
From: <or...@us...> - 2004-02-20 08:53:48
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26959/source/melee Modified Files: mgame.cpp mhelpers.cpp mmain.cpp Log Message: "error.dmo" demo recording saved on errors tw_sys.log more verbose, particularly for errors other error-handling-related tweaks bug fix in tw dialog player suppress inappropriate error message in title music loading changed error("quit") to quit("quit") in the last place or two Index: mgame.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mgame.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** mgame.cpp 15 Feb 2004 13:13:33 -0000 1.32 --- mgame.cpp 20 Feb 2004 08:42:44 -0000 1.33 *************** *** 46,49 **** --- 46,51 ---- #include <typeinfo> + #include <stdarg.h> + static char chat_buf[256]; *************** *** 376,379 **** --- 378,382 ---- void Game::animate() {_STACKTRACE("Game::animate(void)") + double t = get_time2(); paused_time = 0; *************** *** 391,394 **** --- 394,398 ---- t = get_time2() - t - paused_time; render_history->add_element(pow(t, HIST_POWER)); + return; } *************** *** 424,431 **** ! void game_create_errorlog(const char *exitmessage = 0) { /* - STACKTRACE; FILE *f; --- 428,440 ---- ! //if a game is killed due to an error, this may be executed ! void handle_game_error ( Game *game ) { + log_debug("handle_game_error() executed\n"); + if (game->log) { + game->log->save("error.dmo"); + log_debug("Demo recording saved to error.dmo\n"); + } /* FILE *f; *************** *** 514,518 **** fclose(f); ! */ } --- 523,527 ---- fclose(f); ! */ } *************** *** 542,546 **** if (desync) { - game_create_errorlog(); handle_desynch(local_checksum, server_checksum, client_checksum); } --- 551,554 ---- *************** *** 727,748 **** if (i == -1) throw; if (__error_flag & 1) throw; ! if (i != 0) caught_error ("%s %s caught int %d", __FILE__, __LINE__, i); if (__error_flag & 1) throw; } catch (const char *str) { if (__error_flag & 1) throw; caught_error("message: \"%s\"", str); if (__error_flag & 1) throw; } //ArrayIndexOutOfBounds NullPointerException ! /* catch (exception &e) { if (__error_flag & 1) throw; ! caught_error ("A predefined exception occured\n%s", e.what()); if (__error_flag & 1) throw; ! }*/ catch (...) { if (__error_flag & 1) throw; caught_error("Ack(1)!!!\nAn error occured in the game!\nBut I don't know what error (check error log)!"); - game_create_errorlog(); if (__error_flag & 1) throw; } --- 735,761 ---- if (i == -1) throw; if (__error_flag & 1) throw; ! handle_game_error(this); ! if (i != 0) { ! caught_error ("%s %s caught int %d", __FILE__, __LINE__, i); ! } if (__error_flag & 1) throw; } catch (const char *str) { if (__error_flag & 1) throw; + handle_game_error(this); caught_error("message: \"%s\"", str); if (__error_flag & 1) throw; } //ArrayIndexOutOfBounds NullPointerException ! catch (exception &e) { if (__error_flag & 1) throw; ! handle_game_error(this); ! caught_error ("A standard exception occured\n%s", e.what()); if (__error_flag & 1) throw; ! } catch (...) { if (__error_flag & 1) throw; + handle_game_error(this); caught_error("Ack(1)!!!\nAn error occured in the game!\nBut I don't know what error (check error log)!"); if (__error_flag & 1) throw; } Index: mhelpers.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mhelpers.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mhelpers.cpp 17 Feb 2004 15:32:51 -0000 1.5 --- mhelpers.cpp 20 Feb 2004 08:42:44 -0000 1.6 *************** *** 105,109 **** videosystem.redraw(); } ! else videosystem.queued_redraws = 1; } static int _gamma = -1; --- 105,109 ---- videosystem.redraw(); } ! else videosystem.screen_corrupted = true; } static int _gamma = -1; *************** *** 159,164 **** int VideoSystem::poll_redraw() { last_poll = get_time(); ! if (queued_redraws) { ! queued_redraws -= 1; videosystem.redraw(); return 1; --- 159,164 ---- int VideoSystem::poll_redraw() { last_poll = get_time(); ! if (screen_corrupted) { ! screen_corrupted = false; videosystem.redraw(); return 1; *************** *** 219,223 **** color_effects = gamma_color_effects; ! queued_redraws = 0; last_poll = -1; window.preinit(); --- 219,223 ---- color_effects = gamma_color_effects; ! screen_corrupted = false; last_poll = -1; window.preinit(); Index: mmain.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mmain.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** mmain.cpp 7 Feb 2004 07:43:38 -0000 1.22 --- mmain.cpp 20 Feb 2004 08:42:44 -0000 1.23 *************** *** 129,138 **** else ch = channel_client; if (is_local(ch)) { ! log_file("client.ini"); int use_teams_menu = get_config_int("Network", "NetworkMeleeUseTeams", 0); for (int i = 0; true; i += 1) { char buffy[64]; - const char *simple_config = - "[Player1]\nType=Human\nConfig=0\nTeam=0\n"; sprintf(buffy, "Player%d", i + 1); if (use_teams_menu) set_config_file("scp.ini"); --- 129,138 ---- else ch = channel_client; if (is_local(ch)) { ! set_config_file("client.ini");//each side determines whether they are using manually specified teams int use_teams_menu = get_config_int("Network", "NetworkMeleeUseTeams", 0); + const char *simple_config = + "[Player1]\nType=Human\nConfig=0\nTeam=0\n"; for (int i = 0; true; i += 1) { char buffy[64]; sprintf(buffy, "Player%d", i + 1); if (use_teams_menu) set_config_file("scp.ini"); |
From: <or...@us...> - 2004-02-20 08:53:48
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26959/source Modified Files: gui.cpp melee.h scp.cpp Log Message: "error.dmo" demo recording saved on errors tw_sys.log more verbose, particularly for errors other error-handling-related tweaks bug fix in tw dialog player suppress inappropriate error message in title music loading changed error("quit") to quit("quit") in the last place or two Index: gui.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gui.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** gui.cpp 6 Feb 2004 08:50:44 -0000 1.15 --- gui.cpp 20 Feb 2004 08:42:43 -0000 1.16 *************** *** 66,69 **** --- 66,70 ---- void TW_Dialog_Player::redraw() { int i; + if (!player) return; for (i = 0; player->dialog[i].proc; i++) player->dialog[i].flags |= D_DIRTY; update(); Index: melee.h =================================================================== RCS file: /cvsroot/timewarp/source/melee.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** melee.h 14 Feb 2004 13:18:37 -0000 1.13 --- melee.h 20 Feb 2004 08:42:43 -0000 1.14 *************** *** 326,330 **** FONT *basic_font; //font to use if no other is available Color *palette; ! volatile int queued_redraws; int last_poll; Surface *surface; --- 326,330 ---- FONT *basic_font; //font to use if no other is available Color *palette; ! volatile bool screen_corrupted; int last_poll; Surface *surface; Index: scp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/scp.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** scp.cpp 17 Feb 2004 15:30:05 -0000 1.50 --- scp.cpp 20 Feb 2004 08:42:43 -0000 1.51 *************** *** 241,248 **** //Music * mymusic = load_mod("scpgui.dat#SCPMUSIC"); ! if (!mymusic) tw_error("Couldnt load title music"); ! sound.play_music( mymusic, TRUE); {DATAFILE * data = load_datafile_object("TitleScreen.dat", "MENUACCEPT"); --- 241,248 ---- //Music * mymusic = load_mod("scpgui.dat#SCPMUSIC"); ! if (!mymusic && sound.is_music_supported()) tw_error("Couldnt load title music"); ! if (mymusic) sound.play_music( mymusic, TRUE); {DATAFILE * data = load_datafile_object("TitleScreen.dat", "MENUACCEPT"); *************** *** 763,778 **** log_debug(NULL); ! log_debug("Log started(%d)\n", 1); if (allegro_init() < 0) tw_error_exit("Allegro initialization failed"); videosystem.preinit(); - init_error(); try { set_window_title("Star Control : TimeWarp"); set_config_file("client.ini"); - init_time(); - init_profiling(); int screen_width = 640, screen_height = 480, screen_bpp = 32; --- 763,780 ---- log_debug(NULL); ! time_t start_time = time(NULL); ! log_debug("Log started at %s\n", asctime(localtime(&start_time))); if (allegro_init() < 0) tw_error_exit("Allegro initialization failed"); videosystem.preinit(); try { + init_time(); + init_error(); + init_profiling(); + set_window_title("Star Control : TimeWarp"); set_config_file("client.ini"); int screen_width = 640, screen_height = 480, screen_bpp = 32; *************** *** 799,803 **** // parse command-line arguments ! for (i = 0; i < argc; i += 1) { if (false) ; else if (!strcmp(argv[i], "-res") && (argc > i + 2)) { --- 801,805 ---- // parse command-line arguments ! for (i = 1; i < argc; i += 1) { if (false) ; else if (!strcmp(argv[i], "-res") && (argc > i + 2)) { *************** *** 860,867 **** set_color_conversion(COLORCONV_NONE); enable_input(inputs); sound.init(); sound.load(); - videosystem.set_resolution(screen_width, screen_height, screen_bpp, fullscreen); showLoadingScreen(); --- 862,869 ---- set_color_conversion(COLORCONV_NONE); + videosystem.set_resolution(screen_width, screen_height, screen_bpp, fullscreen); enable_input(inputs); sound.init(); sound.load(); showLoadingScreen(); *************** *** 2028,2059 **** ! // DIAGNOSTICS - dialog function ! void show_diagnostics() {STACKTRACE ! int i; ! char buffy [16000];//fix sometime ! char buffy2[100000];//fix sometime ! char buffy3[16000];//yeah right ! char *tmp; ! PACKFILE *f; ! ! f = pack_fopen ("./version.txt", F_READ); ! if (!f) ! strcpy(buffy, "Failed to load version.txt"); ! else { ! i = pack_fread (buffy, 99999, f); ! pack_fclose(f); ! buffy[i] = 0; ! } ! ! diagnostics_dialog[DIAGNOSTICS_DIALOG_VERSION_TXT].dp = (void *) buffy; ! diagnostics_dialog[DIAGNOSTICS_DIALOG_FILES].dp = (void *) buffy2; ! tmp = buffy2; ! - for (i = 0; i < num_registered_files; i += 1) { - tmp += sprintf(tmp, "%s %s %s\n", registered_files[i].ftime, registered_files[i].fdate, registered_files[i].fname); - } - diagnostics_dialog[DIAGNOSTICS_DIALOG_MAIN].dp = (void *) buffy3; - tmp = buffy3; # if defined _DEBUG tmp += sprintf(tmp, "DEBUGGING BUILD!\n"); --- 2030,2036 ---- ! int get_diagnostics_string ( char *dest ) {//returns length of string ! char * tmp = dest; # if defined _DEBUG tmp += sprintf(tmp, "DEBUGGING BUILD!\n"); *************** *** 2083,2086 **** --- 2060,2100 ---- tmp += sprintf(tmp, "JGMOD (music) Disabled\n"); } + # if defined DO_STACKTRACE + tmp += sprintf(tmp, "DO_STACKTRACE enabled\n"); + # else + tmp += sprintf(tmp, "DO_STACKTRACE disabled\n"); + # endif + return tmp - dest; + } + + // DIAGNOSTICS - dialog function + void show_diagnostics() {STACKTRACE + int i; + char buffy [16000];//fix sometime + char buffy2[100000];//fix sometime + char buffy3[16000];//yeah right + char *tmp; + PACKFILE *f; + + f = pack_fopen ("./version.txt", F_READ); + if (!f) + strcpy(buffy, "Failed to load version.txt"); + else { + i = pack_fread (buffy, 99999, f); + pack_fclose(f); + buffy[i] = 0; + } + + diagnostics_dialog[DIAGNOSTICS_DIALOG_VERSION_TXT].dp = (void *) buffy; + diagnostics_dialog[DIAGNOSTICS_DIALOG_FILES].dp = (void *) buffy2; + tmp = buffy2; + + + for (i = 0; i < num_registered_files; i += 1) { + tmp += sprintf(tmp, "%s %s %s\n", registered_files[i].ftime, registered_files[i].fdate, registered_files[i].fname); + } + diagnostics_dialog[DIAGNOSTICS_DIALOG_MAIN].dp = (void *) buffy3; + tmp = buffy3; + tmp += get_diagnostics_string( tmp ); /* diagnostics_dialog[DIAGNOSTICS_DIALOG_SHIPS].dp = (void *) buffy4; |
From: <or...@us...> - 2004-02-20 08:53:47
|
Update of /cvsroot/timewarp/source/games In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26959/source/games Modified Files: gsamp2.cpp Log Message: "error.dmo" demo recording saved on errors tw_sys.log more verbose, particularly for errors other error-handling-related tweaks bug fix in tw dialog player suppress inappropriate error message in title music loading changed error("quit") to quit("quit") in the last place or two Index: gsamp2.cpp =================================================================== RCS file: /cvsroot/timewarp/source/games/gsamp2.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** gsamp2.cpp 29 Jan 2004 21:20:28 -0000 1.8 --- gsamp2.cpp 20 Feb 2004 08:42:43 -0000 1.9 *************** *** 141,145 **** message.print(9999000, 15, buffy); switch (tw_alert(buffy, "Exit", "Continue", "Try Again")) { ! case 1: error ( "quit" ); case 2: break; case 3: restart(); --- 141,145 ---- message.print(9999000, 15, buffy); switch (tw_alert(buffy, "Exit", "Continue", "Try Again")) { ! case 1: quit ( "quit" ); case 2: break; case 3: restart(); |
From: <geo...@us...> - 2004-02-19 22:44:49
|
Update of /cvsroot/timewarp/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17524 Added Files: ft2build.h Log Message: no message --- NEW FILE: ft2build.h --- /***************************************************************************/ /* */ /* ft2build.h */ /* */ /* FreeType 2 build and setup macros. */ /* (Generic version) */ /* */ /* Copyright 1996-2001 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* This file corresponds to the default "ft2build.h" file for */ /* FreeType 2. It uses the "freetype" include root. */ /* */ /* Note that specific platforms might use a different configuration. */ /* See builds/unix/ft2unix.h for an example. */ /* */ /*************************************************************************/ #ifndef __FT2_BUILD_GENERIC_H__ #define __FT2_BUILD_GENERIC_H__ #include <freetype/config/ftheader.h> #endif /* __FT2_BUILD_GENERIC_H__ */ /* END */ |
From: <yu...@us...> - 2004-02-19 01:22:22
|
Update of /cvsroot/timewarp/source/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27957/source/util Modified Files: get_time.c Log Message: Applying Nic patch Index: get_time.c =================================================================== RCS file: /cvsroot/timewarp/source/util/get_time.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** get_time.c 14 Feb 2004 13:18:38 -0000 1.6 --- get_time.c 19 Feb 2004 01:12:19 -0000 1.7 *************** *** 56,59 **** --- 56,60 ---- #endif #include "get_time.h" + #include "base.h" #include "errors.h" |
From: <yu...@us...> - 2004-02-19 01:22:22
|
Update of /cvsroot/timewarp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27957 Modified Files: makefile Log Message: Applying Nic patch |
From: <yu...@us...> - 2004-02-19 01:22:22
|
Update of /cvsroot/timewarp/source/twgui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27957/source/twgui Modified Files: gametest2.cpp Log Message: Applying Nic patch Index: gametest2.cpp =================================================================== RCS file: /cvsroot/timewarp/source/twgui/gametest2.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gametest2.cpp 29 Jan 2004 21:20:31 -0000 1.5 --- gametest2.cpp 19 Feb 2004 01:12:19 -0000 1.6 *************** *** 7,10 **** --- 7,12 ---- #include <stdio.h> #include <string.h> + #include <sys/types.h> + #include <sys/stat.h> #include "../melee.h" |
From: <yu...@us...> - 2004-02-19 01:22:21
|
Update of /cvsroot/timewarp/source/gamex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27957/source/gamex Modified Files: gameplanetview.cpp Log Message: Applying Nic patch Index: gameplanetview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/gamex/gameplanetview.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** gameplanetview.cpp 7 Feb 2004 07:43:37 -0000 1.14 --- gameplanetview.cpp 19 Feb 2004 01:12:18 -0000 1.15 *************** *** 771,775 **** ! if (fabsl(zz) > 1e-10) { if (zz > 0) lon = atan(xx/zz); else lon = PI+atan(xx/zz); } --- 771,775 ---- ! if (fabs(zz) > 1e-10) { if (zz > 0) lon = atan(xx/zz); else lon = PI+atan(xx/zz); } |
From: <you...@us...> - 2004-02-18 18:53:40
|
Update of /cvsroot/timewarp/source/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2839/source/other Modified Files: fontmorph.cpp Log Message: making a call to draw_glyph get along with two versions of allegro, to help with Mac support (bug # 52, on behalf of Nic) Index: fontmorph.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/fontmorph.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fontmorph.cpp 15 Feb 2004 13:08:10 -0000 1.1 --- fontmorph.cpp 18 Feb 2004 18:43:49 -0000 1.2 *************** *** 24,28 **** BITMAP* b = create_bitmap_ex(8, g->w, g->h); clear_to_color(b, 0); ! b->vtable->draw_glyph(b, g, 0, 0, 1); bits[i - mf->begin] = b; --- 24,32 ---- BITMAP* b = create_bitmap_ex(8, g->w, g->h); clear_to_color(b, 0); ! #if (ALLEGRO_VERSION == 4 && ALLEGRO_SUB_VERSION == 0) ! b->vtable->draw_glyph(b, g, 0, 0, 1); ! #else ! b->vtable->draw_glyph(b, g, 0, 0, 1, 0); ! #endif bits[i - mf->begin] = b; |
From: <or...@us...> - 2004-02-17 15:41:49
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12707/source/melee Modified Files: mhelpers.cpp Log Message: removed a few outdated comments Index: mhelpers.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mhelpers.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mhelpers.cpp 11 Oct 2003 21:01:01 -0000 1.4 --- mhelpers.cpp 17 Feb 2004 15:32:51 -0000 1.5 *************** *** 9,14 **** Various helpers included in mhelpers.cpp : - Base Class - offers serialization, run-time sizeof(), that kind of thing Type verication Byte Ordering (endianness) --- 9,12 ---- *************** *** 17,22 **** File Registration System keeps a list of linked files & compile times - Timer - provides init_time() & get_time() on top of windows or Allegro VideoSystem sets screen resolutions, color formats, color transforms, fonts --- 15,18 ---- *************** *** 27,31 **** plays sounds loads sounds - Random Number Generator SC2 Unit Conversion --- 23,26 ---- *************** *** 64,67 **** --- 59,64 ---- + + /*------------------------------ File Registration System |
From: <or...@us...> - 2004-02-17 15:40:48
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12485/source/melee Modified Files: mview.cpp Log Message: tweaked vsnprintf checks Index: mview.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mview.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** mview.cpp 14 Feb 2004 13:18:37 -0000 1.16 --- mview.cpp 17 Feb 2004 15:31:49 -0000 1.17 *************** *** 401,404 **** --- 401,406 ---- _vsnprintf(buf, 1000, format, those_dots); //#elif NO_VSNPRINTF + #elif defined VSNPRINTF + vsnprintf(buf, 1000, format, those_dots); #else vsprintf(buf, format, those_dots); |
From: <or...@us...> - 2004-02-17 15:39:03
|
Update of /cvsroot/timewarp/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12167/source Modified Files: scp.cpp Log Message: changed a throw to a tw_error() Index: scp.cpp =================================================================== RCS file: /cvsroot/timewarp/source/scp.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** scp.cpp 14 Feb 2004 13:18:37 -0000 1.49 --- scp.cpp 17 Feb 2004 15:30:05 -0000 1.50 *************** *** 537,541 **** new_game = type->new_game(); else ! throw "wait a sec... I can't find that game type"; new_game->preinit(); --- 537,541 ---- new_game = type->new_game(); else ! tw_error("wait a sec... I can't find that game type"); new_game->preinit(); |
From: <or...@us...> - 2004-02-17 15:31:25
|
Update of /cvsroot/timewarp/source/melee In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10739/source/melee Modified Files: mlog.cpp Log Message: fixed endianness bug in Log::file_ready() Index: mlog.cpp =================================================================== RCS file: /cvsroot/timewarp/source/melee/mlog.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mlog.cpp 29 Jan 2004 21:20:29 -0000 1.7 --- mlog.cpp 17 Feb 2004 15:22:26 -0000 1.8 *************** *** 182,185 **** --- 182,186 ---- int k; memcpy(&k, (log_data[channel_file_names] + i), sizeof(int)); + k = intel_ordering(k); if (j+k > log_len[channel_file_data]) { tw_error ("Log::file_ready - uh, that's bad"); } |
From: <or...@us...> - 2004-02-17 04:20:31
|
Update of /cvsroot/timewarp/source/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21426/source/other Modified Files: planet3d.cpp Log Message: changed fabsl() to fabs() for portability reasons Index: planet3d.cpp =================================================================== RCS file: /cvsroot/timewarp/source/other/planet3d.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** planet3d.cpp 29 Jan 2004 21:20:30 -0000 1.16 --- planet3d.cpp 17 Feb 2004 04:11:56 -0000 1.17 *************** *** 578,582 **** ! if (fabsl(zz) > 1e-10) { if (zz > 0) lon = atan(xx/zz); else lon = PI+atan(xx/zz); } --- 578,583 ---- ! if (fabs(zz) > 1e-10) { ! //orz: I changed it from fabsl() to fabs() for compatibility reasons if (zz > 0) lon = atan(xx/zz); else lon = PI+atan(xx/zz); } |
From: <or...@us...> - 2004-02-17 04:15:34
|
Update of /cvsroot/timewarp/source/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20603/source/util Modified Files: errors_c.c Log Message: added a #include "base.h"... which isn't necessary on my computer, but maybe should be? Index: errors_c.c =================================================================== RCS file: /cvsroot/timewarp/source/util/errors_c.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** errors_c.c 14 Feb 2004 13:18:38 -0000 1.7 --- errors_c.c 17 Feb 2004 04:07:00 -0000 1.8 *************** *** 4,7 **** --- 4,8 ---- #include <stdarg.h> + #include "base.h" #include "errors.h" |
Update of /cvsroot/timewarp/include/freetype/internal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17365/freetype/internal Added Files: autohint.h bdftypes.h cfftypes.h fnttypes.h ftcalc.h ftcore.h ftdebug.h ftdriver.h ftexcept.h ftgloadr.h fthash.h ftmemory.h ftobject.h ftobjs.h ftstream.h fttrace.h internal.h pcftypes.h pfr.h psaux.h pshints.h psnames.h sfnt.h t1types.h t42types.h tttypes.h Log Message: adding freetype header files which I forgot earlier ... --- NEW FILE: autohint.h --- /***************************************************************************/ /* */ /* autohint.h */ /* */ /* High-level `autohint' module-specific interface (specification). */ /* */ /* Copyright 1996-2001, 2002 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ /*************************************************************************/ /* */ /* The auto-hinter is used to load and automatically hint glyphs if a */ /* format-specific hinter isn't available. */ /* */ /*************************************************************************/ #ifndef __AUTOHINT_H__ #define __AUTOHINT_H__ /*************************************************************************/ /* */ /* A small technical note regarding automatic hinting in order to */ /* clarify this module interface. */ /* */ /* An automatic hinter might compute two kinds of data for a given face: */ /* */ /* - global hints: Usually some metrics that describe global properties */ /* of the face. It is computed by scanning more or less */ /* agressively the glyphs in the face, and thus can be */ /* very slow to compute (even if the size of global */ /* hints is really small). */ /* */ /* - glyph hints: These describe some important features of the glyph */ /* outline, as well as how to align them. They are */ /* generally much faster to compute than global hints. */ /* */ /* The current FreeType auto-hinter does a pretty good job while */ /* performing fast computations for both global and glyph hints. */ /* However, we might be interested in introducing more complex and */ /* powerful algorithms in the future, like the one described in the John */ /* D. Hobby paper, which unfortunately requires a lot more horsepower. */ /* */ /* Because a sufficiently sophisticated font management system would */ /* typically implement an LRU cache of opened face objects to reduce */ /* memory usage, it is a good idea to be able to avoid recomputing */ /* global hints every time the same face is re-opened. */ /* */ /* We thus provide the ability to cache global hints outside of the face */ /* object, in order to speed up font re-opening time. Of course, this */ /* feature is purely optional, so most client programs won't even notice */ /* it. */ /* */ /* I initially thought that it would be a good idea to cache the glyph */ /* hints too. However, my general idea now is that if you really need */ /* to cache these too, you are simply in need of a new font format, */ /* where all this information could be stored within the font file and */ /* decoded on the fly. */ /* */ /*************************************************************************/ #include <ft2build.h> #include FT_FREETYPE_H FT_BEGIN_HEADER typedef struct FT_AutoHinterRec_ *FT_AutoHinter; /*************************************************************************/ /* */ /* <FuncType> */ /* FT_AutoHinter_GlobalGetFunc */ /* */ /* <Description> */ /* Retrieves the global hints computed for a given face object the */ /* resulting data is dissociated from the face and will survive a */ /* call to FT_Done_Face(). It must be discarded through the API */ /* FT_AutoHinter_GlobalDoneFunc(). */ /* */ /* <Input> */ /* hinter :: A handle to the source auto-hinter. */ /* */ /* face :: A handle to the source face object. */ /* */ /* <Output> */ /* global_hints :: A typeless pointer to the global hints. */ /* */ /* global_len :: The size in bytes of the global hints. */ /* */ typedef void (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter, FT_Face face, void** global_hints, long* global_len ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_AutoHinter_GlobalDoneFunc */ /* */ /* <Description> */ /* Discards the global hints retrieved through */ /* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */ /* are freed from memory. */ /* */ /* <Input> */ /* hinter :: A handle to the auto-hinter module. */ /* */ /* global :: A pointer to retrieved global hints to discard. */ /* */ typedef void (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter hinter, void* global ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_AutoHinter_GlobalResetFunc */ /* */ /* <Description> */ /* This function is used to recompute the global metrics in a given */ /* font. This is useful when global font data changes (e.g. Multiple */ /* Masters fonts where blend coordinates change). */ /* */ /* <Input> */ /* hinter :: A handle to the source auto-hinter. */ /* */ /* face :: A handle to the face. */ /* */ typedef void (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter hinter, FT_Face face ); /*************************************************************************/ /* */ /* <FuncType> */ /* FT_AutoHinter_GlyphLoadFunc */ /* */ /* <Description> */ /* This function is used to load, scale, and automatically hint a */ /* glyph from a given face. */ /* */ /* <Input> */ /* face :: A handle to the face. */ /* */ /* glyph_index :: The glyph index. */ /* */ /* load_flags :: The load flags. */ /* */ /* <Note> */ /* This function is capable of loading composite glyphs by hinting */ /* each sub-glyph independently (which improves quality). */ /* */ /* It will call the font driver with FT_Load_Glyph(), with */ /* FT_LOAD_NO_SCALE set. */ /* */ typedef FT_Error (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter, FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags ); /*************************************************************************/ /* */ /* <Struct> */ /* FT_AutoHinter_ServiceRec */ /* */ /* <Description> */ /* The auto-hinter module's interface. */ /* */ typedef struct FT_AutoHinter_ServiceRec_ { FT_AutoHinter_GlobalResetFunc reset_face; FT_AutoHinter_GlobalGetFunc get_global_hints; FT_AutoHinter_GlobalDoneFunc done_global_hints; FT_AutoHinter_GlyphLoadFunc load_glyph; } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service; FT_END_HEADER #endif /* __AUTOHINT_H__ */ /* END */ --- NEW FILE: bdftypes.h --- /* bdftypes.h FreeType font driver for bdf fonts Copyright (C) 2001, 2002 by Francesco Zappa Nardelli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef __BDFTYPES_H__ #define __BDFTYPES_H__ #include <ft2build.h> #include FT_FREETYPE_H #include FT_BDF_H FT_BEGIN_HEADER typedef struct BDF_Public_FaceRec_ { FT_FaceRec root; char* charset_encoding; char* charset_registry; } BDF_Public_FaceRec, *BDF_Public_Face; typedef FT_Error (*BDF_GetPropertyFunc)( FT_Face face, const char* prop_name, BDF_PropertyRec *aproperty ); FT_END_HEADER #endif /* __BDFTYPES_H__ */ /* END */ --- NEW FILE: cfftypes.h --- /***************************************************************************/ /* */ /* cfftypes.h */ /* */ /* Basic OpenType/CFF type definitions and interface (specification */ /* only). */ /* */ /* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __CFFTYPES_H__ #define __CFFTYPES_H__ #include <ft2build.h> #include FT_FREETYPE_H FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Struct> */ /* CFF_IndexRec */ /* */ /* <Description> */ /* A structure used to model a CFF Index table. */ /* */ /* <Fields> */ /* stream :: The source input stream. */ /* */ /* count :: The number of elements in the index. */ /* */ /* off_size :: The size in bytes of object offsets in index. */ /* */ /* data_offset :: The position of first data byte in the index's */ /* bytes. */ /* */ /* offsets :: A table of element offsets in the index. */ /* */ /* bytes :: If the index is loaded in memory, its bytes. */ /* */ typedef struct CFF_IndexRec_ { FT_Stream stream; FT_UInt count; FT_Byte off_size; FT_ULong data_offset; FT_ULong* offsets; FT_Byte* bytes; } CFF_IndexRec, *CFF_Index; typedef struct CFF_EncodingRec_ { FT_UInt format; FT_ULong offset; FT_UInt count; FT_UShort sids [256]; /* avoid dynamic allocations */ FT_UShort codes[256]; } CFF_EncodingRec, *CFF_Encoding; typedef struct CFF_CharsetRec_ { FT_UInt format; FT_ULong offset; FT_UShort* sids; } CFF_CharsetRec, *CFF_Charset; typedef struct CFF_FontRecDictRec_ { FT_UInt version; FT_UInt notice; FT_UInt copyright; FT_UInt full_name; FT_UInt family_name; FT_UInt weight; FT_Bool is_fixed_pitch; FT_Fixed italic_angle; FT_Fixed underline_position; FT_Fixed underline_thickness; FT_Int paint_type; FT_Int charstring_type; FT_Matrix font_matrix; FT_UShort units_per_em; FT_Vector font_offset; FT_ULong unique_id; FT_BBox font_bbox; FT_Pos stroke_width; FT_ULong charset_offset; FT_ULong encoding_offset; FT_ULong charstrings_offset; FT_ULong private_offset; FT_ULong private_size; FT_Long synthetic_base; FT_UInt embedded_postscript; FT_UInt base_font_name; FT_UInt postscript; /* these should only be used for the top-level font dictionary */ FT_UInt cid_registry; FT_UInt cid_ordering; FT_ULong cid_supplement; FT_Long cid_font_version; FT_Long cid_font_revision; FT_Long cid_font_type; FT_Long cid_count; FT_ULong cid_uid_base; FT_ULong cid_fd_array_offset; FT_ULong cid_fd_select_offset; FT_UInt cid_font_name; } CFF_FontRecDictRec, *CFF_FontRecDict; typedef struct CFF_PrivateRec_ { FT_Byte num_blue_values; FT_Byte num_other_blues; FT_Byte num_family_blues; FT_Byte num_family_other_blues; FT_Pos blue_values[14]; FT_Pos other_blues[10]; FT_Pos family_blues[14]; FT_Pos family_other_blues[10]; FT_Fixed blue_scale; FT_Pos blue_shift; FT_Pos blue_fuzz; FT_Pos standard_width; FT_Pos standard_height; FT_Byte num_snap_widths; FT_Byte num_snap_heights; FT_Pos snap_widths[13]; FT_Pos snap_heights[13]; FT_Bool force_bold; FT_Fixed force_bold_threshold; FT_Int lenIV; FT_Int language_group; FT_Fixed expansion_factor; FT_Long initial_random_seed; FT_ULong local_subrs_offset; FT_Pos default_width; FT_Pos nominal_width; } CFF_PrivateRec, *CFF_Private; typedef struct CFF_FDSelectRec_ { FT_Byte format; FT_UInt range_count; /* that's the table, taken from the file `as is' */ FT_Byte* data; FT_UInt data_size; /* small cache for format 3 only */ FT_UInt cache_first; FT_UInt cache_count; FT_Byte cache_fd; } CFF_FDSelectRec, *CFF_FDSelect; /* A SubFont packs a font dict and a private dict together. They are */ /* needed to support CID-keyed CFF fonts. */ typedef struct CFF_SubFontRec_ { CFF_FontRecDictRec font_dict; CFF_PrivateRec private_dict; CFF_IndexRec local_subrs_index; FT_UInt num_local_subrs; FT_Byte** local_subrs; } CFF_SubFontRec, *CFF_SubFont; /* maximum number of sub-fonts in a CID-keyed file */ #define CFF_MAX_CID_FONTS 16 typedef struct CFF_FontRec_ { FT_Stream stream; FT_Memory memory; FT_UInt num_faces; FT_UInt num_glyphs; FT_Byte version_major; FT_Byte version_minor; FT_Byte header_size; FT_Byte absolute_offsize; CFF_IndexRec name_index; CFF_IndexRec top_dict_index; CFF_IndexRec string_index; CFF_IndexRec global_subrs_index; CFF_EncodingRec encoding; CFF_CharsetRec charset; CFF_IndexRec charstrings_index; CFF_IndexRec font_dict_index; CFF_IndexRec private_index; CFF_IndexRec local_subrs_index; FT_String* font_name; FT_UInt num_global_subrs; FT_Byte** global_subrs; CFF_SubFontRec top_font; FT_UInt num_subfonts; CFF_SubFont subfonts[CFF_MAX_CID_FONTS]; CFF_FDSelectRec fd_select; /* interface to PostScript hinter */ void* pshinter; /* interface to Postscript Names service */ void* psnames; } CFF_FontRec, *CFF_Font; FT_END_HEADER #endif /* __CFFTYPES_H__ */ /* END */ --- NEW FILE: fnttypes.h --- /***************************************************************************/ /* */ /* fnttypes.h */ /* */ /* Basic Windows FNT/FON type definitions and interface (specification */ /* only). */ /* */ /* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FNTTYPES_H__ #define __FNTTYPES_H__ #include <ft2build.h> #include FT_FREETYPE_H #include FT_WINFONTS_H FT_BEGIN_HEADER typedef struct WinMZ_HeaderRec_ { FT_UShort magic; /* skipped content */ FT_UShort lfanew; } WinMZ_HeaderRec; typedef struct WinNE_HeaderRec_ { FT_UShort magic; /* skipped content */ FT_UShort resource_tab_offset; FT_UShort rname_tab_offset; } WinNE_HeaderRec; typedef struct WinNameInfoRec_ { FT_UShort offset; FT_UShort length; FT_UShort flags; FT_UShort id; FT_UShort handle; FT_UShort usage; } WinNameInfoRec; typedef struct WinResourceInfoRec_ { FT_UShort type_id; FT_UShort count; } WinResourceInfoRec; #define WINFNT_MZ_MAGIC 0x5A4D #define WINFNT_NE_MAGIC 0x454E typedef struct FNT_FontRec_ { FT_ULong offset; FT_Int size_shift; FT_WinFNT_HeaderRec header; FT_Byte* fnt_frame; FT_ULong fnt_size; } FNT_FontRec, *FNT_Font; typedef struct FNT_FaceRec_ { FT_FaceRec root; FNT_Font font; FT_CharMap charmap_handle; FT_CharMapRec charmap; /* a single charmap per face */ } FNT_FaceRec, *FNT_Face; FT_END_HEADER #endif /* __FNTTYPES_H__ */ /* END */ --- NEW FILE: ftcalc.h --- /***************************************************************************/ /* */ /* ftcalc.h */ /* */ /* Arithmetic computations (specification). */ /* */ /* Copyright 1996-2001, 2002 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTCALC_H__ #define __FTCALC_H__ #include <ft2build.h> #include FT_FREETYPE_H FT_BEGIN_HEADER FT_EXPORT( FT_Int32 ) FT_SqrtFixed( FT_Int32 x ); #define SQRT_32( x ) FT_Sqrt32( x ) /*************************************************************************/ /* */ /* <Function> */ /* FT_Sqrt32 */ /* */ /* <Description> */ /* Computes the square root of an Int32 integer (which will be */ /* handled as an unsigned long value). */ /* */ /* <Input> */ /* x :: The value to compute the root for. */ /* */ /* <Return> */ /* The result of `sqrt(x)'. */ /* */ FT_EXPORT( FT_Int32 ) FT_Sqrt32( FT_Int32 x ); /*************************************************************************/ /* */ /* FT_MulDiv() and FT_MulFix() are declared in freetype.h. */ /* */ /*************************************************************************/ #define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) #define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) #define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) #define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) << 2 ) #define FLOAT_TO_FIXED( x ) ( (FT_Long)( x * 65536.0 ) ) #define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ : ( -( ( 32 - (x) ) & -64 ) ) ) FT_END_HEADER #endif /* __FTCALC_H__ */ /* END */ --- NEW FILE: ftcore.h --- #ifndef __FT_CORE_H__ #define __FT_CORE_H__ #include <ft2build.h> #include FT_TYPES_H #include FT_SYSTEM_MEMORY_H FT_BEGIN_HEADER /**************************************************************************/ /**************************************************************************/ /***** *****/ /***** C L E A N U P S T A C K *****/ /***** *****/ /**************************************************************************/ /**************************************************************************/ /************************************************************************ * * @functype: FT_CleanupFunc * * @description: * a function used to cleanup a given item on the cleanup stack * * @input: * item :: target item pointer * item_data :: optional argument to cleanup routine */ typedef void (*FT_CleanupFunc)( FT_Pointer item, FT_Pointer item_data ); /************************************************************************ * * @type: FT_XHandler * * @description: * handle to an exception-handler structure for the FreeType * exception sub-system * * @note: * exception handlers are allocated on the stack within a * @FT_XTRY macro. Do not try to access them directly. */ typedef struct FT_XHandlerRec_* FT_XHandler; /* the size of a cleanup chunk in bytes is FT_CLEANUP_CHUNK_SIZE*12 + 4 */ /* this must be a small power of 2 whenever possible.. */ /* */ /* with a value of 5, we have a byte size of 64 bytes per chunk.. */ /* */ #define FT_CLEANUP_CHUNK_SIZE 5 typedef struct FT_CleanupItemRec_ { FT_Pointer item; FT_CleanupFunc item_func; FT_Pointer item_data; } FT_CleanupItemRec; typedef struct FT_CleanupChunkRec_* FT_CleanupChunk; typedef struct FT_CleanupChunkRec_ { FT_CleanupChunk link; FT_CleanupItemRec items[ FT_CLEANUP_CHUNK_SIZE ]; } FT_CleanupChunkRec; typedef struct FT_CleanupStackRec_ { FT_CleanupItem top; FT_CleanupItem limit; FT_CleanupChunk chunk; FT_CleanupChunkRec chunk_0; /* avoids stupid dynamic allocation */ FT_Memory memory; } FT_CleanupStackRec, *FT_CleanupStack; FT_BASE( void ) ft_cleanup_stack_push( FT_CleanupStack stack, FT_Pointer item, FT_CleanupFunc item_func, FT_Pointer item_data ); FT_BASE( void ) ft_cleanup_stack_pop( FT_CleanupStack stack, FT_Int destroy ); FT_BASE( FT_CleanupItem ) ft_cleanup_stack_peek( FT_CleanupStack stack ); FT_BASE( void ) ft_cleanup_throw( FT_CleanupStack stack, FT_Error error ); /**************************************************************************/ /**************************************************************************/ /***** *****/ /***** M E M O R Y M A N A G E R *****/ /***** *****/ /**************************************************************************/ /**************************************************************************/ typedef struct FT_MemoryRec_ { FT_Memory_AllocFunc mem_alloc; /* shortcut to funcs->mem_alloc */ FT_Memory_FreeFunc mem_free; /* shortcut to funcs->mem_free */ FT_Pointer mem_data; const FT_Memory_Funcs mem_funcs; FT_CleanupStackRec cleanup_stack; FT_Pointer meta_class; } FT_MemoryRec; #define FT_MEMORY(x) ((FT_Memory)(x)) #define FT_MEMORY__ALLOC(x) FT_MEMORY(x)->mem_alloc #define FT_MEMORY__FREE(x) FT_MEMORY(x)->mem_free #define FT_MEMORY__REALLOC(x) FT_MEMORY(x)->mem_funcs->mem_realloc #define FT_MEMORY__CLEANUP(x) (&FT_MEMORY(x)->cleanup_stack) #define FT_MEMORY__META_CLASS(x) ((FT_MetaClass)(FT_MEMORY(x)->meta_class)) /**************************************************************************/ /**************************************************************************/ /***** *****/ /***** E X C E P T I O N H A N D L I N G *****/ /***** *****/ /**************************************************************************/ /**************************************************************************/ /************************************************************************ * * @struct: FT_XHandlerRec * * @description: * exception handler structure * * @fields: * previous :: previous handler in chain. * jum_buffer :: processor state used by setjmp/longjmp to implement * exception control transfer * error :: exception error code * mark :: top of cleanup stack when @FT_XTRY is used */ typedef struct FT_XHandlerRec_ { FT_XHandler previous; ft_jmp_buf jump_buffer; volatile FT_Error error; FT_Pointer mark; } FT_XHandlerRec; FT_BASE( void ) ft_xhandler_enter( FT_XHandler xhandler, FT_Memory memory ); FT_BASE( void ) ft_xhandler_exit( FT_XHandler xhandler ); FT_END_HEADER #endif /* __FT_CORE_H__ */ --- NEW FILE: ftdebug.h --- /***************************************************************************/ /* */ /* ftdebug.h */ /* */ /* Debugging and logging component (specification). */ /* */ /* Copyright 1996-2001, 2002 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /* */ /* IMPORTANT: A description of FreeType's debugging support can be */ /* found in "docs/DEBUG.TXT". Read it if you need to use or */ /* understand this code. */ /* */ /***************************************************************************/ #ifndef __FTDEBUG_H__ #define __FTDEBUG_H__ #include <ft2build.h> #include FT_CONFIG_CONFIG_H FT_BEGIN_HEADER /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */ /* is already defined; this simplifies the following #ifdefs */ /* */ #ifdef FT_DEBUG_LEVEL_TRACE #undef FT_DEBUG_LEVEL_ERROR #define FT_DEBUG_LEVEL_ERROR #endif /*************************************************************************/ /* */ /* Define the trace enums as well as the trace levels array when they */ /* are needed. */ /* */ /*************************************************************************/ #ifdef FT_DEBUG_LEVEL_TRACE #define FT_TRACE_DEF( x ) trace_ ## x , /* defining the enumeration */ typedef enum { #include FT_INTERNAL_TRACE_H trace_count } FT_Trace; /* defining the array of trace levels, provided by `src/base/ftdebug.c' */ extern int ft_trace_levels[trace_count]; #undef FT_TRACE_DEF #endif /* FT_DEBUG_LEVEL_TRACE */ /*************************************************************************/ /* */ /* Define the FT_TRACE macro */ /* */ /* IMPORTANT! */ /* */ /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */ /* value before using any TRACE macro. */ /* */ /*************************************************************************/ #ifdef FT_DEBUG_LEVEL_TRACE #define FT_TRACE( level, varformat ) \ do \ { \ if ( ft_trace_levels[FT_COMPONENT] >= level ) \ FT_Message varformat; \ } while ( 0 ) #else /* !FT_DEBUG_LEVEL_TRACE */ #define FT_TRACE( level, varformat ) do ; while ( 0 ) /* nothing */ #endif /* !FT_DEBUG_LEVEL_TRACE */ /*************************************************************************/ /* */ /* You need two opening resp. closing parentheses! */ /* */ /* Example: FT_TRACE0(( "Value is %i", foo )) */ /* */ /*************************************************************************/ #define FT_TRACE0( varformat ) FT_TRACE( 0, varformat ) #define FT_TRACE1( varformat ) FT_TRACE( 1, varformat ) #define FT_TRACE2( varformat ) FT_TRACE( 2, varformat ) #define FT_TRACE3( varformat ) FT_TRACE( 3, varformat ) #define FT_TRACE4( varformat ) FT_TRACE( 4, varformat ) #define FT_TRACE5( varformat ) FT_TRACE( 5, varformat ) #define FT_TRACE6( varformat ) FT_TRACE( 6, varformat ) #define FT_TRACE7( varformat ) FT_TRACE( 7, varformat ) /*************************************************************************/ /* */ /* Define the FT_ERROR macro */ /* */ /*************************************************************************/ #ifdef FT_DEBUG_LEVEL_ERROR #define FT_ERROR( varformat ) FT_Message varformat #else /* !FT_DEBUG_LEVEL_ERROR */ #define FT_ERROR( varformat ) do ; while ( 0 ) /* nothing */ #endif /* !FT_DEBUG_LEVEL_ERROR */ /*************************************************************************/ /* */ /* Define the FT_ASSERT macro */ /* */ /*************************************************************************/ #ifdef FT_DEBUG_LEVEL_ERROR #define FT_ASSERT( condition ) \ do \ { \ if ( !( condition ) ) \ FT_Panic( "assertion failed on line %d of file %s\n", \ __LINE__, __FILE__ ); \ } while ( 0 ) #else /* !FT_DEBUG_LEVEL_ERROR */ #define FT_ASSERT( condition ) do ; while ( 0 ) #endif /* !FT_DEBUG_LEVEL_ERROR */ /*************************************************************************/ /* */ /* Define 'FT_Message' and 'FT_Panic' when needed */ /* */ /*************************************************************************/ #ifdef FT_DEBUG_LEVEL_ERROR #include "stdio.h" /* for vprintf() */ /* print a message */ FT_EXPORT( void ) FT_Message( const char* fmt, ... ); /* print a message and exit */ FT_EXPORT( void ) FT_Panic( const char* fmt, ... ); #endif /* FT_DEBUG_LEVEL_ERROR */ FT_BASE( void ) ft_debug_init( void ); #if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */ /* we disable the warning `conditional expression is constant' here */ /* in order to compile cleanly with the maximum level of warnings */ #pragma warning( disable : 4127 ) #endif /* _MSC_VER */ FT_END_HEADER #endif /* __FTDEBUG_H__ */ /* END */ --- NEW FILE: ftdriver.h --- /***************************************************************************/ /* */ /* ftdriver.h */ /* */ /* FreeType font driver interface (specification). */ /* */ /* Copyright 1996-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTDRIVER_H__ #define __FTDRIVER_H__ #include <ft2build.h> #include FT_MODULE_H FT_BEGIN_HEADER typedef FT_Error (*FT_Face_InitFunc)( FT_Stream stream, FT_Face face, FT_Int typeface_index, FT_Int num_params, FT_Parameter* parameters ); typedef void (*FT_Face_DoneFunc)( FT_Face face ); typedef FT_Error (*FT_Size_InitFunc)( FT_Size size ); typedef void (*FT_Size_DoneFunc)( FT_Size size ); typedef FT_Error (*FT_Slot_InitFunc)( FT_GlyphSlot slot ); typedef void (*FT_Slot_DoneFunc)( FT_GlyphSlot slot ); typedef FT_Error (*FT_Size_ResetPointsFunc)( FT_Size size, FT_F26Dot6 char_width, FT_F26Dot6 char_height, FT_UInt horz_resolution, FT_UInt vert_resolution ); typedef FT_Error (*FT_Size_ResetPixelsFunc)( FT_Size size, FT_UInt pixel_width, FT_UInt pixel_height ); typedef FT_Error (*FT_Slot_LoadFunc)( FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags ); typedef FT_UInt (*FT_CharMap_CharIndexFunc)( FT_CharMap charmap, FT_Long charcode ); typedef FT_Long (*FT_CharMap_CharNextFunc)( FT_CharMap charmap, FT_Long charcode ); typedef FT_Error (*FT_Face_GetKerningFunc)( FT_Face face, FT_UInt left_glyph, FT_UInt right_glyph, FT_Vector* kerning ); typedef FT_Error (*FT_Face_AttachFunc)( FT_Face face, FT_Stream stream ); typedef FT_Error (*FT_Face_GetAdvancesFunc)( FT_Face face, FT_UInt first, FT_UInt count, FT_Bool vertical, FT_UShort* advances ); /*************************************************************************/ /* */ /* <Struct> */ /* FT_Driver_ClassRec */ /* */ /* <Description> */ /* The font driver class. This structure mostly contains pointers to */ /* driver methods. */ /* */ /* <Fields> */ /* root :: The parent module. */ /* */ /* face_object_size :: The size of a face object in bytes. */ /* */ /* size_object_size :: The size of a size object in bytes. */ /* */ /* slot_object_size :: The size of a glyph object in bytes. */ /* */ /* init_face :: The format-specific face constructor. */ /* */ /* done_face :: The format-specific face destructor. */ /* */ /* init_size :: The format-specific size constructor. */ /* */ /* done_size :: The format-specific size destructor. */ /* */ /* init_slot :: The format-specific slot constructor. */ /* */ /* done_slot :: The format-specific slot destructor. */ /* */ /* set_char_sizes :: A handle to a function used to set the new */ /* character size in points + resolution. Can be */ /* set to 0 to indicate default behaviour. */ /* */ /* set_pixel_sizes :: A handle to a function used to set the new */ /* character size in pixels. Can be set to 0 to */ /* indicate default behaviour. */ /* */ /* load_glyph :: A function handle to load a given glyph image */ /* in a slot. This field is mandatory! */ /* */ /* get_char_index :: A function handle to return the glyph index of */ /* a given character for a given charmap. This */ /* field is mandatory! */ /* */ /* get_kerning :: A function handle to return the unscaled */ /* kerning for a given pair of glyphs. Can be */ /* set to 0 if the format doesn't support */ /* kerning. */ /* */ /* attach_file :: This function handle is used to read */ /* additional data for a face from another */ /* file/stream. For example, this can be used to */ /* add data from AFM or PFM files on a Type 1 */ /* face, or a CIDMap on a CID-keyed face. */ /* */ /* get_advances :: A function handle used to return the advances */ /* of 'count' glyphs, starting at `index'. the */ /* `vertical' flags must be set when vertical */ /* advances are queried. The advances buffer is */ /* caller-allocated. */ /* */ /* <Note> */ /* Most function pointers, with the exception of `load_glyph' and */ /* `get_char_index' can be set to 0 to indicate a default behaviour. */ /* */ typedef struct FT_Driver_ClassRec_ { FT_Module_Class root; FT_Long face_object_size; FT_Long size_object_size; FT_Long slot_object_size; FT_Face_InitFunc init_face; FT_Face_DoneFunc done_face; FT_Size_InitFunc init_size; FT_Size_DoneFunc done_size; FT_Slot_InitFunc init_slot; FT_Slot_DoneFunc done_slot; FT_Size_ResetPointsFunc set_char_sizes; FT_Size_ResetPixelsFunc set_pixel_sizes; FT_Slot_LoadFunc load_glyph; FT_Face_GetKerningFunc get_kerning; FT_Face_AttachFunc attach_file; FT_Face_GetAdvancesFunc get_advances; } FT_Driver_ClassRec, *FT_Driver_Class; FT_END_HEADER #endif /* __FTDRIVER_H__ */ /* END */ --- NEW FILE: ftexcept.h --- #ifndef __FT_EXCEPT_H__ #define __FT_EXCEPT_H__ #include <ft2build.h> #include FT_INTERNAL_OBJECTS_H FT_BEGIN_HEADER /* I can't find a better place for this for now */ <<<<<<< ftexcept.h ======= /* the size of a cleanup chunk in bytes is FT_CLEANUP_CHUNK_SIZE*12 + 4 */ /* this must be a small power of 2 whenever possible.. */ /* */ /* with a value of 5, we have a byte size of 64 bytes per chunk.. */ /* */ #define FT_CLEANUP_CHUNK_SIZE 5 typedef struct FT_CleanupItemRec_ { FT_Pointer item; FT_CleanupFunc item_func; FT_Pointer item_data; } FT_CleanupItemRec; typedef struct FT_CleanupChunkRec_* FT_CleanupChunk; typedef struct FT_CleanupChunkRec_ { FT_CleanupChunk link; FT_CleanupItemRec items[ FT_CLEANUP_CHUNK_SIZE ]; } FT_CleanupChunkRec; typedef struct FT_CleanupStackRec_ { FT_CleanupItem top; FT_CleanupItem limit; FT_CleanupChunk chunk; FT_CleanupChunkRec chunk_0; /* avoids stupid dynamic allocation */ FT_Memory memory; } FT_CleanupStackRec, *FT_CleanupStack; FT_BASE( void ) ft_cleanup_stack_push( FT_CleanupStack stack, FT_Pointer item, FT_CleanupFunc item_func, FT_Pointer item_data ); FT_BASE( void ) ft_cleanup_stack_pop( FT_CleanupStack stack, FT_Int destroy ); FT_BASE( FT_CleanupItem ) ft_cleanup_stack_peek( FT_CleanupStack stack ); FT_BASE( void ) ft_xhandler_enter( FT_XHandler xhandler, FT_Memory memory ); FT_BASE( void ) ft_xhandler_exit( FT_XHandler xhandler ); FT_BASE( void ) ft_cleanup_throw( FT_CleanupStack stack, FT_Error error ); >>>>>>> 1.2 FT_END_HEADER #endif /* __FT_EXCEPT_H__ */ --- NEW FILE: ftgloadr.h --- /***************************************************************************/ /* */ /* ftgloadr.h */ /* */ /* The FreeType glyph loader (specification). */ /* */ /* Copyright 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #ifndef __FTGLOADR_H__ #define __FTGLOADR_H__ #include <ft2build.h> #include FT_FREETYPE_H FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Struct> */ /* FT_GlyphLoader */ /* */ /* <Description> */ /* The glyph loader is an internal object used to load several glyphs */ /* together (for example, in the case of composites). */ /* */ /* <Note> */ /* The glyph loader implementation is not part of the high-level API, */ /* hence the forward structure declaration. */ /* */ typedef struct FT_GlyphLoaderRec_* FT_GlyphLoader ; #define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS 1 #define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES 2 #define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID 4 #define FT_SUBGLYPH_FLAG_SCALE 8 #define FT_SUBGLYPH_FLAG_XY_SCALE 0x40 #define FT_SUBGLYPH_FLAG_2X2 0x80 #define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200 typedef struct FT_SubGlyphRec_ { FT_Int index; FT_UShort flags; FT_Int arg1; FT_Int arg2; FT_Matrix transform; } FT_SubGlyphRec; typedef struct FT_GlyphLoadRec_ { FT_Outline outline; /* outline */ FT_Vector* extra_points; /* extra points table */ FT_UInt num_subglyphs; /* number of subglyphs */ FT_SubGlyph subglyphs; /* subglyphs */ } FT_GlyphLoadRec, *FT_GlyphLoad; typedef struct FT_GlyphLoaderRec_ { FT_Memory memory; FT_UInt max_points; FT_UInt max_contours; FT_UInt max_subglyphs; FT_Bool use_extra; FT_GlyphLoadRec base; FT_GlyphLoadRec current; void* other; /* for possible future extension? */ } FT_GlyphLoaderRec; /* create new empty glyph loader */ FT_BASE( FT_Error ) FT_GlyphLoader_New( FT_Memory memory, FT_GlyphLoader *aloader ); /* add an extra points table to a glyph loader */ FT_BASE( FT_Error ) FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader ); /* destroy a glyph loader */ FT_BASE( void ) FT_GlyphLoader_Done( FT_GlyphLoader loader ); /* reset a glyph loader (frees everything int it) */ FT_BASE( void ) FT_GlyphLoader_Reset( FT_GlyphLoader loader ); /* rewind a glyph loader */ FT_BASE( void ) FT_GlyphLoader_Rewind( FT_GlyphLoader loader ); /* check that there is enough room to add 'n_points' and 'n_contours' */ /* to the glyph loader */ FT_BASE( FT_Error ) FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader, FT_UInt n_points, FT_UInt n_contours ); /* check that there is enough room to add 'n_subs' sub-glyphs to */ /* a glyph loader */ FT_BASE( FT_Error ) FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader, FT_UInt n_subs ); /* prepare a glyph loader, i.e. empty the current glyph */ FT_BASE( void ) FT_GlyphLoader_Prepare( FT_GlyphLoader loader ); /* add the current glyph to the base glyph */ FT_BASE( void ) FT_GlyphLoader_Add( FT_GlyphLoader loader ); /* copy points from one glyph loader to another */ FT_BASE( FT_Error ) FT_GlyphLoader_CopyPoints( FT_GlyphLoader target, FT_GlyphLoader source ); /* */ FT_END_HEADER #endif /* __FTGLOADR_H__ */ /* END */ --- NEW FILE: fthash.h --- /****************************************************************** * * fthash.h - fast dynamic hash tables * * Copyright 2002 by * David Turner, Robert Wilhelm, and Werner Lemberg * * This file is part of the FreeType project, and may only be used, * modified, and distributed under the terms of the FreeType project * license, LICENSE.TXT. By continuing to use, modify, or distribute * this file you indicate that you have read the license and * understand and accept it fully. * * * This header is used to define dynamic hash tables as described * by the article "Main-Memory Linear Hashing - Some Enhancements * of Larson's Algorithm" by Mikael Petterson. * * Basically, linear hashing prevents big "stalls" during * resizes of the buckets array by only splitting one bucket * at a time. This ensures excellent response time even when * the table is frequently resi... [truncated message content] |