flat assembler
Message board for the users of flat assembler.

Index > Main > 2d graphic library project

Goto page Previous  1, 2, 3, 4, 5  Next
Author
Thread Post new topic Reply to topic
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Nope. It also crashes Sad
Post 19 Jan 2004, 09:45
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
grrrrr.
Post 19 Jan 2004, 19:05
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio
i have tested the game (only level 1) and it works but only if bit per pixel are 16
Post 21 Jan 2004, 09:01
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
only bpp allowed by game is 16, that is how i coded it (and i didnt have any problems with that). Did you play with DATA\config.ini (changing resolution / running windowed). I think game is fine (as a logical game), except few first levels. By the way you can skip levels easily by editing savegame.dat (it contains one dword holding number of level you are in) or by changing config.ini (i didnt have enough time to make normal level switching, so it is stored in INI file Wink
Post 21 Jan 2004, 19:41
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
hi, new version here. I fixed some data misalignation (some in SetVideoMode !). I also include version of 'test' (called test1) which doesn't switch video mode, just modifies windows' screen (you can then restore with WINDOWS+D).


Description:
Download
Filename: tg2d v0.0.3.2.zip
Filesize: 38.89 KB
Downloaded: 202 Time(s)

Post 22 Jan 2004, 19:50
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
Hi Vid,
About test.exe crash: maybe you could take a look at ddraw example from FASMW package? It works perfectly in fullscreen mode, and it seems to be quite simple. And it uses comcall macro, I think you could find it useful, it could make your code more readable and therefore it would be easier to find where the problem is. Unfortunatelly I can't help you much with this, as I don't know how too much about DX programming Sad.

regards
Post 27 Jan 2004, 21:32
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
thx for advice, but i have about 5 working examples form my older projects which all worked, and i changed tg2d to do exactly same as all of them and it still crashed!!! I think i'll rewrite whole ddraw stuff or what.
Post 27 Jan 2004, 21:35
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
hi, new version, i hopr it will work NOW! (of course it wont, but hope dies last)
Post 28 Jan 2004, 19:20
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
You don't have to consider it a serious advice, it's just a playing with fasm's preprocessor, but you might find it useful.
I've found the following structure in your source:
Code:
;errors enumerations
TG2D_ERROR_NOTINITIALIZED  =1  ;Init wasnt called
TG2D_ERROR_INITIALIZED     =2  ;returned when Init is called when library is already initialized
TG2D_ERROR_NOTIMPLEMENTED  =3  ;something is not implented by tg2d yet
TG2D_ERROR_OUTOFRANGE      =4  ;some user-passed value is out of range
TG2D_ERROR_OVERFLOW        =5  ;32bit overflow occured. Passed values were too high (but still in range)
TG2D_ERROR_INVALIDARGS     =6  ;invalid user input which cannot be put under other error
TG2D_ERROR_UNSUPPORTEDMODE =7  ;desired video mode is not supported
TG2D_ERROR_OUTOFMEMORY     =8  ;you know
TG2D_ERROR_UNDEFINEDBITMAP =9  ;bitmap is undefined (.bmp member is 0)
TG2D_ERROR_ALREADYDONE     =10 ;job of procedure is already done
TG2D_ERROR_NOVIDEOBITMAP   =11 ;returned by procedure using video bitmap when it is not present
TG2D_ERROR_BADBPP          =12 ;BPPs of bitmaps are not same

;INTERNAL - ASCII error names:
tg2d.error.nametableA:
dd 0,._1,._2,._3,._4,._5,._6,._7,._8,._9,._10,._11,._12
._1 db  'TG2D_ERROR_NOTINITIALIZED',0
._2 db  'TG2D_ERROR_INITIALIZED',0
._3 db  'TG2D_ERROR_NOTIMPLEMENTED',0
._4 db  'TG2D_ERROR_OUTOFRANGE',0
._5 db  'TG2D_ERROR_OVERFLOW',0
._6 db  'TG2D_ERROR_INVALIDARGS',0
._7 db  'TG2D_ERROR_UNSUPPORTEDMODE',0
._8 db  'TG2D_ERROR_OUTOFMEMORY',0
._9  db 'TG2D_ERROR_UNDEFINEDBITMAP',0
._10 db 'TG2D_ERROR_ALREADYDONE',0
._11 db 'TG2D_ERROR_NOVIDEOBITMAP',0
._12 db 'TG2D_ERROR_BADBPP',0

;INTERNAL - unicode (widechar) error names:
align 2
tg2d.error.nametableW:
dd 0,._1,._2,._3,._4,._5,._6,._7,._8,._9,._10,._11,._12
._1 du  'TG2D_ERROR_NOTINITIALIZED',0
._2 du  'TG2D_ERROR_INITIALIZED',0
._3 du  'TG2D_ERROR_NOTIMPLEMENTED',0
._4 du  'TG2D_ERROR_OUTOFRANGE',0
._5 du  'TG2D_ERROR_OVERFLOW',0
._6 du  'TG2D_ERROR_INVALIDARGS',0
._7 du  'TG2D_ERROR_UNSUPPORTEDMODE',0
._8 du  'TG2D_ERROR_OUTOFMEMORY',0
._9  du 'TG2D_ERROR_UNDEFINEDBITMAP',0
._10 du 'TG2D_ERROR_ALREADYDONE',0
._11 du 'TG2D_ERROR_NOVIDEOBITMAP',0
._12 du 'TG2D_ERROR_BADBPP',0    

You may make it simpler with macros, like:
Code:
macro nametable strdef,[name]
 {
   common local .cnt
     dd 0
     .cnt = 0
   forward local .str
     dd .str
     .cnt = .cnt + 1
     name = .cnt
   forward
     .str strdef `name,0
 }

struc nametableA [name]
 { common nametable db,name }

struc nametableW [name]
 { common nametable du,name }

errors fix \
TG2D_ERROR_NOTINITIALIZED  ,\
TG2D_ERROR_INITIALIZED     ,\
TG2D_ERROR_NOTIMPLEMENTED  ,\
TG2D_ERROR_OUTOFRANGE      ,\
TG2D_ERROR_OVERFLOW        ,\
TG2D_ERROR_INVALIDARGS     ,\
TG2D_ERROR_UNSUPPORTEDMODE ,\
TG2D_ERROR_OUTOFMEMORY     ,\
TG2D_ERROR_UNDEFINEDBITMAP ,\
TG2D_ERROR_ALREADYDONE     ,\
TG2D_ERROR_NOVIDEOBITMAP   ,\
TG2D_ERROR_BADBPP

tg2d.error.nametableA nametableA errors
tg2d.error.nametableW nametableW errors    

(it is exactly functionally equivalent).
Post 28 Jan 2004, 19:52
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
thx, but i knew about this possibility (i think i know fasm quite well, at least things described in docs).

i didnt choose this option because i dont want to use macros for now (until i am sure about internal structure of library). I have to purge them somewhere, declare them before where it is used etc., and it might require to restructuralize the library.
Post 28 Jan 2004, 20:45
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
The same result as before. Just have rebooted my system Confused But keep trying, I'm ready to reboot it more times to see your library working in the end Wink
Post 28 Jan 2004, 21:00
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
hi, new try

also please test the attachement whether it works

greet your BIOS bootup sequence


Description:
Download
Filename: ddrw_fullscreen_fasm.zip
Filesize: 7.75 KB
Downloaded: 205 Time(s)

Post 01 Feb 2004, 19:25
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
This one works just perfectly Very Happy
Sorry that I didn't tested it before, I'm just too busy by now Confused.
Post 02 Feb 2004, 20:59
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
you meant 'tg2d 0.0.3.4' or 'ddrw_fullscreen_fasm'?

(there is new version uploaded on 1st posti f you haven't noticed it)

delay is OK, i'm not in hurry
Post 03 Feb 2004, 19:14
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
I meant the example... tg2d v0.0.3.4 chashes my system just after "ddraw object created" message :/.

regards
Post 05 Feb 2004, 19:21
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
that changes things - it means cooperative level isn't set. Soon i'll post new test version.

(we are getting closer...)
Post 05 Feb 2004, 19:25
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
new test version


Description:
Download
Filename: tg2d v0.0.3.5.zip
Filesize: 29.39 KB
Downloaded: 169 Time(s)

Post 06 Feb 2004, 19:19
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
well.. only thing that changed since v0.0.3.4 is that my machine doesn't hang - it is rebooted (if it makes any difference to you Wink).
Post 08 Feb 2004, 09:41
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
opps, it was wrong executable version.
Here is proper one.
please write down all messages it shows


Description:
Download
Filename: tg2d v0.0.3.5.zip
Filesize: 29.52 KB
Downloaded: 185 Time(s)

Post 08 Feb 2004, 15:07
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
OK:
test.exe wrote:

ddraw obtained
before setting coop lvl
setting coop lvl not skipped


and... hang Confused

regards
Post 08 Feb 2004, 17:11
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4, 5  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.