Advertisement
ASP_Volume2 Graphics #28558

A simple "particle" effect

This is a very simple particle effect. First off, let me say that I agree that it doesn't look all that neat. I would need to create a set of few particles sprites to display with BitBlt instead of declaring a colour palette and using it to draw pixels with SetPixel, but I'm not a good graphist (well, I am, as good as I am a programmer!) and I'm a bit lazy as well :) Anyway, few APIs, no controls, backbuffering, the usual stuff. The particle aims for the mouse cursor, but it should be very easy to modify, that is why comments are not as dense as I use to make them, it's very simple, really. Oh, since this is very simple, you will notice the use of GetTickCount in a loop to release as much CPU as possible. On this PC, it takes virtually no CPU resources. Oh, and I included a background, you can use whatever pic, it was just to demonstrate that I'm genuinely using a backbuffer and not cheating by painting black pixels between loops :)

AI

Tóm tắt bởi AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Mã nguồn
original-source
Upload
Bình luận gốc (3)
Được khôi phục từ Wayback Machine