Newer
Older
Scratch / lockwasher / src / bin / muffin / main.cc
@Christopher W. Olsen Christopher W. Olsen on 25 Oct 2019 912 bytes Scratch
#include <objgfx30.h>
#include <ogFont.h>
#include <vWindow.h>
extern "C" {
#include <stdio.h>
#include <stdlib.h>
}

int main() {
  bool result;
  ogBitFont * font = new ogBitFont();
  vWindow * window = new vWindow();
  printf("[%i]\n",window->vCreate());
  window->ogClear(window->ogRGB(0,0,255));
  if (window->ogGetPixel(0,0) == window->ogRGB(0,0,255)) 
    printf("ogClear worked\n");
  if (window->ogGetPixel(-1,-1) == window->ogRGB(0,0,255)) 
    printf("problem with ogRGB!!!!!\n");

  result = font->load("PACMAN.DPF");
  printf("Font Loaded: [0x%X]\n",(int)result);
  font->setFGColor(0,255,0);
  font->setBGColor(255,0,0);

  printf("Muffin!\n");
  printf("Command 1\n");
  window->vSDECommand(1);
  printf("Command 3\n");
  window->vSDECommand(3);
  printf("Load Font\n");
  font->putString(*window,0x0,0x0,"this is a test");
  window->vSDECommand(3);
  window->vSDECommand(4);    
  return(0);
  }