#1 28-07-2008 00:55

Rapier
Registered: 28-04-2008
Posts: 29

Question about TXD

Hi, is possible with the memory handling know how many images has inside a TXD file?

Offline

#2 29-07-2008 14:36

Seemann
Registered: 07-08-2006
Posts: 2,065

Re: Question about TXD

Sure, it has to be possible, but for what?

Offline

#3 29-07-2008 20:56

Rapier
Registered: 28-04-2008
Posts: 29

Re: Question about TXD

Because I am doing a mod and this is very important. I must allocate the total number of images to a variable. Please Seemann this is very important!!!

Offline

#4 30-07-2008 15:24

Seemann
Registered: 07-08-2006
Posts: 2,065

Re: Question about TXD

Please answer: what is the actual purpose of knowing how much textures are inside a dictionary? I should know because even it's possible to do via scripts, it's a bit complicated, so does it worth to work on?

Offline

#5 30-07-2008 16:37

Rapier
Registered: 28-04-2008
Posts: 29

Re: Question about TXD

I create a mod called SLIDESHOW, my idea is that people can share images and displays them in SA. Look:

...
:LabelStartSlide
1@ = 19
Player.CanMove($PLAYER_CHAR) = False
Actor.LockInCurrentPosition($PLAYER_ACTOR) = True
fade 0 250

:LabelSlide
wait 0
if
  not fading
jf @LabelSlide
03F0: text_draw_toggle 0
0390: load_txd_dictionary 'SLIDE'
09F5: disable_player_mutal_activities 1
wait 0
038F: request_texture "SS_PIC1" as 1
038F: request_texture "SS_PIC2" as 2
038F: request_texture "SS_PIC3" as 3
038F: request_texture "SS_PIC4" as 4
038F: request_texture "SS_PIC5" as 5
0343: set_text_draw_linewidth 632.0 
0345: enable_text_draw_background 1 
0349: set_text_draw_font 2 
033E: set_draw_text_position 8.0 8.0 GXT 'SS_INFO' 
2@ = 1
jump @LabelSlide05

:LabelSlide02
wait 0
if or
  not 2@ > 1 
80E1:  not player 0 pressed_key 5
jf @LabelSlide03
if// or
//  2@ > 24
80E1:  not player 0 pressed_key 7
jf @LabelSlide04
if
80E1:  not player 0 pressed_key 19
jf @LabelSlideExit
jump @LabelSlide02

:LabelSlide03
1@ = 5
2@ -= 1
jump @LabelSlide05

:LabelSlide04
1@ = 7
2@ += 1

:LabelSlide05
038D: draw_texture 2@ position 320.0 240.0 size 640.0 480.0 RGBA 255 255 255 255
gosub @SubKeyPressed
jump @LabelSlide02
...

I need the total number of images to improve the code. Please man helpme!

Offline

#6 01-08-2008 13:11

Rapier
Registered: 28-04-2008
Posts: 29

Re: Question about TXD

Anybody can help me?

Offline

#7 01-08-2008 14:39

Seemann
Registered: 07-08-2006
Posts: 2,065

Re: Question about TXD

I'll try to make such script this weekend but not promise anything.

Offline

#8 01-08-2008 15:40

Rapier
Registered: 28-04-2008
Posts: 29

Re: Question about TXD

No problem, I will waiting! The source is attached if you need it.

Большое спасибо Seemann! smile

Offline

#9 09-08-2008 23:15

Rapier
Registered: 28-04-2008
Posts: 29

Re: Question about TXD

I asked for Jernej L. and he told me the following: "File offset decimal 10: read a uint16."
It is possible to do so via CLEO?

Offline

Board footer

Powered by FluxBB