Skip to main content
Home Documents Game Manuals SAT Tutorial
SAT Tutorial

SAT Tutorial

Game Manuals · PDF
FilenameSAT_Tutorial.pdf
Size0.12 MB
Subsection SAT
Downloads0
Enjoying MacTrove? Anonymous downloads are free and unlimited. Create a free account to track favorites, contribute metadata corrections, and join the community chat.
Reader
SAT Tutorial
/
Loading…
OCR / Text contents
SAT Tutorial Introductory course to Sprite Animation Toolkit, by Ingemar Ragnemalm 1994. DRAFT! If I get no comments/corrections, I will assume it is perfect. C solutions by Richard Bannister 1995 *** Introduction This document introduces SAT at a very basic level. If you find it too hard to learn SAT from its demos, you can start here to get a short guided tour through the basics. The tutorial is divided into a few sections where some essential functions are explained, with a programming assignment after each. This tutorial will not explain each and every call in SAT. The goal with the tutorial is that you should understand the most fundamental goals, so you can explore the more advanced features with confidence, building your own SAT-using application in the process. Only some calls are defined here. See the manual for the ones used but not described. There are solutions for a number of assignments, and a resource file that all solutions share. You can use that resource file when making the assignments if you like, but you should get used to making graphics and putting together resource files as soon as possible. 1. Initialization SAT must be initialized, or it will not know where to do its drawing. There are two calls to do this: SATInit and SATCustomInit. SATInit sets up with a set of defaults that will work with many games. If you don't like it, consider SATCustomInit. Definition: procedure SATInit (pictID, bwpictID, Xsize, Ysize: integer); pictID is the resource number of a PICT that should be used as backdrop when running in color. bwpictID is the resource number of a backdrop PICT for b/w. Xsize is the desired height of the drawing area. Ysize is the desired width of the drawing area. Note: Unless you use Think Pascal, you must have initialized the Mac toolbox before initializing SAT. There is a call in SAT named SATInitToolbox for doing this in one line. Assignment 1: Create a new project. Add the SAT library and (for Pascal) the interface file SAT.p. Write a program file that initializes SAT with SATInit, then waits for a mouse click, and quits. Add that file to the project. Use a resource file with PICT resources for the backdrop. Possible problems: - Compile errors. Check the parameters used. Have you done "uses SAT"/"#include <SAT.h>? - Link errors. Have you included the SAT library in the project file? Pascal: Have you included SAT.p? - C: Can't find SAT.h. Make sure SAT.h is in the compiler's search path. For Think C, I recommend that you put both library and header file in a subfolder to where Think C itself is located. - Out of memory. Check the memory assignment. - The window is all black. Are the PICT numbers correct? Are the numbers for the drawing area correc…

Showing first 3,000 characters of 32,862 total. Open the full document →

mp.ls