Search found 1239 matches

by dafhi
Jan 02, 2011 22:49
Forum: General
Topic: How can this be made faster?
Replies: 17
Views: 2756

multiply isn't necessarily that slow. one of my newest projects now uses multiply, and the old code which uses addition actually seems slower! ''New Code If (min1 + slope * maj1) >= PixelEdge Then ''Old Code min1 += slope If min1 >= PixelEdge Then Speed will depend on the processor, just make sure y...
by dafhi
Dec 22, 2010 1:53
Forum: General
Topic: How to write to screen.... in a FASTER way?
Replies: 11
Views: 1504

@Fox My latest edit has a working sample of animated random pixels - if you haven't seen that, do check it out =) In short, if the only *source* data is your 8 bit, you'll want to do this: For y = For x = .. mycolor = Pal32(Image8(x,y)) For yDest = .. For xDest = .. sPtr32 = yDest * Buf32Width + xDe...
by dafhi
Dec 21, 2010 2:24
Forum: General
Topic: Bleak Mid Winter Cheer
Replies: 5
Views: 750

That's awesome!!!!!

It's a bit chilly in here, but I wear a coat and sit in front of the fire that is my laptop =)
by dafhi
Dec 20, 2010 12:20
Forum: General
Topic: How to write to screen.... in a FASTER way?
Replies: 11
Views: 1504

I just visualized exactly what this sub is for .. magnification. I'll share some tidbits I've found over the years. There's a commercial basic, and online documentation at their website (a long time ago) mentioned that its own compiler was designed to put inner-most nested veriables into CPU registe...
by dafhi
Dec 20, 2010 10:47
Forum: General
Topic: How to write to screen.... in a FASTER way?
Replies: 11
Views: 1504

hey Fox! Dim SHARED AS UBYTE ScaleStepX, ScaleStepY Dim Shared As UInteger GWxGSF, GraphicScaleFactorM ' ... ' ... ' ... Sub RefreshScreen() Dim As UInteger PTR sPtr32 = Screenptr DIM As UInteger x, y Dim As UINTEGER a, b, c DetectScreenChanges() IF (LcdModifiedFirstY < 255) ...
by dafhi
Sep 25, 2010 23:12
Forum: Tips and Tricks
Topic: ASM Mul and Div
Replies: 1
Views: 2352

ASM Mul and Div

[2013 Sept 9] - Div code sample updated per MichaelW's correction. Div and Mul are often confusing for the ASM newb. I developed these two samples to unconfuse. '-----------------' ' ASM DIV EXAMPLE '-----------------' Dim As UInteger Numerator, Denominator, edx_, eax_ Numerator = 1003 Denominator =...
by dafhi
Sep 24, 2010 4:18
Forum: Tips and Tricks
Topic: Very simple random generator (VERY simple).
Replies: 4
Views: 1371

Thor, I applied your technique in one of my graphics projects with spectacular results Benchmark update: This appears to be at least 2% faster than Rnd!!! Dim Shared As UInteger t_rng_z, t_rng_d #Macro tRNG( g_, multiplier_ ) Asm mov ecx, [t_rng_z] mov eax, [t_rng_d] rol eax,7 Add eax,ecx mo...
by dafhi
Sep 23, 2010 13:42
Forum: Tips and Tricks
Topic: particle system
Replies: 3
Views: 945

in-code comment added. thanks
by dafhi
Sep 23, 2010 13:36
Forum: General
Topic: Squares
Replies: 7029
Views: 425754

I have a shelved interest in compression. Albert, looks like you are taking a similar approach to what I was thinking
by dafhi
Sep 22, 2010 14:25
Forum: Tips and Tricks
Topic: particle system
Replies: 3
Views: 945

particle system

#include "fbgfx.bi" '#Include "ArrayedLL_Handler.bi" '=================-------------------------------------===+ ' ArrayedLL_Handler.bi | Author: cRex Sept 22 - 20100922 ' ' Release 0.01 beta ' '========----------------------------------------=+=======+ ' Description: Linked Lis...
by dafhi
Sep 15, 2010 14:08
Forum: Libraries
Topic: [RESOLVED] resizable window
Replies: 2
Views: 1053

thanks rollie. I changed the subject to reflect what I really mean. I've seen your work though. Great stuff
by dafhi
Sep 15, 2010 13:09
Forum: Libraries
Topic: [RESOLVED] resizable window
Replies: 2
Views: 1053

[RESOLVED] resizable window

anybody have an example of how to do this? I'm looking for one with a buffer all set up, and an animation loop running I think I'd prefer SDL, but open to suggestions == UPDATE: The solution I was hoping for '' '' SDL pixel ploting example '' #include "SDL\SDL.bi" Dim Shared As Integer WIN...
by dafhi
Nov 10, 2005 3:11
Forum: Tips and Tricks
Topic: Starcontrol like melee AI aiming
Replies: 5
Views: 3083

ship control feels great! the bullet looks like it follows a curved path when you're watching your ship
by dafhi
Nov 01, 2005 6:45
Forum: Tips and Tricks
Topic: ShowBits64
Replies: 8
Views: 4066

asm (updated) was the only way i knew how to do this problem. also made this one based on counting_pine and Sisophon's input. for my own personal use i've kept the nice short one by mjs. thanks guys. Sub ShowBits_FAST( byval value as integer ) dim as uinteger I, J, strPos, bitPos, AryFG(...
by dafhi
Oct 31, 2005 13:09
Forum: Tips and Tricks
Topic: ShowBits64
Replies: 8
Views: 4066

ShowBits64

ShowBits64 Sub ShowBits32( p as any ptr, Newline As boolean = true) '' init gfx or u will see wrong color '' use ScreenRes x,y, 32 Dim As ulong I, AryFG(3), AryBG(3) var oldcol = color() AryFG(0) = RGB(200,200,200) AryFG(1) = RGB(255,0,0) AryFG(2) = RGB(0,255,0) AryFG(3) = RGB(0,96,255) AryBG(0) = R...

Go to advanced search