Ejemplo n.º 1
0
void PrintMaze() {
    //OledClearBuffer();
    const int grid[]={27,30,44,47,70,73,107,110,127,
                      50,53,79,82,90,93,127,
                      20,23,67,70,106,109,127};
    OledMoveTo(0,0);OledDrawRect(127,31);
    uint32_t xc = 0;
    uint32_t yc = 7;
    uint32_t ind = 0;
    OledMoveTo(xc,yc);
    while(1) {
    OledLineTo(grid[ind],yc);
    if (grid[ind++]==127) {
    yc+=8;
    OledMoveTo(0,yc);
    if(yc>30) break; //we're done
    }
    else OledMoveTo(grid[ind++],yc);
    }
    OledMoveTo(64,0);
    OledLineTo(64,23);
    OledMoveTo(40,7);
    OledLineTo(40,15);
    OledMoveTo(85,7);
    OledLineTo(85,23);
    OledMoveTo(96,23);
    OledLineTo(96,31);
    OledUpdate();
}
Ejemplo n.º 2
0
/***	void IOShieldOledClass::drawRect(int xco, int yco)
**
**	Parameters:
**		xco		- x coordinate of other corner
**		yco		- y coordinate of other corner
**
**	Return Value:
**		none
**
**	Errors:
**		none
**
**	Description:
**		Draw a rectangle bounded by the current location and
**		the specified location.
*/
void IOShieldOledClass::drawRect(int xco, int yco)
{
	OledDrawRect(xco, yco);
}