Advertisement

Results for "Author: robert rayment"

3_2004-2005 #138561
As(s)embler Plus VB Picture Processing Fun

As(s)embler Plus VB Picture Processing Fun: by Robert Rayment. I like to have everything at my finger tips as the screen shot shows. If you prefer the minimalist approach see the excellent filter prog by Manuel Santos ( I have used a modification of a couple of his filters and have included his bitmap). Stephan Swertvaegher's picture handling prog is great for ideas and delicate changes to pictures ( I haven't seen Kevin Gadd's prog but which I believe is based on a dll written in C). The ripple effect is based on Didar ul Alam's prog. My prog has some of their features but also includes scrolling, shifting, rotation, zooming (plus anti-alias rotation and zooming), rectangle extraction, resizing and crazy mirrors. Looping is also included which can cycle through changes until stopped. All but a couple of things are duplicated in mcode. For some effects this is only included for completeness but has a dramatic effect on others. The programmer is usually the last person to find all the errors so - Constructive comments welcome. Win98. Zip file 63 KB.

3_2004-2005 #138646
EarthWaterFireAirLight

Elemental NASM.(UPDATE Now works on Win2000 and Probably WinNT) The zip file is ~ 26KB

3_2004-2005 #138691
Sixteen million colors DLL

16 Million Colors DLL. Example of a straightforward DLL, written with NASM, to cycle through all possible colors quickly. For 24-bit color only. All source code included. Zip file 8.5KB.

3_2004-2005 #138711
VB, Assembler & Resource files

VB, Assembler & Resource files by Robert Rayment (see small update below) Only those interested in this topic should download these files. If you have been following some of the VB+assembler progs I've been putting on PSC you may have noticed that the assembly part is either in a bin file (com in earlier examples) or in a DLL. The disadvantage of both these is that they need to be in the same folder as the prog. This is OK for testing but is a nuisance for an EXE. Also we're usually talking about small bits of assembler to beef up parts of VB (Heineken approach). The DLL may be specific and so is not appropriate to register. Assembled snippets are often much faster than VB. Also, once you've got over the red-tape and peculiarities of the particular assembler, its often _easier_ (this may be a secret so don't tell anyone) A DLL has a minimum size of 16KB and a bin file 4KB (cluster size). What this submission shows is how to put your assembler code into a resource file which gets incorporated into an EXE freeing it from associations and only taking a few more bytes than the bin file size. A 32-bit Hex/Long integer/Binary converter is developed to demonstrate these techniques. The zip file is ~11KB. UPDATE: it is possible to simplify the load from res by InCode = LoadResData(101, "CUSTOM") lpMCode = VarPtr(InCode(0)) avoiding the save to disc. Make sure to delete the line lpMCode = VarPtr(InCode(1))

3_2004-2005 #139342
Demo Spheroid Wrapping

Demo Spheroid Wrapping by Robert Rayment. This takes any bitmap & wraps it around a sphere. This can then be moved, rotated and magnified. The prog can be run with VB or machine code. Controls are keys only for this demo. Win 98 Zip file 85 KB.

3_2004-2005 #139350
Interactive Filter Design

Interactive Filter Design by Robert Rayment. IMPROVED: Input, VB or ASM, some user filters by Malcom Ferris(NZ) included in a *.ufi file. I was in two minds about submitting this since it is really for my own use. Included are some 3x3 filters from Unlimited Realities and Manuel Santos. With this prog filters can be up to 5x5. What would interest me is whether anyone can find designs that are significantly different from the 3x3 filters with the filter formula I've used. Win98, Zip file 72KB.

3_2004-2005 #140382
File Format Viewer & Editor

File Format Viewer & Editor by Robert Rayment.(Additions 29/9/02) The purpose of this program is to be able to view any file, particularly binary files, in an easily read format, ie as characters, bytes, integers and longs as decimal or hex. Format changes are set out on a new line with different colors and can be saved in a template file. Also loading in a template file will automatically parse the display. Numbers or characters can be edited and the new file saved. There is unlimited undo. Search & Mark, Goto and Highlighting is included. The displayed page can be printed and placing a shortcut of the EXE in the Windows SendTo folder will enable any file to be sent to this program. Some simple samples (made with this program) for ico, cur, bmp, gif, png, jpeg and RIFF palette files are included. There is a DEMO button to show the main function. Win98, Zip 69KB.

3_2004-2005 #140583
Tunnels & Things

Tunnels & Things by Robert Rayment: The simplicity of this appeals to me. Draw to a byte array and blit it to the form using StretchDIBits. The advantage of StretchDIBits is that it can take a pointer to the byte drawing surface and to a palette. It can be as close as VB gets to direct screen addressing similar to the old DOS Screen 13, only better. It is no competitor to DirectX but is very much simpler and pretty fast. The demonstration shows various tunnels, MMX scrolling, Plasma, Fire etc. Drawing is done using VB and animation using assembler (assembler doesn't have to be used but I prefer it). Win98 only. Zip file is 63KB.

3_2004-2005 #140959
NASM Editor, assembler & Tutorial

NASM Editor, assembler & Tutorial by Robert Rayment. (Version 3.5) This is an MDI RTB editor specifically for creating and producing pure machine code and DLLs for use with VB. I've written it because nearly all the refs on the Web are for DOS-asm, C-asm and All asm Windows progs. These are mostly confusing and none of it is needed to write useful VB-asm progs. nasmw.exe is needed to make full use of this package (Latest Web refs for NASM are given (NB Can also be obtained from A1VBCODE.com)). In the pack there is a Help file (make sure to read Requirements about the placement of nasmw.exe and other progs), a Tutor file and a crib for all the NASM mnemonics. Bin files ( called in VB using CallWindowProc) and DLL files can be created with temporary files to clear errors and then permanent files. Starter stub files for Bins and DLLs are menued. There are also 5 Bin examples and 7 DLLs showing a variety of ways that these can be written, in particular the NASM syntax. Reference code for the editor was taken from all over the place. If you're a beginner there's still a lot of work to do before you can write useful asm progs but, hopefully, this will get you over the first hurdles. Good luck! Win98, Zip 120KB.

3_2004-2005 #141058
A Dash Thru the Woods

A Dash Through the Woods by Robert Rayment. UPDATE: Improved bitmap creation (Having been goaded by Paul) plus some simple sound. This prog is based on the triplet StretchDIBits, byte arrays and assembler (as with 'Tunnels & Things' which got 10 excellent votes) except I've left out the assembler which means that it MUST be compiled so that the array manipulations are again dealt with by machine code. The prog will only produce a large bitmap file of smaller trees from a starting bitmap ONCE so that later runs can load up the byte arrays quickly. The creation of the bit maps is fast enough now so you could leave out the save to disk if you wanted to. It shows some other uses for StretchDIBits and 8-bit color byte surfaces, which might be of interest to some of you. No assembler is used. Trees are then put onto a drawing surface starting with the smallest and ignoring a white surround (masks not needed). By keeping and adjusting the x-position, direction and type of tree it looks like moving through some woods. Timing (using GetTickCount) and hence speed, the number of tree starts and their spread are on an options menu. The left & right cursor moves a little car to the left & right (actually the trees move in the opposite direction) and the up & down cursor changes the speed. You have to try not to hit the trees. Collision detection is based on x-coords. It needs compiling to an EXE to get a decent speed. Don't expect DirectX quality but I think its fun! The Zip file is 54 KB.

3_2004-2005 #141510
Linear transforms

Linear Transforms by Robert Rayment. This is maybe 'old hat' to some of you. It shows in pure VB, apart from loading bitmaps & set & get pixels, how to map a rectangular bitmap area onto a non-reeentrant quadrilateral, a circle, cylinder, right-circular cone and a sphere. I've stopped short of automating the shapes and saving the transfoms so you need to change the parameters in the code to get variations. Hopefully the comments are sufficient for you to do with it as you wish! Zip file 145KB (With some bitmaps).

3_2004-2005 #141516
Spirals

Spirals by Robert Rayment. Chris and I were looking at some spirals and I've animated a few for your pleasure (if you like that kind of thing!). See 'Tunnels & Things' for the techniques. Win98 only. Zip file 24 KB.

3_2004-2005 #141906
Knots

Knots by Robert Rayment. Load knots, Save knots (*.knt files), Make a knot (colored cursor, + hairs, grid). Examples KNOTS.knt (20 knots drawn using this prog) & Hello.knt included. See also KnotsInfo.txt. Zip 21KB, Win98.

3_2004-2005 #142426
Dither(Updated)

Dither by Robert Rayment. (Updated 26/11/02 Jump table used in ASM, 2-color saving corrected, improved scroll bars) This produces a 2-color bitmap from any original using a variety of methods and can be saved or printed. The program can be run in VB or VB+ASM. The structure of the asm file roughly follows that of the VB code and so should be useful for those new to assembler. The asm code is in a bin file but could be stored in a res file or made into a dll or a class (see buggy). See Notes.txt for more info. Zip 59KB, Win98 & exe tested on WinXP.

3_2004-2005 #142823
VTrack

VTrack2 by Robert Rayment This program uses floor ray-casting from the eye onto a color-height byte array (ie for simplicity avoiding separate height & color maps). The color-heights are then projected back to a front surface byte array which blitted to the screen using the API StretchDIBits. The program can be run with or without machine code and it runs for any screen size or color setting There is an automatic mode which goes round a track once with timing. In the VB environment this takes about 300 secs, VB EXE takes between 35 and 65 secs depending on Voxel heights and machine code bewteen 12 and 24 secs on my 400 MHz computer. Controls are the cursor keys to move forward, backward, turn to the left and turn to the right. With Shift the up & down arrows change the height of objects and Ctrl with the up & down arrows moves the viewer up & down. The SPACE bar brings the motion to an immediate halt. With the Pyramids a wall forms a boundary around the surface but with Plasmas the surface rolls over giving continuous motion. There is also collision detection based on the eye coords and the Voxel height in the vicinity on the floor surface. Different palettes can be selected and they take effect immediately. Changing the motion control or surface type requires the START button to be pressed. The casting routine is modified from that of D Brebner's of Unlimited Realities. In particular a spherical correction is applied and the scanning is from -ve to +ve angles placing the viewer in the middle of the screen. The FloorCASTER routine is commented in detail - the effects are very subtle. The machine code routines are in a bin file for use with CallWindowsProc but could easily be converted to a DLL. See also the recent prog from NLS, on PSC, which shows an alternative method for Voxels with 24-bit color. The ZIP file is 40 KB. (ADDITIONS Switch smoothing, plateau surface, collision flash, no collision in clouds).

3_2004-2005 #143096
Extractor

Extractor by Robert Rayment. Extracts a band of colors from a picture and shows them on a black & white picture which can be saved as a 1-bpp bmp mask. Also can extract rectangles or shapes plus a mask or resize to a rectangle. ASM can be toggled for large pictures. Win98 (exe WinXP) Zip 110 KB.

3_2004-2005 #143515
A Lotta Noise

"A Lotta Noise" by Robert Rayment: (UPDATE2 Cycle speed added) (UPDATE with faster linear Perlin & Marble) This is a demonstration of 32-bit StretchDIBits which can be run as VB code or VB + machine code. Perlin noise (Linear or Cosine-EASE), wood grain and marble surfaces can be designed on a picture box varying from 16x16 to 768x512 pixels. Color weighting, scales, wood and marble types, animated scales and color cyling can be done and the image saved, as a BMP, at any point. The prog can be run with any system color setting. A long integer graphic surface has the advantage in that it can more easily be dealt with using MMX. This demo is just the 'tip of the iceberg' but the method might be useful for designing textures for any application since the machine code is quite general and the bin file can be run locally. Zip file 38 kb.

3_2004-2005 #143534
Anti-aliasing & Rotation demo

"Anti-aliasing demo" by Robert Rayment. There are a few anti-aliasing progs on PSC. Mostly they are cleverly convoluted into several subs. I thought I'd stretch out the logic - makes it easier for me to understand and maybe for some of you.

3_2004-2005 #144250
Sphere (Updated)

Sphere by Robert Rayment. (Update with Latitude shift & Long for Byte Array) Demo of spherical wrap, rotate and tilt. Win98 (Zip 21 KB).

3_2004-2005 #144437
Knob-Thumb-wheels & Skins

Knob-Thumb-wheels & Skins Demo by Robert Rayment. An earlier version has been deleted. Three programs. The first develops and tests bmp strips from a starting image where, for knob wheels the central rotating part's radius and incremental angle can be set as well as, for thumb wheels, number of repeated images. The second program makes compressed True Color 2D arrays of images and masks using zlib.dll (version 1.1.4.0 from www.winimage.com/zlibdll/). For most efficient inflating zlib needs the original uncompressed size. For pictures the original width and height are needed and this is stored at the beginning of the compressed picture array, from which the uncompressed size can also be calculated. The third program uses zlib.dll to inflate the images from a resource file. This is a headerless form, skin, controls & fonts resizing demo using some standard methods (plus some WAV sounds also in the resource file) - a test bed for trying out things. There are 2 full skins but the demo also stores some bitmaps in image boxes, which then serve as buttons and source for tiled skinning. When compiled all the images are then contained within the exe. See Notes.txt. (exe tested on WinXP Home) Win98 Zip 76 KB.

Languages
Top Categories
Global Discovery