Hey everyone! We've been having issues with being bombarded by forum spam bots. As a temporary measure we're disabling registration for around 72 hours. Anyone wanting to join up as a legitimate user, please have patience! :)
I saw another funky behaviour related to the FPU...
For example, I was using this code to calculate the colour of a shape:
// Calculate color
// dpLight is a float with values from 0.0f to 1.0f
// colModel is the base colour
RGBColor colPix;
colPix.red = (int)((float)colModel.red * dpLight)...
So, it's getting weird... this sample code works always fine now, but using it in my project, it fails if I set the compiler to use the FPU.
For example:
char buf[50];
float fff = 12.345f;
sprtint(buf, "#.3f", fff);
DrawString(c2pstr(buf));
This will work fine if FPU is not used, but it will...
Thanks. That made the trick.
Now I have another issue, as I'm trying to write the result in my project using DrawString, and for that I'm converting the float to string using sprintf, but I'm getting a "NAN" result... I need to see about it...
Not really understanding....
If I do this....
#include <stdio.h>
#include <time.h>
void waitforkey(void)
{
while(1)
if (getchar())
break;
}
main()
{
int t, tt;
t = clock();
printf("Press enter...");
waitforkey();
tt = clock()...
Hey,
I want to take some measures of performance, and I have issues to check the time taken between two steps.
This is the code I'm testing:
#include <stdio.h>
#include <time.h>
void waitforkey(void)
{
while(1)
if (getchar())
break;
}
main()
{
clock_t t, tt...
I made today some tests...
Rendering the Utah teapot it takes:
- Basilisk (on MacBook Air 1.2GHz i7) = 0.4 Secs (FPU emu)
- LC475 (Full 040 @33MHz): 24 secs (No FPU) and 8 secs (FPU)
- MacMini G4 1.5GHz: 1.8 secs (No FPU, it crashes with FPU)
I couldn't try on the SE/30, but it will take...
In fact, the full book is available here: https://cdn.preterhuman.net/texts/computing/macintosh/Macintosh_C/
It seems to be "Macintosh C - A Hobbyist's Guide to Programming the Mac OS in C", written by K. J. Bricknell
It seems quite interesting...
Made a new version...
I added keyboard control for the camera, and changed the dialog settings to make it easier to use:
I couldn't figure out how to process KeyDown events for the cursors, but I used instead:
- a, d: move sideways
- w, s: move up-down
- r, f: move forward-backwards
- A, D: to...
Hello,
I need to process the KeyDown event for the cursor keys, but I can't figure out how to do it.
I managed to understand how to process key press for most keys, but not yet how to read the cursors.
For other keys I can do something like this:
// The key is pressed while our windows...
Hey,
my project is starting to look like something...
The App is attached here, it would be nice to have some people testing it.
Tomorrow I'll be able to check in some of my Macs. My better 68K Mac is an LC475 with a full 040 at 33MHz... I guess it should be much better in a machine with...
Answering myself... it seems that the way to go is to use
PenMode(patXor);
I found this chapter that explains all nicely: https://cdn.preterhuman.net/texts/computing/macintosh/Macintosh_C/chap12.pdf
Maybe the full book is somewhere, but I can't find it.
Hey,
for my project I need to make a tool to draw profiles as a sequence of segments.
The tool would allow to use the mouse to add points to the profile, and while drawing the current segment I want the mouse to draw a "rubber band" line and fix it when pressing the button, then add the next...
I just wanted to make my first built as much standard as possible, so I decided finally not to do the modifications proposed for this by Uncle Bernie.
I didn't know about that utility! That actually is great, and maybe it will help me also to get a real cassette to work, as until now I only had...
That would be cool... and display the photos in ASCII :)
That was during a mini-VCF here in Switzerland, and this photo of my table was made with the QuickTake...
You got a quite nice set, I like your wooden things.
This is mine...
Custom built getting the PCB and the components separately... the keyboard is also quite hand-made.
I'd like to get the jukebox board... it makes it far more useable, now I use the cassette interface reading the audio files...
Well... I had some advance... I used the QuickDraw primitives to paint polygons, and used it for my 3d render project.
I have lots of issues related to memory management... I need to see how can I solve it, but with very big models I have crashes. But happy so far.
Now I need to learn how to...