flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > About fix in many files.

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 17 Feb 2023, 13:51
Fasmw 1.73
Its normal solution and this is not bad variant ?
Code:
;in asm fileA
a1 fix fun1  ;fun1 using in this file 3 times
a2 fix tmp1 ;tmp1 using in this file 10 times
proc a1
ret
a2 dd 0
endp

;in asm fileB
a1 fix fun2 ;fun2 using in this file 2 times
a2 fix tmp2 ;tmp2 using in this file 13 times
proc a1
ret
a2 dd 0
endp

;main code
include 'fileA.asm'
include 'fileB.asm'
    


Last edited by Roman on 17 Feb 2023, 14:20; edited 2 times in total
Post 17 Feb 2023, 13:51
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 17 Feb 2023, 13:56
What are you trying to achieve?

The files can be simplified:
Code:
;in asm fileA
proc fun1
ret
tmp1 dd 0
endp    
You don't need fix in there.
Post 17 Feb 2023, 13:56
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 17 Feb 2023, 14:04
I have many 3d models.
All models have the same carcase and NPC model.
But have different parts of code.

Code:
;this all includes set procs(change animation,change position, AI) on second thread
include 'Dog1_enemy.asm'
include 'Dog2_enemy.asm'
include 'Dog3_enemy.asm'
include 'Tina_frend.asm'
include 'Krag1_enemy.asm'
include 'Krag2_enemy.asm'
    


Last edited by Roman on 17 Feb 2023, 14:12; edited 3 times in total
Post 17 Feb 2023, 14:04
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 17 Feb 2023, 14:06
Fasmw 1.73
Code:
aprr fix Dog1
proc Anim_#aprr ;error
    
Post 17 Feb 2023, 14:06
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 17 Feb 2023, 14:09
You still don't need fix.
Code:
proc Anim_Dog1    
What are you trying to achieve?
Post 17 Feb 2023, 14:09
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1847
Roman 17 Feb 2023, 14:13
Quote:
What are you trying to achieve?

Easy way to copy file, rename to new character.
And not write hands , many the sames names.
Just changed couple fix names.

Fast way to do many characters includes files.
Post 17 Feb 2023, 14:13
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 17 Feb 2023, 14:22
You need to parameterise your code.

See also here.
Post 17 Feb 2023, 14:22
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:  


< 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.