Category : Files from Magazines
Archive   : MICROCAD.ZIP
Filename : SQUARE.CPP

 
Output of file : SQUARE.CPP contained in archive : MICROCAD.ZIP
// Figure 8 for "A Little CAD with C++"
// Copyright 1988 Bruce Eckel
// Permission required to distribute source

// file: square.cpp
#include "square.hpp"
#include

void square::draw() {
msm_hidecursor();
small_box [FG_X1] = x_center;
small_box [FG_X2] = x_center + 20;
small_box [FG_Y1] = y_center;
small_box [FG_Y2] = y_center + 20;
fg_drawbox (FG_WHITE, FG_MODE_SET, ~0,
FG_LINE_SOLID,
small_box, fg_displaybox);
msm_showcursor();
}

void square::erase() {
msm_hidecursor();
fg_drawbox (FG_BLACK, FG_MODE_SET, ~0,
FG_LINE_SOLID, small_box, fg_displaybox);
msm_showcursor();
}



  3 Responses to “Category : Files from Magazines
Archive   : MICROCAD.ZIP
Filename : SQUARE.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/