News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

what's wrong with that ?

Started by NightWare, August 03, 2006, 11:08:22 PM

Previous topic - Next topic

NightWare

hi all,

i've a small problem  :(, the included code (a starfield, mmx (P2) is needed) don't quit correctly... in fact, it work fine on my celeron 700, but it doesn't quit correctly on my P4 and i don't know/see why... is there someone here to explain me why ? the thread isn't terminated as it should ?

for those who just want to test it, just hit those keys :
ESC = to quit
F5 = reduced blur (default)
F6 = classic blur
F7 = blur down
F8 = blur up
B = to activate/disactivate blur (activated by default)
S = to activate/disactivate fps (activated by default)
T = to activate/disactivate trace (activated by default)
Left Key = rotate left
right key = rotate right
right mouse button = increase speed

for those who want to understand the code :
for my procs, i use my own calling convention (if i code in asm, it's not to use c like calls).
the source is heavily commented (but in french, i haven't time to translate all the comments... sorry for that...),
the procs also have french name... (i know... shame on me...) so here an english translation of the procs, it can help :

AfficherChaineSansFond = PrintGfxStringWithoutBackground
AllouerBlocMemoire = AllocMem
ConvertirValeurEnChaineDecimale = DwToA
CreerEcran = CreateScreen
CreerInstanceMemoire = GetMemInstance
EvaluationTemps = TimeEvents
DefinirCouleursChaine = SetGfxStringColor
DefinirTableDeRedimensionnement = SetResizingTable
DessinerEtoiles = DrawStars
DessinerLigne = DrawLine
DessinerPoint = DrawPoint
GenererNombreAleatoire = GetRandomNumber
GestionnaireMessages = WinProc
GestionnaireMessagesBoiteDialogue = WinDlgProc
InitialiserNombresAleatoires = InitRandomNumbers
LibererBlocMemoire = FreeMem
ProcessusPrincipal = MainThread
ProgrammePrincipal = Main
Mmx_AgrandirX2 = x2Scalling
Mmx_EffacerBlocMemoire = ZeroMem
Mmx_EffetFonduAscendant = BlurEffectUp
Mmx_EffetFonduDescendant = BlurEffectDown
Mmx_EffetFonduLeger = ReducedBlurEffect (in fact it's quite dark, coz of the black bakground)
Mmx_EffetFonduStatique = ClassicBlurEffect
Redimensionner = Resize
SupprimerEcran = DeleteScreen
SupprimerInstanceMemoire = DeleteMemInstance
SupprimerTableDeRedimensionnement = DeleteResizingTable

wooow... you must speak french almost perfectly now... lol...

and no ! the red line isn't a bug, it's just a test... remove it if you dont like it... anyway this starfield IS a test... you can reassemble it with any size (except 0, but nobody is stupid enough to do it, isn't it). for both work and final screen buffer (disactivate the fps if it's very small size, otherswise crash...). i just hope some of you will find some parts of the code interesting...

another thing, any speed-up you can see are welcome... (except for rotations (here it's a very old test) i use something completly different now (i've used dwords for a reason...  :toothy... )

and of course, i'd like to know why it doesn't quit correctly !



[attachment deleted by admin]

zooba

Nothing wrong with it on my computer (Pentium M, WinXP Pro).

Love the effect, classic blur should be default IMHO :wink

Cheers,

Zooba :U

morlok

AMD Athlon 64 (Win XP), no problem to quit.

Very good Job   :clap: ... I feel like Spock into the Enterprise 

Regards

NightWare

#3
 :bg solved ! i've just made few changes, i've added one test in the beginning of the WinProc...
i know, it's not really academic, but this proc treat win messages, so it can also treat one of mine...

the screen is a bit frozen before the exit, but it work... that's all i need...
i suppose there is no way to synchronize it... bah... windows...  :(

i've updated the code of the fisrt post

edit : i've updated the code again, it wasn't totaly solved... no more screen freeze now, and should work correctly in all case... i hope...  :wink