Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
C/C++ - [C] Problema dell'esecuzione di programmi scritti con la libreria graphics.h
Forum - C/C++ - [C] Problema dell'esecuzione di programmi scritti con la libreria graphics.h - Pagina 2

Pagine: [ 1 2 3 ] Precedente | Prossimo
Avatar
SamIAm (Normal User)
Newbie


Messaggi: 16
Iscritto: 09/09/2012

Segnala al moderatore
Postato alle 19:17
Sabato, 27/12/2014
e questo è il contenuto del file "winbgim.h" (modificato)

Codice sorgente - presumibilmente Delphi

  1. // The winbgim library, Version 6.0, August 9, 2004
  2. // Written by:
  3. //      Grant Macklem (Grant.Macklem@colorado.edu)
  4. //      Gregory Schmelter (Gregory.Schmelter@colorado.edu)
  5. //      Alan Schmidt (Alan.Schmidt@colorado.edu)
  6. //      Ivan Stashak (Ivan.Stashak@colorado.edu)
  7. //      Michael Main (Michael.Main@colorado.edu)
  8. // CSCI 4830/7818: API Programming
  9. // University of Colorado at Boulder, Spring 2003
  10.  
  11.  
  12. // ---------------------------------------------------------------------------
  13. //                          Notes
  14. // ---------------------------------------------------------------------------
  15. // * This library is still under development.
  16. // * Please see http://www.cs.colorado.edu/~main/bgi for information on
  17. // * using this library with the mingw32 g++ compiler.
  18. // * This library only works with Windows API level 4.0 and higher (Windows 95, NT 4.0 and newer)
  19. // * This library may not be compatible with 64-bit versions of Windows
  20. // ---------------------------------------------------------------------------
  21.  
  22.  
  23. // ---------------------------------------------------------------------------
  24. //                          Macro Guard and Include Directives
  25. // ---------------------------------------------------------------------------
  26. #ifndef WINBGI_H
  27. #define WINBGI_H
  28. #include <windows.h>        // Provides the mouse message types
  29. #include <limits.h>         // Provides INT_MAX
  30. #include <sstream>          // Provides std::ostringstream
  31. // ---------------------------------------------------------------------------
  32.  
  33.  
  34.  
  35. // ---------------------------------------------------------------------------
  36. //                          Definitions
  37. // ---------------------------------------------------------------------------
  38. // Definitions for the key pad extended keys are added here.  When one
  39. // of these keys are pressed, getch will return a zero followed by one
  40. // of these values. This is the same way that it works in conio for
  41. // dos applications.
  42. #define KEY_HOME        71
  43. #define KEY_UP          72
  44. #define KEY_PGUP        73
  45. #define KEY_LEFT        75
  46. #define KEY_CENTER      76
  47. #define KEY_RIGHT       77
  48. #define KEY_END         79
  49. #define KEY_DOWN        80
  50. #define KEY_PGDN        81
  51. #define KEY_INSERT      82
  52. #define KEY_DELETE      83
  53. #define KEY_F1          59
  54. #define KEY_F2          60
  55. #define KEY_F3          61
  56. #define KEY_F4          62
  57. #define KEY_F5          63
  58. #define KEY_F6          64
  59. #define KEY_F7          65
  60. #define KEY_F8          66
  61. #define KEY_F9          67
  62.  
  63. // Line thickness settings
  64. #define NORM_WIDTH      1
  65. #define THICK_WIDTH     3
  66.  
  67. // Character Size and Direction
  68. #define USER_CHAR_SIZE  0
  69. #define HORIZ_DIR       0
  70. #define VERT_DIR        1
  71.  
  72.  
  73. // Constants for closegraph
  74. #define CURRENT_WINDOW -1
  75. #define ALL_WINDOWS -2
  76. #define NO_CURRENT_WINDOW -3
  77.  
  78. // The standard Borland 16 colors
  79. #define MAXCOLORS       15
  80. enum colors { BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY,
  81.               LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE };
  82.  
  83. // The standard line styles
  84. enum line_styles { SOLID_LINE, DOTTED_LINE, CENTER_LINE, DASHED_LINE, USERBIT_LINE };
  85.  
  86. // The standard fill styles
  87. enum fill_styles { EMPTY_FILL, SOLID_FILL, LINE_FILL, LTSLASH_FILL, SLASH_FILL,
  88.                    BKSLASH_FILL, LTBKSLASH_FILL, HATCH_FILL, XHATCH_FILL, INTERLEAVE_FILL,
  89.                    WIDE_DOT_FILL, CLOSE_DOT_FILL, USER_FILL };
  90.  
  91. // The various graphics drivers
  92. enum graphics_drivers { DETECT, CGA, MCGA, EGA, EGA64, EGAMONO, IBM8514, HERCMONO,
  93.                         ATT400, VGA, PC3270 };
  94.  
  95. // Various modes for each graphics driver
  96. enum graphics_modes { CGAC0, CGAC1, CGAC2, CGAC3, CGAHI,
  97.                       MCGAC0 = 0, MCGAC1, MCGAC2, MCGAC3, MCGAMED, MCGAHI,
  98.                       EGALO = 0, EGAHI,
  99.                       EGA64LO = 0, EGA64HI,
  100.                       EGAMONOHI = 3,
  101.                       HERCMONOHI = 0,
  102.                       ATT400C0 = 0, ATT400C1, ATT400C2, ATT400C3, ATT400MED, ATT400HI,
  103.                       VGALO = 0, VGAMED, VGAHI,
  104.                       PC3270HI = 0,
  105.                       IBM8514LO = 0, IBM8514HI };
  106.  
  107. // Borland error messages for the graphics window.
  108. #define NO_CLICK        -1      // No mouse event of the current type in getmouseclick
  109. enum graph_errors { grInvalidVersion = -18, grInvalidDeviceNum = -15, grInvalidFontNum,
  110.                     grInvalidFont, grIOerror, grError, grInvalidMode, grNoFontMem,
  111.                     grFontNotFound, grNoFloodMem, grNoScanMem, grNoLoadMem,
  112.                     grInvalidDriver, grFileNotFound, grNotDetected, grNoInitGraph,
  113.                     grOk };
  114.  
  115. // Write modes
  116. enum putimage_ops{ COPY_PUT, XOR_PUT, OR_PUT, AND_PUT, NOT_PUT };
  117.  
  118. // Text Modes
  119. enum horiz { LEFT_TEXT, CENTER_TEXT, RIGHT_TEXT };
  120. enum vertical { BOTTOM_TEXT, VCENTER_TEXT, TOP_TEXT }; // middle not needed other than as seperator
  121. enum font_names { DEFAULT_FONT, TRIPLEX_FONT, SMALL_FONT, SANS_SERIF_FONT,
  122.              GOTHIC_FONT, SCRIPT_FONT, SIMPLEX_FONT, TRIPLEX_SCR_FONT,
  123.                          COMPLEX_FONT, EUROPEAN_FONT, BOLD_FONT };
  124. // ---------------------------------------------------------------------------
  125.  
  126.  
  127.  
  128. // ---------------------------------------------------------------------------
  129. //                              Structures
  130. // ---------------------------------------------------------------------------
  131. // This structure records information about the last call to arc.  It is used
  132. // by getarccoords to get the location of the endpoints of the arc.
  133. struct arccoordstype
  134. {
  135.     int x, y;                   // Center point of the arc
  136.     int xstart, ystart;         // The starting position of the arc
  137.     int xend, yend;             // The ending position of the arc.
  138. };
  139.  
  140.  
  141. // This structure defines the fill style for the current window.  Pattern is
  142. // one of the system patterns such as SOLID_FILL.  Color is the color to
  143. // fill with
  144. struct fillsettingstype
  145. {
  146.     int pattern;                // Current fill pattern
  147.     int color;                  // Current fill color
  148. };
  149.  
  150.  
  151. // This structure records information about the current line style.
  152. // linestyle is one of the line styles such as SOLID_LINE, upattern is a
  153. // 16-bit pattern for user defined lines, and thickness is the width of the
  154. // line in pixels.
  155. struct linesettingstype
  156. {
  157.     int linestyle;              // Current line style
  158.     unsigned upattern;          // 16-bit user line pattern
  159.     int thickness;              // Width of the line in pixels
  160. };
  161.  
  162.  
  163. // This structure records information about the text settings.
  164. struct textsettingstype
  165. {
  166.     int font;                   // The font in use
  167.     int direction;              // Text direction
  168.     int charsize;               // Character size
  169.     int horiz;                  // Horizontal text justification
  170.     int vert;                   // Vertical text justification
  171. };
  172.  
  173.  
  174. // This structure records information about the viewport
  175. struct viewporttype
  176. {
  177.     int left, top,              // Viewport bounding box
  178.         right, bottom;
  179.     int clip;                   // Whether to clip image to viewport
  180. };
  181.  
  182.  
  183. // This structure records information about the palette.
  184. struct palettetype
  185. {
  186.     unsigned char size;
  187.     signed char colors[MAXCOLORS + 1];
  188. };
  189. // ---------------------------------------------------------------------------
  190.  
  191.  
  192.  
  193. // ---------------------------------------------------------------------------
  194. //                          API Entries
  195. // ---------------------------------------------------------------------------
  196. #ifdef __cplusplus
  197. extern "C" {
  198. #endif
  199.  
  200. // Drawing Functions
  201. void arc( int x, int y, int stangle, int endangle, int radius );
  202. void bar( int left, int top, int right, int bottom );
  203. void bar3d( int left, int top, int right, int bottom, int depth, int topflag );
  204. void circle( int x, int y, int radius );
  205. void cleardevice( );
  206. void clearviewport( );
  207. void drawpoly(int n_points, int* points);
  208. void ellipse( int x, int y, int stangle, int endangle, int xradius, int yradius );
  209. void fillellipse( int x, int y, int xradius, int yradius );
  210. void fillpoly(int n_points, int* points);
  211. void floodfill( int x, int y, int border );
  212. void line( int x1, int y1, int x2, int y2 );
  213. void linerel( int dx, int dy );
  214. void lineto( int x, int y );
  215. void pieslice( int x, int y, int stangle, int endangle, int radius );
  216. void putpixel( int x, int y, int color );
  217. void rectangle( int left, int top, int right, int bottom );
  218. void sector( int x, int y, int stangle, int endangle, int xradius, int yradius );
  219.  
  220. // Miscellaneous Functions
  221. int getdisplaycolor( int color );
  222. int converttorgb( int color );
  223. void delay( int msec );
  224. void getarccoords( arccoordstype *arccoords );
  225. int getbkcolor( );
  226. int getcolor( );
  227. void getfillpattern( char *pattern );
  228. void getfillsettings( fillsettingstype *fillinfo );
  229. void getlinesettings( linesettingstype *lineinfo );
  230. int getmaxcolor( );
  231. int getmaxheight( );
  232. int getmaxwidth( );
  233. int getmaxx( );
  234. int getmaxy( );
  235. bool getrefreshingbgi( );
  236. int getwindowheight( );
  237. int getwindowwidth( );
  238. int getpixel( int x, int y );
  239. void getviewsettings( viewporttype *viewport );
  240. int getx( );
  241. int gety( );
  242. void moverel( int dx, int dy );
  243. void moveto( int x, int y );
  244. void refreshbgi(int left, int top, int right, int bottom);
  245. void refreshallbgi( );    
  246. void setbkcolor( int color );
  247. void setcolor( int color );
  248. void setfillpattern( char *upattern, int color );
  249. void setfillstyle( int pattern, int color );
  250. void setlinestyle( int linestyle, unsigned upattern, int thickness );
  251. void setrefreshingbgi(bool value);
  252. void setviewport( int left, int top, int right, int bottom, int clip );
  253. void setwritemode( int mode );
  254.  
  255. // Window Creation / Graphics Manipulation
  256. void closegraph( int wid=ALL_WINDOWS );
  257. void detectgraph( int *graphdriver, int *graphmode );
  258. void getaspectratio( int *xasp, int *yasp );
  259. const char *getdrivername( );
  260. int getgraphmode( );
  261. int getmaxmode( );
  262. char *getmodename( int mode_number );
  263. void getmoderange( int graphdriver, int *lomode, int *himode );
  264. void graphdefaults( );
  265. const char *grapherrormsg( int errorcode );
  266. int graphresult( );
  267. void initgraph( int *graphdriver, int *graphmode, char *pathtodriver );
  268. int initwindow
  269.     ( int width, int height, const char* title="Windows BGI", int left=0, int top=0, bool dbflag=false, bool closeflag=true );
  270. int installuserdriver( char *name, int *fp );    // Not available in WinBGI
  271. int installuserfont( char *name );               // Not available in WinBGI
  272. int registerbgidriver( void *driver );           // Not available in WinBGI
  273. int registerbgifont( void *font );               // Not available in WinBGI
  274. void restorecrtmode( );
  275. void setaspectratio( int xasp, int yasp );
  276. unsigned setgraphbufsize( unsigned bufsize );    // Not available in WinBGI
  277. void setgraphmode( int mode );
  278. void showerrorbox( const char *msg = NULL );
  279.  
  280. // User Interaction
  281. int getch( );
  282. int kbhit( );
  283.  
  284. // User-Controlled Window Functions (winbgi.cpp)
  285. int getcurrentwindow( );
  286. void setcurrentwindow( int window );
  287.    
  288. // Double buffering support (winbgi.cpp)
  289. int getactivepage( );
  290. int getvisualpage( );
  291. void setactivepage( int page );
  292. void setvisualpage( int page );
  293. void swapbuffers( );
  294.  
  295. // Image Functions (drawing.cpp)
  296. unsigned imagesize( int left, int top, int right, int bottom );
  297. void getimage( int left, int top, int right, int bottom, void *bitmap );
  298. void putimage( int left, int top, void *bitmap, int op );
  299. void printimage(
  300.     const char* title=NULL,    
  301.     double width_inches=7, double border_left_inches=0.75, double border_top_inches=0.75,
  302.     int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
  303.     bool active=true, HWND hwnd=NULL
  304.     );
  305. void readimagefile(
  306.     const char* filename=NULL,
  307.     int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX
  308.     );
  309. void writeimagefile(
  310.     const char* filename=NULL,
  311.     int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
  312.     bool active=true, HWND hwnd=NULL
  313.     );
  314.  
  315. // Text Functions (text.cpp)
  316. void gettextsettings(struct textsettingstype *texttypeinfo);
  317. void outtext(char *textstring);
  318. void outtextxy(int x, int y, char *textstring);
  319. void settextjustify(int horiz, int vert);
  320. void settextstyle(int font, int direction, int charsize);
  321. void setusercharsize(int multx, int divx, int multy, int divy);
  322. int textheight(char *textstring);
  323. int textwidth(char *textstring);
  324. extern std::ostringstream bgiout;    
  325. void outstream(std::ostringstream& out=bgiout);
  326. void outstreamxy(int x, int y, std::ostringstream& out=bgiout);    
  327.    
  328. // Mouse Functions (mouse.cpp)
  329. void clearmouseclick( int kind );
  330. void clearresizeevent( );
  331. void getmouseclick( int kind, int& x, int& y );
  332. bool ismouseclick( int kind );
  333. bool isresizeevent( );
  334. int mousex( );
  335. int mousey( );
  336. void registermousehandler( int kind, void h( int, int ) );
  337. void setmousequeuestatus( int kind, bool status=true );
  338.  
  339. // Palette Functions
  340. palettetype *getdefaultpalette( );
  341. void getpalette( palettetype *palette );
  342. int getpalettesize( );
  343. void setallpalette( palettetype *palette );
  344. void setpalette( int colornum, int color );
  345. void setrgbpalette( int colornum, int red, int green, int blue );
  346.  
  347. // Color Macros
  348. #define IS_BGI_COLOR(v)     ( ((v) >= 0) && ((v) < 16) )
  349. #define IS_RGB_COLOR(v)     ( (v) & 0x03000000 )
  350. #define RED_VALUE(v)        int(GetRValue( converttorgb(v) ))
  351. #define GREEN_VALUE(v)      int(GetGValue( converttorgb(v) ))
  352. #define BLUE_VALUE(v)       int(GetBValue( converttorgb(v) ))
  353. #undef COLOR
  354. int COLOR(int r, int g, int b); // No longer a macro
  355.  
  356. #ifdef __cplusplus
  357. }
  358. #endif
  359. // ---------------------------------------------------------------------------
  360.  
  361. #endif // WINBGI_H



PM Quote
Avatar
SamIAm (Normal User)
Newbie


Messaggi: 16
Iscritto: 09/09/2012

Segnala al moderatore
Postato alle 19:19
Sabato, 27/12/2014
infine il codice del file "graphics.h"

Codice sorgente - presumibilmente Delphi

  1. // The winbgim library, Version 6.0, August 9, 2004
  2. // Written by:
  3. //      Grant Macklem (Grant.Macklem@colorado.edu)
  4. //      Gregory Schmelter (Gregory.Schmelter@colorado.edu)
  5. //      Alan Schmidt (Alan.Schmidt@colorado.edu)
  6. //      Ivan Stashak (Ivan.Stashak@colorado.edu)
  7. //      Michael Main (Michael.Main@colorado.edu)
  8. // CSCI 4830/7818: API Programming
  9. // University of Colorado at Boulder, Spring 2003
  10.  
  11.  
  12. // ---------------------------------------------------------------------------
  13. //                          Notes
  14. // ---------------------------------------------------------------------------
  15. // * This library is still under development.
  16. // * Please see http://www.cs.colorado.edu/~main/bgi for information on
  17. // * using this library with the mingw32 g++ compiler.
  18. // * This library only works with Windows API level 4.0 and higher (Windows 95, NT 4.0 and newer)
  19. // * This library may not be compatible with 64-bit versions of Windows
  20. // ---------------------------------------------------------------------------
  21.  
  22.  
  23. // ---------------------------------------------------------------------------
  24. //                          Macro Guard and Include Directives
  25. // ---------------------------------------------------------------------------
  26. #ifndef WINBGI_H
  27. #define WINBGI_H
  28. #include <windows.h>        // Provides the mouse message types
  29. #include <limits.h>         // Provides INT_MAX
  30. #include <sstream>          // Provides std::ostringstream
  31. // ---------------------------------------------------------------------------
  32.  
  33.  
  34.  
  35. // ---------------------------------------------------------------------------
  36. //                          Definitions
  37. // ---------------------------------------------------------------------------
  38. // Definitions for the key pad extended keys are added here.  When one
  39. // of these keys are pressed, getch will return a zero followed by one
  40. // of these values. This is the same way that it works in conio for
  41. // dos applications.
  42. #define KEY_HOME        71
  43. #define KEY_UP          72
  44. #define KEY_PGUP        73
  45. #define KEY_LEFT        75
  46. #define KEY_CENTER      76
  47. #define KEY_RIGHT       77
  48. #define KEY_END         79
  49. #define KEY_DOWN        80
  50. #define KEY_PGDN        81
  51. #define KEY_INSERT      82
  52. #define KEY_DELETE      83
  53. #define KEY_F1          59
  54. #define KEY_F2          60
  55. #define KEY_F3          61
  56. #define KEY_F4          62
  57. #define KEY_F5          63
  58. #define KEY_F6          64
  59. #define KEY_F7          65
  60. #define KEY_F8          66
  61. #define KEY_F9          67
  62.  
  63. // Line thickness settings
  64. #define NORM_WIDTH      1
  65. #define THICK_WIDTH     3
  66.  
  67. // Character Size and Direction
  68. #define USER_CHAR_SIZE  0
  69. #define HORIZ_DIR       0
  70. #define VERT_DIR        1
  71.  
  72.  
  73. // Constants for closegraph
  74. #define CURRENT_WINDOW -1
  75. #define ALL_WINDOWS -2
  76. #define NO_CURRENT_WINDOW -3
  77.  
  78. // The standard Borland 16 colors
  79. #define MAXCOLORS       15
  80. enum colors { BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY,
  81.               LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE };
  82.  
  83. // The standard line styles
  84. enum line_styles { SOLID_LINE, DOTTED_LINE, CENTER_LINE, DASHED_LINE, USERBIT_LINE };
  85.  
  86. // The standard fill styles
  87. enum fill_styles { EMPTY_FILL, SOLID_FILL, LINE_FILL, LTSLASH_FILL, SLASH_FILL,
  88.                    BKSLASH_FILL, LTBKSLASH_FILL, HATCH_FILL, XHATCH_FILL, INTERLEAVE_FILL,
  89.                    WIDE_DOT_FILL, CLOSE_DOT_FILL, USER_FILL };
  90.  
  91. // The various graphics drivers
  92. enum graphics_drivers { DETECT, CGA, MCGA, EGA, EGA64, EGAMONO, IBM8514, HERCMONO,
  93.                         ATT400, VGA, PC3270 };
  94.  
  95. // Various modes for each graphics driver
  96. enum graphics_modes { CGAC0, CGAC1, CGAC2, CGAC3, CGAHI,
  97.                       MCGAC0 = 0, MCGAC1, MCGAC2, MCGAC3, MCGAMED, MCGAHI,
  98.                       EGALO = 0, EGAHI,
  99.                       EGA64LO = 0, EGA64HI,
  100.                       EGAMONOHI = 3,
  101.                       HERCMONOHI = 0,
  102.                       ATT400C0 = 0, ATT400C1, ATT400C2, ATT400C3, ATT400MED, ATT400HI,
  103.                       VGALO = 0, VGAMED, VGAHI,
  104.                       PC3270HI = 0,
  105.                       IBM8514LO = 0, IBM8514HI };
  106.  
  107. // Borland error messages for the graphics window.
  108. #define NO_CLICK        -1      // No mouse event of the current type in getmouseclick
  109. enum graph_errors { grInvalidVersion = -18, grInvalidDeviceNum = -15, grInvalidFontNum,
  110.                     grInvalidFont, grIOerror, grError, grInvalidMode, grNoFontMem,
  111.                     grFontNotFound, grNoFloodMem, grNoScanMem, grNoLoadMem,
  112.                     grInvalidDriver, grFileNotFound, grNotDetected, grNoInitGraph,
  113.                     grOk };
  114.  
  115. // Write modes
  116. enum putimage_ops{ COPY_PUT, XOR_PUT, OR_PUT, AND_PUT, NOT_PUT };
  117.  
  118. // Text Modes
  119. enum horiz { LEFT_TEXT, CENTER_TEXT, RIGHT_TEXT };
  120. enum vertical { BOTTOM_TEXT, VCENTER_TEXT, TOP_TEXT }; // middle not needed other than as seperator
  121. enum font_names { DEFAULT_FONT, TRIPLEX_FONT, SMALL_FONT, SANS_SERIF_FONT,
  122.              GOTHIC_FONT, SCRIPT_FONT, SIMPLEX_FONT, TRIPLEX_SCR_FONT,
  123.                          COMPLEX_FONT, EUROPEAN_FONT, BOLD_FONT };
  124. // ---------------------------------------------------------------------------
  125.  
  126.  
  127.  
  128. // ---------------------------------------------------------------------------
  129. //                              Structures
  130. // ---------------------------------------------------------------------------
  131. // This structure records information about the last call to arc.  It is used
  132. // by getarccoords to get the location of the endpoints of the arc.
  133. struct arccoordstype
  134. {
  135.     int x, y;                   // Center point of the arc
  136.     int xstart, ystart;         // The starting position of the arc
  137.     int xend, yend;             // The ending position of the arc.
  138. };
  139.  
  140.  
  141. // This structure defines the fill style for the current window.  Pattern is
  142. // one of the system patterns such as SOLID_FILL.  Color is the color to
  143. // fill with
  144. struct fillsettingstype
  145. {
  146.     int pattern;                // Current fill pattern
  147.     int color;                  // Current fill color
  148. };
  149.  
  150.  
  151. // This structure records information about the current line style.
  152. // linestyle is one of the line styles such as SOLID_LINE, upattern is a
  153. // 16-bit pattern for user defined lines, and thickness is the width of the
  154. // line in pixels.
  155. struct linesettingstype
  156. {
  157.     int linestyle;              // Current line style
  158.     unsigned upattern;          // 16-bit user line pattern
  159.     int thickness;              // Width of the line in pixels
  160. };
  161.  
  162.  
  163. // This structure records information about the text settings.
  164. struct textsettingstype
  165. {
  166.     int font;                   // The font in use
  167.     int direction;              // Text direction
  168.     int charsize;               // Character size
  169.     int horiz;                  // Horizontal text justification
  170.     int vert;                   // Vertical text justification
  171. };
  172.  
  173.  
  174. // This structure records information about the viewport
  175. struct viewporttype
  176. {
  177.     int left, top,              // Viewport bounding box
  178.         right, bottom;
  179.     int clip;                   // Whether to clip image to viewport
  180. };
  181.  
  182.  
  183. // This structure records information about the palette.
  184. struct palettetype
  185. {
  186.     unsigned char size;
  187.     signed char colors[MAXCOLORS + 1];
  188. };
  189. // ---------------------------------------------------------------------------
  190.  
  191.  
  192.  
  193. // ---------------------------------------------------------------------------
  194. //                          API Entries
  195. // ---------------------------------------------------------------------------
  196. #ifdef __cplusplus
  197. extern "C" {
  198. #endif
  199.  
  200. // Drawing Functions
  201. void arc( int x, int y, int stangle, int endangle, int radius );
  202. void bar( int left, int top, int right, int bottom );
  203. void bar3d( int left, int top, int right, int bottom, int depth, int topflag );
  204. void circle( int x, int y, int radius );
  205. void cleardevice( );
  206. void clearviewport( );
  207. void drawpoly(int n_points, int* points);
  208. void ellipse( int x, int y, int stangle, int endangle, int xradius, int yradius );
  209. void fillellipse( int x, int y, int xradius, int yradius );
  210. void fillpoly(int n_points, int* points);
  211. void floodfill( int x, int y, int border );
  212. void line( int x1, int y1, int x2, int y2 );
  213. void linerel( int dx, int dy );
  214. void lineto( int x, int y );
  215. void pieslice( int x, int y, int stangle, int endangle, int radius );
  216. void putpixel( int x, int y, int color );
  217. void rectangle( int left, int top, int right, int bottom );
  218. void sector( int x, int y, int stangle, int endangle, int xradius, int yradius );
  219.  
  220. // Miscellaneous Functions
  221. int getdisplaycolor( int color );
  222. int converttorgb( int color );
  223. void delay( int msec );
  224. void getarccoords( arccoordstype *arccoords );
  225. int getbkcolor( );
  226. int getcolor( );
  227. void getfillpattern( char *pattern );
  228. void getfillsettings( fillsettingstype *fillinfo );
  229. void getlinesettings( linesettingstype *lineinfo );
  230. int getmaxcolor( );
  231. int getmaxheight( );
  232. int getmaxwidth( );
  233. int getmaxx( );
  234. int getmaxy( );
  235. bool getrefreshingbgi( );
  236. int getwindowheight( );
  237. int getwindowwidth( );
  238. int getpixel( int x, int y );
  239. void getviewsettings( viewporttype *viewport );
  240. int getx( );
  241. int gety( );
  242. void moverel( int dx, int dy );
  243. void moveto( int x, int y );
  244. void refreshbgi(int left, int top, int right, int bottom);
  245. void refreshallbgi( );    
  246. void setbkcolor( int color );
  247. void setcolor( int color );
  248. void setfillpattern( char *upattern, int color );
  249. void setfillstyle( int pattern, int color );
  250. void setlinestyle( int linestyle, unsigned upattern, int thickness );
  251. void setrefreshingbgi(bool value);
  252. void setviewport( int left, int top, int right, int bottom, int clip );
  253. void setwritemode( int mode );
  254.  
  255. // Window Creation / Graphics Manipulation
  256. void closegraph( int wid=ALL_WINDOWS );
  257. void detectgraph( int *graphdriver, int *graphmode );
  258. void getaspectratio( int *xasp, int *yasp );
  259. const char *getdrivername( );
  260. int getgraphmode( );
  261. int getmaxmode( );
  262. char *getmodename( int mode_number );
  263. void getmoderange( int graphdriver, int *lomode, int *himode );
  264. void graphdefaults( );
  265. const char *grapherrormsg( int errorcode );
  266. int graphresult( );
  267. void initgraph( int *graphdriver, int *graphmode, char *pathtodriver );
  268. int initwindow
  269.     ( int width, int height, const char* title="Windows BGI", int left=0, int top=0, bool dbflag=false, bool closeflag=true );
  270. int installuserdriver( char *name, int *fp );    // Not available in WinBGI
  271. int installuserfont( char *name );               // Not available in WinBGI
  272. int registerbgidriver( void *driver );           // Not available in WinBGI
  273. int registerbgifont( void *font );               // Not available in WinBGI
  274. void restorecrtmode( );
  275. void setaspectratio( int xasp, int yasp );
  276. unsigned setgraphbufsize( unsigned bufsize );    // Not available in WinBGI
  277. void setgraphmode( int mode );
  278. void showerrorbox( const char *msg = NULL );
  279.  
  280. // User Interaction
  281. int getch( );
  282. int kbhit( );
  283.  
  284. // User-Controlled Window Functions (winbgi.cpp)
  285. int getcurrentwindow( );
  286. void setcurrentwindow( int window );
  287.    
  288. // Double buffering support (winbgi.cpp)
  289. int getactivepage( );
  290. int getvisualpage( );
  291. void setactivepage( int page );
  292. void setvisualpage( int page );
  293. void swapbuffers( );
  294.  
  295. // Image Functions (drawing.cpp)
  296. unsigned imagesize( int left, int top, int right, int bottom );
  297. void getimage( int left, int top, int right, int bottom, void *bitmap );
  298. void putimage( int left, int top, void *bitmap, int op );
  299. void printimage(
  300.     const char* title=NULL,    
  301.     double width_inches=7, double border_left_inches=0.75, double border_top_inches=0.75,
  302.     int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
  303.     bool active=true, HWND hwnd=NULL
  304.     );
  305. void readimagefile(
  306.     const char* filename=NULL,
  307.     int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX
  308.     );
  309. void writeimagefile(
  310.     const char* filename=NULL,
  311.     int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX,
  312.     bool active=true, HWND hwnd=NULL
  313.     );
  314.  
  315. // Text Functions (text.cpp)
  316. void gettextsettings(struct textsettingstype *texttypeinfo);
  317. void outtext(char *textstring);
  318. void outtextxy(int x, int y, char *textstring);
  319. void settextjustify(int horiz, int vert);
  320. void settextstyle(int font, int direction, int charsize);
  321. void setusercharsize(int multx, int divx, int multy, int divy);
  322. int textheight(char *textstring);
  323. int textwidth(char *textstring);
  324. extern std::ostringstream bgiout;    
  325. void outstream(std::ostringstream& out=bgiout);
  326. void outstreamxy(int x, int y, std::ostringstream& out=bgiout);    
  327.    
  328. // Mouse Functions (mouse.cpp)
  329. void clearmouseclick( int kind );
  330. void clearresizeevent( );
  331. void getmouseclick( int kind, int& x, int& y );
  332. bool ismouseclick( int kind );
  333. bool isresizeevent( );
  334. int mousex( );
  335. int mousey( );
  336. void registermousehandler( int kind, void h( int, int ) );
  337. void setmousequeuestatus( int kind, bool status=true );
  338.  
  339. // Palette Functions
  340. palettetype *getdefaultpalette( );
  341. void getpalette( palettetype *palette );
  342. int getpalettesize( );
  343. void setallpalette( palettetype *palette );
  344. void setpalette( int colornum, int color );
  345. void setrgbpalette( int colornum, int red, int green, int blue );
  346.  
  347. // Color Macros
  348. #define IS_BGI_COLOR(v)     ( ((v) >= 0) && ((v) < 16) )
  349. #define IS_RGB_COLOR(v)     ( (v) & 0x03000000 )
  350. #define RED_VALUE(v)        int(GetRValue( converttorgb(v) ))
  351. #define GREEN_VALUE(v)      int(GetGValue( converttorgb(v) ))
  352. #define BLUE_VALUE(v)       int(GetBValue( converttorgb(v) ))
  353. #undef COLOR
  354. int COLOR(int r, int g, int b); // No longer a macro
  355.  
  356. #ifdef __cplusplus
  357. }
  358. #endif
  359. // ---------------------------------------------------------------------------
  360.  
  361. #endif // WINBGI_H



che sembrerebbe proprio identico a "winbgim.h" :asd:

riprova :)

PM Quote
Avatar
tullio1995 (Normal User)
Rookie


Messaggi: 59
Iscritto: 20/03/2011

Segnala al moderatore
Postato alle 19:20
Sabato, 27/12/2014
Ora esce questo
Codice sorgente - presumibilmente C/C++

  1. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>SET "PATH=C:\MinGW\bin;C:\Windows
  2. \system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerSh
  3. ell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\MinGW\bin"
  4.  
  5. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>mingw32-make.exe -f makefile
  6. g++ -c -O3 -fno-rtti -fno-exceptions text.cxx
  7. rm graphics.h
  8. process_begin: CreateProcess(NULL, rm graphics.h, ...) failed.
  9. make (e=2): Impossibile trovare il file specificato.
  10. makefile:37: recipe for target 'graphics.h' failed
  11. mingw32-make.exe: *** [graphics.h] Error 2
  12.  
  13. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>PAUSE
  14. Premere un tasto per continuare . . .


PM Quote
Avatar
SamIAm (Normal User)
Newbie


Messaggi: 16
Iscritto: 09/09/2012

Segnala al moderatore
Postato alle 19:21
Sabato, 27/12/2014
Prima di ricompilare, ti conviene cancellare i file .o che hai generato prima, onde evitare errori di linkaggio :)

PM Quote
Avatar
tullio1995 (Normal User)
Rookie


Messaggi: 59
Iscritto: 20/03/2011

Segnala al moderatore
Postato alle 19:23
Sabato, 27/12/2014
Fatto.... :d
Codice sorgente - presumibilmente VB.NET

  1. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>SET "PATH=C:\MinGW\bin;C:\Windows
  2. \system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerSh
  3. ell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\MinGW\bin"
  4.  
  5. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>mingw32-make.exe -f makefile
  6. g++ -c -O3 -fno-rtti -fno-exceptions drawing.cxx
  7. g++ -c -O3 -fno-rtti -fno-exceptions misc.cxx
  8. g++ -c -O3 -fno-rtti -fno-exceptions mouse.cxx
  9. g++ -c -O3 -fno-rtti -fno-exceptions palette.cxx
  10. g++ -c -O3 -fno-rtti -fno-exceptions text.cxx
  11. g++ -c -O3 -fno-rtti -fno-exceptions winbgi.cxx
  12. winbgi.cxx: In function 'char* getdrivername()':
  13. winbgi.cxx:464:12: warning: deprecated conversion from string constant to 'char*
  14. ' [-Wwrite-strings]
  15.      return "EGAVGA";
  16.             ^
  17. winbgi.cxx: In function 'char* grapherrormsg(int)':
  18. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  19. ' [-Wwrite-strings]
  20.          "Invalid font number", "Invalid device number" };
  21.                                                         ^
  22. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  23. ' [-Wwrite-strings]
  24. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  25. ' [-Wwrite-strings]
  26. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  27. ' [-Wwrite-strings]
  28. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  29. ' [-Wwrite-strings]
  30. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  31. ' [-Wwrite-strings]
  32. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  33. ' [-Wwrite-strings]
  34. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  35. ' [-Wwrite-strings]
  36. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  37. ' [-Wwrite-strings]
  38. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  39. ' [-Wwrite-strings]
  40. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  41. ' [-Wwrite-strings]
  42. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  43. ' [-Wwrite-strings]
  44. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  45. ' [-Wwrite-strings]
  46. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  47. ' [-Wwrite-strings]
  48. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  49. ' [-Wwrite-strings]
  50. winbgi.cxx:570:56: warning: deprecated conversion from string constant to 'char*
  51. ' [-Wwrite-strings]
  52. g++ -c -O3 -fno-rtti -fno-exceptions winthread.cxx
  53. g++ -c -O3 -fno-rtti -fno-exceptions -c file.cxx
  54. g++ -c -O3 -fno-rtti -fno-exceptions dibutil.cxx
  55. rm graphics.h
  56. process_begin: CreateProcess(NULL, rm graphics.h, ...) failed.
  57. make (e=2): Impossibile trovare il file specificato.
  58. makefile:37: recipe for target 'graphics.h' failed
  59. mingw32-make.exe: *** [graphics.h] Error 2
  60.  
  61. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>PAUSE
  62. Premere un tasto per continuare . . .


PM Quote
Avatar
SamIAm (Normal User)
Newbie


Messaggi: 16
Iscritto: 09/09/2012

Segnala al moderatore
Postato alle 19:39
Sabato, 27/12/2014
è perché ne abbiamo dimenticato uno "winbgi.cxx" :)

Codice sorgente - presumibilmente C++

  1. // File: winbgi.cpp
  2. // Written by:
  3. //      Grant Macklem (Grant.Macklem@colorado.edu)
  4. //      Gregory Schmelter (Gregory.Schmelter@colorado.edu)
  5. //      Alan Schmidt (Alan.Schmidt@colorado.edu)
  6. //      Ivan Stashak (Ivan.Stashak@colorado.edu)
  7. // CSCI 4830/7818: API Programming
  8. // University of Colorado at Boulder, Spring 2003
  9. // http://www.cs.colorado.edu/~main/bgi
  10. //
  11.  
  12. #include <windows.h>            // Provides the Win32 API
  13. #include <windowsx.h>           // Provides message cracker macros (p. 96)
  14. #include <stdio.h>              // Provides sprintf
  15. #include <iostream>             // This is for debug only
  16. #include <vector>               // MGM: Added for BGI__WindowTable
  17. #include "winbgim.h"             // External API routines
  18. #include "winbgitypes.h"        // Internal structures and routines
  19.  
  20. // The window message-handling function (in WindowThread.cpp)
  21. LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM );
  22.  
  23.  
  24. // This function is called whenever a process attaches itself to the DLL.
  25. // Thus, it registers itself in the process' address space.
  26. //
  27. BOOL registerWindowClass( )
  28. {
  29.     WNDCLASSEX wcex;                        // The main window class that we create
  30.  
  31.     // Set up the properties of the Windows BGI window class and register it
  32.     wcex.cbSize = sizeof( WNDCLASSEX );     // Size of the strucutre
  33.     wcex.style  = CS_SAVEBITS | CS_DBLCLKS; // Use default class styles
  34.     wcex.lpfnWndProc = WndProc;             // The message handling function
  35.     wcex.cbClsExtra = 0;                    // No extra memory allocation
  36.     wcex.cbWndExtra = 0;
  37.     wcex.hInstance = BGI__hInstance;        // HANDLE for this program
  38.     wcex.hIcon = 0;                         // Use default icon
  39.     wcex.hIconSm = 0;                       // Default small icon
  40.     wcex.hCursor = LoadCursor( NULL, IDC_ARROW );       // Set mouse cursor
  41.     wcex.hbrBackground = GetStockBrush( BLACK_BRUSH );  // Background color
  42.     wcex.lpszMenuName = 0;                  // Menu identification
  43.     wcex.lpszClassName = _T( "BGILibrary" );// a c-string name for the window
  44.  
  45.     if ( RegisterClassEx( &wcex ) == 0 )
  46.     {
  47.         showerrorbox( );
  48.         return FALSE;
  49.     }
  50.     return TRUE;
  51. }
  52.  
  53.  
  54. // This function unregisters the window class so that it can be registered
  55. // again if using LoadLibrary and FreeLibrary
  56. void unregisterWindowClass( )
  57. {
  58.     UnregisterClass( "BGILibrary", BGI__hInstance );
  59. }
  60.  
  61.  
  62. // This is the entry point for the DLL
  63. // MGM: I changed it to a regular function rather than a DLL entry
  64. // point (since I deleted the DLL).  As such, it is now called
  65. // by initwindow.
  66. bool DllMain_MGM(
  67.                           HINSTANCE hinstDll,   // Handle to DLL module
  68.                           DWORD Reason,         // Reason for calling function
  69.                           LPVOID Reserved       // reserved
  70.                           )
  71. {
  72.     // MGM: Add a static variable so that this work is done but once.
  73.     static bool called = false;
  74.     if (called) return true;
  75.     called = true;
  76.  
  77.     switch ( Reason )
  78.     {
  79.     case DLL_PROCESS_ATTACH:
  80.         BGI__hInstance = hinstDll;                   // Set the global hInstance variable
  81.         return registerWindowClass( );          // Register the window class for this process
  82.         break;
  83.     case DLL_PROCESS_DETACH:
  84.         unregisterWindowClass( );
  85.         break;
  86.     }
  87.     return TRUE;        // Ignore other initialization cases
  88. }
  89.  
  90.  
  91.  
  92. void showerrorbox( const char* msg )
  93. {
  94.     LPVOID lpMsgBuf;
  95.  
  96.     if ( msg == NULL )
  97.     {
  98.         // This code is taken from the MSDN help for FormatMessage
  99.         FormatMessage(
  100.             FORMAT_MESSAGE_ALLOCATE_BUFFER |
  101.             FORMAT_MESSAGE_FROM_SYSTEM |
  102.             FORMAT_MESSAGE_IGNORE_INSERTS,          // Formatting options
  103.             NULL,                                   // Location of message definiton
  104.             GetLastError( ),                        // Message ID
  105.             MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), // Default language
  106.             (LPTSTR) &lpMsgBuf,                     // Pointer to buffer
  107.             0,                                      // Minimum size of buffer
  108.             NULL );
  109.  
  110.         MessageBox( NULL, (LPCTSTR)lpMsgBuf, "Error", MB_OK | MB_ICONERROR );
  111.  
  112.         // Free the buffer
  113.         LocalFree( lpMsgBuf );
  114.     }
  115.     else
  116.         MessageBox( NULL, msg, "Error", MB_OK | MB_ICONERROR );
  117. }
  118.  
  119.  
  120. /*****************************************************************************
  121. *
  122. *   The actual API calls are implemented below
  123. *   MGM: Rearranged order of functions by trial-and-error until internal
  124. *   error in g++ 3.2.3 disappeared.
  125. *****************************************************************************/
  126.  
  127.  
  128. void graphdefaults( )
  129. {
  130.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  131.     HPEN hPen;      // The default drawing pen
  132.     HBRUSH hBrush;  // The default filling brush
  133.     int bgi_color;                      // A bgi color number
  134.     COLORREF actual_color;              // The color that's actually put on the screen
  135.     HDC hDC;
  136.  
  137.     // TODO: Do this for each DC
  138.  
  139.     // Set viewport to the entire screen and move current position to (0,0)
  140.     setviewport( 0, 0, pWndData->width, pWndData->height, 0 );
  141.     pWndData->mouse.x = 0;
  142.     pWndData->mouse.y = 0;
  143.  
  144.     // Turn on autorefreshing
  145.     pWndData->refreshing = true;
  146.    
  147.     // MGM: Grant suggested the following colors, but I have changed
  148.     // them so that they will be consistent on any 16-color VGA
  149.     // display.  It's also important to use 255-255-255 for white
  150.     // to match some stock tools such as the stock WHITE brush
  151.     /*
  152.     BGI__Colors[0] = RGB( 0, 0, 0 );         // Black
  153.     BGI__Colors[1] = RGB( 0, 0, 168);        // Blue
  154.     BGI__Colors[2] = RGB( 0, 168, 0 );       // Green
  155.     BGI__Colors[3] = RGB( 0, 168, 168 );     // Cyan
  156.     BGI__Colors[4] = RGB( 168, 0, 0 );       // Red
  157.     BGI__Colors[5] = RGB( 168, 0, 168 );     // Magenta
  158.     BGI__Colors[6] = RGB( 168, 84, 0 );      // Brown
  159.     BGI__Colors[7] = RGB( 168, 168, 168 );   // Light Gray
  160.     BGI__Colors[8] = RGB( 84, 84, 84 );      // Dark Gray
  161.     BGI__Colors[9] = RGB( 84, 84, 252 );     // Light Blue
  162.     BGI__Colors[10] = RGB( 84, 252, 84 );    // Light Green
  163.     BGI__Colors[11] = RGB( 84, 252, 252 );   // Light Cyan
  164.     BGI__Colors[12] = RGB( 252, 84, 84 );    // Light Red
  165.     BGI__Colors[13] = RGB( 252, 84, 252 );   // Light Magenta
  166.     BGI__Colors[14] = RGB( 252, 252, 84 );   // Yellow
  167.     BGI__Colors[15] = RGB( 252, 252, 252 );  // White
  168.     for (bgi_color = 0; bgi_color <= WHITE; bgi_color++)
  169.     {
  170.         putpixel(0, 0, bgi_color);
  171.         actual_color = GetPixel(hDC, 0, 0);
  172.         BGI__Colors[bgi_color] = actual_color;
  173.     }
  174.     */
  175.  
  176.     BGI__Colors[0] = RGB( 0, 0, 0 );         // Black
  177.     BGI__Colors[1] = RGB( 0, 0, 128);        // Blue
  178.     BGI__Colors[2] = RGB( 0, 128, 0 );       // Green
  179.     BGI__Colors[3] = RGB( 0, 128, 128 );     // Cyan
  180.     BGI__Colors[4] = RGB( 128, 0, 0 );       // Red
  181.     BGI__Colors[5] = RGB( 128, 0, 128 );     // Magenta
  182.     BGI__Colors[6] = RGB( 128, 128, 0 );     // Brown
  183.     BGI__Colors[7] = RGB( 192, 192, 192 );   // Light Gray
  184.     BGI__Colors[8] = RGB( 128, 128, 128 );   // Dark Gray
  185.     BGI__Colors[9] = RGB( 128, 128, 255 );   // Light Blue
  186.     BGI__Colors[10] = RGB( 128, 255, 128 );  // Light Green
  187.     BGI__Colors[11] = RGB( 128, 255, 255 );  // Light Cyan
  188.     BGI__Colors[12] = RGB( 255, 128, 128 );  // Light Red
  189.     BGI__Colors[13] = RGB( 255, 128, 255 );  // Light Magenta
  190.     BGI__Colors[14] = RGB( 255, 255, 0 );  // Yellow
  191.     BGI__Colors[15] = RGB( 255, 255, 255 );  // White
  192.  
  193.     // Set background color to default (black)
  194.     setbkcolor( BLACK );
  195.  
  196.     // Set drawing color to default (white)
  197.     pWndData->drawColor = WHITE;
  198.     // Set fill style and pattern to default (white solid)
  199.     pWndData->fillInfo.pattern = SOLID_FILL;
  200.     pWndData->fillInfo.color = WHITE;
  201.  
  202.     hDC = BGI__GetWinbgiDC( );
  203.     // Reset the pen and brushes for each DC
  204.     for ( int i = 0; i < MAX_PAGES; i++ )
  205.     {
  206.         // Using Stock stuff is more efficient.
  207.         // Create the default pen for drawing in the window.
  208.         hPen = GetStockPen( WHITE_PEN );
  209.         // Select this pen into the DC and delete the old pen.
  210.         DeletePen( SelectPen( pWndData->hDC[i], hPen ) );
  211.  
  212.         // Create the default brush for painting in the window.
  213.         hBrush = GetStockBrush( WHITE_BRUSH );
  214.         // Select this brush into the DC and delete the old brush.
  215.         DeleteBrush( SelectBrush( pWndData->hDC[i], hBrush ) );
  216.  
  217.         // Set the default text color for each page
  218.         SetTextColor(pWndData->hDC[i], converttorgb(WHITE));
  219.     }
  220.     ReleaseMutex(pWndData->hDCMutex);
  221.  
  222.     // Set text font and justification to default
  223.     pWndData->textInfo.horiz = LEFT_TEXT;
  224.     pWndData->textInfo.vert = TOP_TEXT;
  225.     pWndData->textInfo.font = DEFAULT_FONT;
  226.     pWndData->textInfo.direction = HORIZ_DIR;
  227.     pWndData->textInfo.charsize = 1;
  228.  
  229.     // set this something that it can never be to force set_align to be called
  230.     pWndData->alignment = 2;
  231.  
  232.     pWndData->t_scale[0] = 1; // multx
  233.     pWndData->t_scale[1] = 1; // divx
  234.     pWndData->t_scale[2] = 1; // multy
  235.     pWndData->t_scale[3] = 1; // divy
  236.  
  237.     // Set the error code to Ok: There is no error
  238.     pWndData->error_code = grOk;
  239.  
  240.     // Line style as well?
  241.     pWndData->lineInfo.linestyle = SOLID_LINE;
  242.     pWndData->lineInfo.thickness = NORM_WIDTH;
  243.  
  244.     // Set the default active and visual page
  245.     if ( pWndData->DoubleBuffer )
  246.     {
  247.         pWndData->ActivePage = 1;
  248.         pWndData->VisualPage = 0;
  249.     }
  250.     else
  251.     {
  252.         pWndData->ActivePage = 0;
  253.         pWndData->VisualPage = 0;
  254.     }
  255.  
  256.     // Set the aspect ratios.  Unless Windows is doing something funky,
  257.     // these should not need to be changed by the user to produce geometrically
  258.     // correct shapes (circles, squares, etc).
  259.     pWndData->x_aspect_ratio = 10000;
  260.     pWndData->y_aspect_ratio = 10000;
  261. }
  262.  
  263. using namespace std;
  264. // The initwindow function is typicaly the first function called by the
  265. // application.  It will create a separate thread for each window created.
  266. // This thread is responsible for creating the window and processing all the
  267. // messages.  It returns a positive integer value which the user can then
  268. // use whenever he needs to reference the window.
  269. // RETURN VALUE: If the window is successfully created, a nonnegative integer
  270. //                  uniquely identifing the window.
  271. //               On failure, -1.
  272. //
  273. int initwindow
  274. ( int width, int height, const char* title, int left, int top, bool dbflag , bool closeflag)
  275. {
  276.     HANDLE hThread;                     // Handle to the message pump thread
  277.     int index;                          // Index of current window in the table
  278.     HANDLE objects[2];                  // Handle to objects (thread and event) to ensure proper creation
  279.     int code;                           // Return code of thread wait function
  280.  
  281.     // MGM: Call the DllMain, which used to be the DLL entry point.
  282.     if (!DllMain_MGM(
  283.         NULL,
  284.         DLL_PROCESS_ATTACH,
  285.         NULL))
  286.         return -1;
  287.  
  288.     WindowData* pWndData = new WindowData;
  289.     // Check if new failed
  290.     if ( pWndData == NULL )
  291.         return -1;
  292.  
  293.     // Todo: check to make sure the events are created successfully
  294.     pWndData->key_waiting = CreateEvent( NULL, FALSE, FALSE, NULL );
  295.     pWndData->WindowCreated = CreateEvent( NULL, FALSE, FALSE, NULL );
  296.     pWndData->width = width;
  297.     pWndData->height = height;
  298.     pWndData->initleft = left;
  299.     pWndData->inittop = top;
  300.     pWndData->title = title; // Converts to a string object
  301.    
  302.     hThread = CreateThread( NULL,                   // Security Attributes (use default)
  303.                             0,                      // Stack size (use default)
  304.                             BGI__ThreadInitWindow,  // Start routine
  305.                             (LPVOID)pWndData,       // Thread specific parameter
  306.                             0,                      // Creation flags (run immediately)
  307.                             &pWndData->threadID );  // Thread ID
  308.  
  309.     // Check if the message pump thread was created
  310.     if ( hThread == NULL )
  311.     {
  312.         showerrorbox( );
  313.         delete pWndData;
  314.         return -1;
  315.     }
  316.  
  317.     // Create an array of events to wait for
  318.     objects[0] = hThread;
  319.     objects[1] = pWndData->WindowCreated;
  320.     // We'll either wait to be signaled that the window was created
  321.     // successfully or the thread will terminate and we'll have some problem.
  322.     code = WaitForMultipleObjects( 2,           // Number of objects to wait on
  323.                                    objects,     // Array of objects
  324.                                    FALSE,       // Whether all objects must be signaled
  325.                                    INFINITE );  // How long to wait before timing out
  326.  
  327.     switch( code )
  328.     {
  329.     case WAIT_OBJECT_0:
  330.         // Thread terminated without creating the window
  331.         delete pWndData;
  332.         return -1;
  333.         break;
  334.     case WAIT_OBJECT_0 + 1:
  335.         // Successfully running
  336.         break;
  337.     }
  338.  
  339.     // Set index to the next available position
  340.     index = BGI__WindowCount;
  341.     // Increment the count
  342.     ++BGI__WindowCount;
  343.     // Store the window in the next position of the vector
  344.     BGI__WindowTable.push_back(pWndData->hWnd);
  345.     // Set the current window to the newly created window
  346.     BGI__CurrentWindow = index;
  347.  
  348.     // Set double-buffering and close behavior
  349.     pWndData->DoubleBuffer = dbflag;
  350.     pWndData->CloseBehavior = closeflag;
  351.  
  352.     // Set the bitmap info struct to NULL
  353.     pWndData->pbmpInfo = NULL;
  354.  
  355.     // Set up the defaults for the window
  356.     graphdefaults( );
  357.  
  358.     // MGM: Draw diagonal line since otherwise BitBlt into window doesn't work.
  359.     setcolor(BLACK);
  360.     line( 0, 0, width-1, height-1 );
  361.     // MGM: The black rectangle is because on my laptop, the background
  362.     // is not automatically reset to black when the window opens.
  363.     setfillstyle(SOLID_FILL, BLACK);
  364.     bar( 0, 0, width-1, height-1 );
  365.     // MGM: Reset the color and fillstyle to the default for a new window.
  366.     setcolor(WHITE);
  367.     setfillstyle(SOLID_FILL, WHITE);
  368.  
  369.     // Everything went well!  Return the window index to the user.
  370.     return index;
  371. }
  372.  
  373.  
  374. void closegraph(int wid)
  375. {
  376.     if (wid == CURRENT_WINDOW)
  377.         closegraph(BGI__CurrentWindow);
  378.     else if (wid == ALL_WINDOWS)
  379.     {
  380.         for ( int i = 0; i < BGI__WindowCount; i++ )
  381.             closegraph(i);
  382.     }
  383.     else if (wid >= 0 && wid <= BGI__WindowCount && BGI__WindowTable[wid] != NULL)
  384.     {
  385.         // DestroyWindow cannot delete a window created by another thread.
  386.         // Thus, use SendMessage to close the requested window.
  387.         // Destroying the window causes cls_OnDestroy to be called,
  388.         // releasing any dynamic memory that's being used by the window.
  389.         // The WindowData structure is released at the end of BGI__ThreadInitWindow,
  390.         // which is reached when the message loop of BGI__ThreadInitWindow get WM_QUIT.
  391.         SendMessage( BGI__WindowTable[wid], WM_DESTROY, 0, 0 );
  392.  
  393.         // Remove the HWND from the BGI__WindowTable vector:
  394.         BGI__WindowTable[wid] = NULL;
  395.  
  396.         // Reset the global BGI__CurrentWindow if needed:
  397.         if (BGI__CurrentWindow == wid)
  398.             BGI__CurrentWindow = NO_CURRENT_WINDOW;
  399.     }
  400. }
  401.  
  402.  
  403. // This fuction detects the graphics driver and returns the highest resolution
  404. // mode possible.  For WinBGI, this is always VGA/VGAHI
  405. //
  406. void detectgraph( int *graphdriver, int *graphmode )
  407. {
  408.     *graphdriver = VGA;
  409.     *graphmode = VGAHI;
  410. }
  411.  
  412.  
  413. // This function returns the aspect ratio of the current window.  Unless there
  414. // is something weird going on with Windows resolutions, these quantities
  415. // will be equal and correctly proportioned geometric shapes will result.
  416. //
  417. void getaspectratio( int *xasp, int *yasp )
  418. {
  419.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  420.     *xasp = pWndData->x_aspect_ratio;
  421.     *yasp = pWndData->y_aspect_ratio;
  422. }
  423.  
  424.  
  425. // This function will return the next character waiting to be read in the
  426. // window's keyboard buffer
  427. //
  428. int getch( )
  429. {
  430.     char c;
  431.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  432.  
  433.     // TODO: Start critical section
  434.     // check queue empty
  435.     // end critical section
  436.  
  437.     if ( pWndData->kbd_queue.empty( ) )
  438.         WaitForSingleObject( pWndData->key_waiting, INFINITE );
  439.     else
  440.     // Make sure the event is not signaled.  It will remain signaled until a
  441.     // thread is woken up by it.  This could cause problems if the queue was
  442.     // not empty and we got characters from it, never having to wait.  If the
  443.         // queue then becomes empty, the WaitForSingleObjectX will immediately
  444.     // return since it's still signaled.  If no key was pressed, this would
  445.     // obviously be an error.
  446.         ResetEvent( pWndData->key_waiting );
  447.  
  448.     // TODO: Start critical section
  449.     // access queue
  450.     // end critical section
  451.  
  452.     c = pWndData->kbd_queue.front( );             // Obtain the next element in the queue
  453.     pWndData->kbd_queue.pop( );                   // Remove the element from the queue
  454.  
  455.     return c;
  456. }
  457.  
  458.  
  459. // This function returns the name of the current driver in use.  For WinBGI,
  460. // this is always "EGAVGA"
  461. //
  462. const char *getdrivername( )
  463. {
  464.     return "EGAVGA";
  465. }
  466.  
  467.  
  468. // This function gets the current graphics mode.  For WinBGI, this is always
  469. // VGAHI
  470. //
  471. int getgraphmode( )
  472. {
  473.     return VGAHI;
  474. }
  475.  
  476.  
  477. // This function returns the maximum mode the current graphics driver can
  478. // display.  For WinBGI, this is always VGAHI.
  479. //
  480. int getmaxmode( )
  481. {
  482.     return VGAHI;
  483. }
  484.  
  485.  
  486. // This function returns a string describing the current graphics mode.  It has the format
  487. // "width*height MODE_NAME"  For WinBGI, this is the window size followed by VGAHI
  488. //
  489. char *getmodename( int mode_number )
  490. {
  491.     static char mode[20];
  492.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  493.  
  494.     sprintf( mode, "%d*%d VGAHI", pWndData->width, pWndData->height );
  495.     return mode;
  496. }
  497.  
  498.  
  499. // This function returns the range of possible graphics modes for the given graphics driver.
  500. // If -1 is given for the driver, the current driver and mode is used.
  501. //
  502. void getmoderange( int graphdriver, int *lomode, int *himode )
  503. {
  504.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  505.     int graphmode;
  506.  
  507.     // Use current driver modes
  508.     if ( graphdriver == -1 )
  509.         detectgraph( &graphdriver, &graphmode );
  510.  
  511.     switch ( graphdriver )
  512.     {
  513.     case CGA:
  514.         *lomode = CGAC0;
  515.         *himode = CGAHI;
  516.         break;
  517.     case MCGA:
  518.         *lomode = MCGAC0;
  519.         *himode = MCGAHI;
  520.         break;
  521.     case EGA:
  522.         *lomode = EGALO;
  523.         *himode = EGAHI;
  524.         break;
  525.     case EGA64:
  526.         *lomode = EGA64LO;
  527.         *himode = EGA64HI;
  528.         break;
  529.     case EGAMONO:
  530.         *lomode = *himode = EGAMONOHI;
  531.         break;
  532.     case HERCMONO:
  533.         *lomode = *himode = HERCMONOHI;
  534.         break;
  535.     case ATT400:
  536.         *lomode = ATT400C0;
  537.         *himode = ATT400HI;
  538.         break;
  539.     case VGA:
  540.         *lomode = VGALO;
  541.         *himode = VGAHI;
  542.         break;
  543.     case PC3270:
  544.         *lomode = *himode = PC3270HI;
  545.         break;
  546.     case IBM8514:
  547.         *lomode = IBM8514LO;
  548.         *himode = IBM8514HI;
  549.         break;
  550.     default:
  551.         *lomode = *himode = -1;
  552.         pWndData->error_code = grInvalidDriver;
  553.         break;
  554.     }
  555. }
  556.  
  557.  
  558. // This function returns an error string corresponding to the given error code.
  559. // This code is returned by graphresult()
  560. //
  561. const char *grapherrormsg( int errorcode )
  562. {
  563.     static const char *msg[16] = { "No error", "Graphics not installed",
  564.         "Graphics hardware not detected", "Device driver not found",
  565.         "Invalid device driver file", "Insufficient memory to load driver",
  566.         "Out of memory in scan fill", "Out of memory in flood fill",
  567.         "Font file not found", "Not enough meory to load font",
  568.         "Invalid mode for selected driver", "Graphics error",
  569.         "Graphics I/O error", "Invalid font file",
  570.         "Invalid font number", "Invalid device number" };
  571.  
  572.     if ( ( errorcode < -16 ) || ( errorcode > 0 ) )
  573.         return NULL;
  574.     else
  575.         return msg[-errorcode];
  576. }
  577.  
  578.  
  579. // This function returns the error code from the most recent graphics operation.
  580. // It also resets the error to grOk.
  581. //
  582. int graphresult( )
  583. {
  584.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  585.     int code;
  586.  
  587.     code = pWndData->error_code;
  588.     pWndData->error_code = grOk;
  589.     return code;
  590.  
  591. }
  592.  
  593.  
  594. // This function uses the information in graphdriver and graphmode to select
  595. // the appropriate size for the window to be created.
  596. //
  597. void initgraph( int *graphdriver, int *graphmode, char *pathtodriver )
  598. {
  599.     WindowData *pWndData;
  600.     int width = 0, height = 0;
  601.     bool valid = true;
  602.    
  603.     if ( *graphdriver == DETECT )
  604.         detectgraph( graphdriver, graphmode );
  605.  
  606.     switch ( *graphdriver )
  607.     {
  608.     case MCGA:
  609.         switch ( *graphmode )
  610.         {
  611.         case MCGAC0:
  612.         case MCGAC1:
  613.         case MCGAC2:
  614.         case MCGAC3:
  615.             width = 320;
  616.             height = 200;
  617.             break;
  618.         case MCGAMED:
  619.             width = 640;
  620.             height = 200;
  621.             break;
  622.         case MCGAHI:
  623.             width = 640;
  624.             height = 480;
  625.             break;
  626.         }
  627.         break;
  628.     case EGA:
  629.         switch ( *graphmode )
  630.         {
  631.         case EGALO:
  632.             width = 640;
  633.             height = 200;
  634.             break;
  635.         case EGAHI:
  636.             width = 640;
  637.             height = 350;
  638.             break;
  639.         }
  640.         break;
  641.     case EGA64:
  642.         switch ( *graphmode )
  643.         {
  644.         case EGALO:
  645.             width = 640;
  646.             height = 200;
  647.             break;
  648.         case EGAHI:
  649.             width = 640;
  650.             height = 350;
  651.             break;
  652.         }
  653.         break;
  654.     case EGAMONO:
  655.         width = 640;
  656.         height = 350;
  657.         break;
  658.     case HERCMONO:
  659.         width = 720;
  660.         width = 348;
  661.         break;
  662.     case ATT400:
  663.         switch ( *graphmode )
  664.         {
  665.         case ATT400C0:
  666.         case ATT400C1:
  667.         case ATT400C2:
  668.         case ATT400C3:
  669.             width = 320;
  670.             height = 200;
  671.             break;
  672.         case ATT400MED:
  673.             width = 640;
  674.             height = 200;
  675.             break;
  676.         case ATT400HI:
  677.             width = 640;
  678.             height = 400;
  679.             break;
  680.         }
  681.         break;
  682.     case VGA:
  683.         switch ( *graphmode )
  684.         {
  685.         case VGALO:
  686.             width = 640;
  687.             height = 200;
  688.             break;
  689.         case VGAMED:
  690.             width = 640;
  691.             height = 350;
  692.             break;
  693.         case VGAHI:
  694.             width = 640;
  695.             height = 480;
  696.             break;
  697.         }
  698.         break;
  699.     case PC3270:
  700.         width = 720;
  701.         height = 350;
  702.         break;
  703.     case IBM8514:
  704.         switch ( *graphmode )
  705.         {
  706.         case IBM8514LO:
  707.             width = 640;
  708.             height = 480;
  709.             break;
  710.         case IBM8514HI:
  711.             width = 1024;
  712.             height = 768;
  713.             break;
  714.         }
  715.         break;
  716.     default:
  717.         valid = false;
  718.     case CGA:
  719.         switch ( *graphmode )
  720.         {
  721.         case CGAC0:
  722.         case CGAC1:
  723.         case CGAC2:
  724.         case CGAC3:
  725.             width = 320;
  726.             height = 200;
  727.             break;
  728.         case CGAHI:
  729.             width = 640;
  730.             height = 200;
  731.             break;
  732.         }
  733.         break;
  734.     }
  735.  
  736.     // Create the window with with the specified dimensions
  737.     initwindow( width, height );
  738.     if (!valid)
  739.     {
  740.         pWndData = BGI__GetWindowDataPtr( );
  741.         pWndData->error_code = grInvalidDriver;
  742.  
  743.     }
  744. }
  745.  
  746.  
  747. // This function does not do any work in WinBGI since the graphics and text
  748. // windows are always both open.
  749. //
  750. void restorecrtmode( )
  751. { }
  752.  
  753.  
  754. // This function returns true if there is a character waiting to be read
  755. // from the window's keyboard buffer.
  756. //
  757. int kbhit( )
  758. {
  759.     // TODO: start critical section
  760.     // check queue empty
  761.     // end critical section
  762.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  763.  
  764.     return !pWndData->kbd_queue.empty( );
  765. }
  766.  
  767.  
  768. // This function sets the aspect ratio of the current window.
  769. //
  770. void setaspectratio( int xasp, int yasp )
  771. {
  772.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  773.  
  774.     pWndData->x_aspect_ratio = xasp;
  775.     pWndData->y_aspect_ratio = yasp;
  776. }
  777.  
  778.  
  779. void setgraphmode( int mode )
  780. {
  781.     // Reset graphics stuff to default
  782.     graphdefaults( );
  783.     // Clear the screen
  784.     cleardevice( );
  785. }
  786.  
  787.  
  788.  
  789.  
  790. /*****************************************************************************
  791. *
  792. *   User-Controlled Window Functions
  793. *
  794. *****************************************************************************/
  795.  
  796. // This function returns the current window index to the user.  The user can
  797. // use this return value to refer to the window at a later time.
  798. //
  799. int getcurrentwindow( )
  800. {
  801.     return BGI__CurrentWindow;
  802. }
  803.  
  804.  
  805. // This function sets the current window to the value specified by the user.
  806. // All future drawing activity will be sent to this window.  If the window
  807. // index is invalid, the current window is unchanged
  808. //
  809. void setcurrentwindow( int window )
  810. {
  811.     if ( (window < 0) || (window >= BGI__WindowCount) || BGI__WindowTable[window] == NULL)
  812.         return;
  813.  
  814.     BGI__CurrentWindow = window;
  815. }
  816.  
  817.  
  818.  
  819.  
  820.  
  821. /*****************************************************************************
  822. *
  823. *   Double buffering support
  824. *
  825. *****************************************************************************/
  826.  
  827. // This function returns the current active page for the current window.
  828. //
  829. int getactivepage( )
  830. {
  831.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  832.     return pWndData->ActivePage;
  833. }
  834.  
  835.  
  836. // This function returns the current visual page for the current window.
  837. //
  838. int getvisualpage( )
  839. {
  840.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  841.     return pWndData->VisualPage;
  842. }
  843.  
  844.  
  845. // This function changes the active page of the current window to the page
  846. // specified by page.  If page refers to an invalid number, the current
  847. // active page is unchanged.
  848. //
  849. void setactivepage( int page )
  850. {
  851.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  852.  
  853.     if ( (page < 0) || (page > MAX_PAGES) )
  854.         return;
  855.  
  856.     pWndData->ActivePage = page;
  857. }
  858.  
  859.  
  860. // This function changes the visual page of the current window to the page
  861. // specified by page.  If page refers to an invalid number, the current
  862. // visual page is unchanged.  The graphics window is then redrawn with the
  863. // new page.
  864. //
  865. void setvisualpage( int page )
  866. {
  867.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  868.  
  869.     if ( (page < 0) || (page > MAX_PAGES) )
  870.         return;
  871.  
  872.     pWndData->VisualPage = page;
  873.  
  874.     // Redraw the entire current window.  No need to erase the background as
  875.     // the new image is simply copied over the old one.
  876.     InvalidateRect( pWndData->hWnd, NULL, FALSE );
  877. }
  878.  
  879.  
  880. // This function will swap the buffers if you have created a double-buffered
  881. // window.  That is, by having the dbflag true when initwindow was called.
  882. //
  883. void swapbuffers( )
  884. {
  885.     WindowData *pWndData = BGI__GetWindowDataPtr( );
  886.    
  887.     if ( pWndData->ActivePage == 0 )
  888.     {
  889.         pWndData->VisualPage = 0;
  890.         pWndData->ActivePage = 1;
  891.     }
  892.     else    // Active page is 1
  893.     {
  894.         pWndData->VisualPage = 1;
  895.         pWndData->ActivePage = 0;
  896.     }
  897.     // Redraw the entire current window.  No need to erase the background as
  898.     // the new image is simply copied over the old one.
  899.     InvalidateRect( pWndData->hWnd, NULL, FALSE );
  900. }



PM Quote
Avatar
tullio1995 (Normal User)
Rookie


Messaggi: 59
Iscritto: 20/03/2011

Segnala al moderatore
Postato alle 19:46
Sabato, 27/12/2014
Codice sorgente - presumibilmente C/C++

  1. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>SET "PATH=C:\MinGW\bin;C:\Windows
  2. \system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerSh
  3. ell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\MinGW\bin"
  4.  
  5. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>mingw32-make.exe -f makefile
  6. g++ -c -O3 -fno-rtti -fno-exceptions drawing.cxx
  7. g++ -c -O3 -fno-rtti -fno-exceptions misc.cxx
  8. g++ -c -O3 -fno-rtti -fno-exceptions mouse.cxx
  9. g++ -c -O3 -fno-rtti -fno-exceptions palette.cxx
  10. g++ -c -O3 -fno-rtti -fno-exceptions text.cxx
  11. g++ -c -O3 -fno-rtti -fno-exceptions winbgi.cxx
  12. g++ -c -O3 -fno-rtti -fno-exceptions winthread.cxx
  13. g++ -c -O3 -fno-rtti -fno-exceptions -c file.cxx
  14. g++ -c -O3 -fno-rtti -fno-exceptions dibutil.cxx
  15. rm graphics.h
  16. process_begin: CreateProcess(NULL, rm graphics.h, ...) failed.
  17. make (e=2): Impossibile trovare il file specificato.
  18. makefile:37: recipe for target 'graphics.h' failed
  19. mingw32-make.exe: *** [graphics.h] Error 2
  20.  
  21. C:\Users\Tullio\Desktop\WinBGIm6_0_Nov2005_src>PAUSE
  22. Premere un tasto per continuare . . .



Un'altro pò e ritorno a usare linux xD

PM Quote
Avatar
SamIAm (Normal User)
Newbie


Messaggi: 16
Iscritto: 09/09/2012

Segnala al moderatore
Postato alle 20:06
Sabato, 27/12/2014
Credo che hai dimenticato di aggiornare il file "graphics.h" :)

PM Quote
Pagine: [ 1 2 3 ] Precedente | Prossimo