• Features Wishlist 5 1
Currently:  

Author Topic: Features Wishlist  (Read 631063 times)

0 Members and 2 Guests are viewing this topic.

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: Features Wishlist
« Reply #3390 on: August 24, 2014, 02:04:29 pm »
Here's another feature idea which will be useful, and this time I'm pretty sure it isn't implemented yet  :P . Well, I hope so, because I've spent a quite big part of the afternoon writing the assembly code and debugging it, and if this feature was already available, I would have liked to use it before.

The idea is making a function a bit like GetCalc(, but which allows the developer to insert/remove bytes in a variable. I suggest using the ClrTable token, as it won't have any utility in Axe, and it's just next to GetCalc(. The token could be rename MemManage(, and take the following arguments : Variable,Offset,Size. If size is positive, memory is added, otherwise, it's removed from the offset. Using one token only has a big advantage : if the size is calculated by a formula, the developer doesn't have to test if it's positive or negative and use the corresponding function.

Spoiler For Code and information:
  • Variable is a pointer to the variable's name
  • The two first args must be in the stack, the last one (the size) in HL
  • The code checks if the variable exists, is unarchived, etc.
  • Returns 0 if it didn't worked, or else the offset in the file where bytes where inserted/removed
  • I haven't tried it with size=0. It'll try to add zero bytes to the variable... It might crash, or do nothing.
  • Don't try to use this routine with lists/matrix/numbers/etc, only with programs/appvars/strings/...
Code: [Select]
    BIT  7, H
    JR   Z, MemInsert
   
    ;p_IntNeg
    xor  a
    sub  l
    ld   l, a
    sbc  a, a
    sub  h
    ld   h,a
   
MemDelete:
    POP  DE      ;Offset to remove
    EX   (SP), HL   ;Variable name (SP = size)
    PUSH DE
    RST  rMov9ToOP1
    BCALL(_ChkFindSym)   ;Look in the VAT, DE set to pointer to size bytes of variable)
    JR   C, Error_Pop2   ;ERR: NOT FOUND
    XOR  A
    OR   B
    JR   NZ, Error_Pop2   ;ERR: ARCHIVED
   
    POP  HL      ;Offset to remove memory
    POP  BC      ;Memory needed
    PUSH HL      ;Offset to remove memory
    PUSH BC      ;Memory needed
    PUSH DE      ;Pointer to size bytes
    INC  DE      ;Skip size bytes
    INC  DE
   
    EX   DE, HL      ;HL = pointer, DE = bytes
    ADD  HL, DE
    LD   D, B \ LD E, C   ;Memory needed
   
    BCALL(_DelMem)   ;Delete the memory
   
    POP  HL      ;Pointer to size bytes
    PUSH HL      ;Pointer to size bytes
   
    BCALL(_LdHLInd)   ;HL = size of variable
   
    POP  DE      ;Pointer to size bytes
    POP  BC      ;Memory needed
    XOR  A
    SBC  HL, BC      ;Decrease size bytes
   
    EX   DE, HL
    LD   (HL), E
    INC  HL
    LD   (HL), D
    INC  HL
   
    POP  BC      ;Offset to remove memory
    ADD  HL, BC
    RET
MemInsert:
    BCALL(_EnoughMem)   ;Check if enough memory (stores value in DE)
    JR   C, Error_Pop2   ;ERR: MEMORY
    LD   B, D \ LD C, E   ;Memory needed
   
    POP  DE      ;Offset to insert memory
    POP  HL      ;Variable's name
    PUSH DE      ;Offset to insert memory
    PUSH BC      ;Memory needed
    RST  rMov9ToOP1
    BCALL(_ChkFindSym)   ;Look in the VAT, DE set to pointer to size bytes of variable)
    JR   C, Error_Pop2   ;ERR: NOT FOUND
    XOR  A
    OR   B
    JR   NZ, Error_Pop2   ;ERR: ARCHIVED
   
    POP  HL      ;Memory needed
    EX   DE, HL
    POP  BC      ;Offset to insert memory
    PUSH BC
    PUSH DE      ;Memory needed
    PUSH HL      ;Pointer to size bytes
    INC  HL      ;Skip size bytes
    INC  HL
    ADD  HL, BC
    EX   DE, HL
   
    BCALL(_InsertMem)   ;Insert the memory
   
    POP  HL      ;Pointer to size bytes
    PUSH HL      ;Pointer to size bytes
   
    BCALL(_LdHLInd)   ;HL = size of variable
   
    POP  DE      ;Pointer to size bytes
    POP  BC      ;Memory needed
    ADD  HL,BC      ;Increase size bytes
   
    EX   DE, HL
    LD   (HL), E   ;Write new size
    INC  HL
    LD   (HL), D
    INC  HL      ;Pointer to data
   
    POP  BC      ;Offset to insert memory
    ADD  HL, BC
    PUSH HL      ;Pointer to data
   
BytesInit:
    LD   (HL), $41   ;Write 'A'
    INC  HL
    DEC  BC
    LD   A, B
    OR   C
    JR   NZ, BytesInit
   
    POP  HL      ;Pointer to data
    RET
Error_Pop2:
    POP  HL
    POP  HL
Error:
    LD   HL, 0
    RET


I'll probably make an Axiom with some useful stuff like this code, StoreLCD, #ApdOn and #ApdOff, push and pop, since we can't use all this currently in Axe.
I'm french, that's the reason why my English can be a bit approximate.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Features Wishlist
« Reply #3391 on: August 24, 2014, 02:07:11 pm »
What do you mean by "variable" ? Because Memkit, an Axiom that is included in Axe's zip, can already add or remove bytes in an appvar for example.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: Features Wishlist
« Reply #3392 on: August 24, 2014, 02:12:16 pm »
What do you mean by "variable" ? Because Memkit, an Axiom that is included in Axe's zip, can already add or remove bytes in an appvar for example.
By "variable", I mean any OS variable : it can be an appvar, a program, etc. It was already possible  :(  ? Then this feature should be added to Axe, it's so useful !
I'm french, that's the reason why my English can be a bit approximate.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Features Wishlist
« Reply #3393 on: August 24, 2014, 02:13:48 pm »
I don't know if it works with everything but I am sure it works with appvars (I used that in AudaciTI), I am pretty sure it works with programs (given the difference between appvars and programs -.-) but I don't know for other variables.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: Features Wishlist
« Reply #3394 on: August 24, 2014, 02:19:45 pm »
I don't know if it works with everything but I am sure it works with appvars (I used that in AudaciTI), I am pretty sure it works with programs (given the difference between appvars and programs -.-) but I don't know for other variables.
It'll work with programs, but for the other variables (such as lists and matrix), the size field won't be set correctly. For these two variables, it should contain the quantity of numbers, and not the size of the variable in bytes. Nevertheless, it's still possible to use this routine and update separately this field (or else improve the routine to detect the variable's type).
I'm french, that's the reason why my English can be a bit approximate.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Features Wishlist
« Reply #3395 on: August 24, 2014, 02:49:18 pm »
As Hayleia said, I think MemKit covers this. I do agree that the functionalities of MemKit should be added to native Axe, though.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Features Wishlist
« Reply #3396 on: August 26, 2014, 09:48:29 am »
For now, we can do this
[]→°CST
°CST1-°CST2→°CST3

But we can't do this:
[]-°CST1→°CST2

Could this possibility be added ? Basically, I have this file
Spoiler For Spoiler:

[]->°FoxLedge
Data(°LedgeSprR^^r,°LedgeSpr^^r)
Data(0,0)
Data(°AbsX+°AbsY+°Ledge)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAir^^r) .état suivant par défaut
Data(pi00111111).Repeat 31 frames
Data(0)

[]->°FoxAirFront
Data(°AirFront1SprR^^r,°AirFront1Spr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAirFront1^^r) .état suivant par défaut
Data(pi00010011) .set chrono,3
Data(0)

[]->°FoxAirFront1
Data(°AirFront1SprR^^r,°AirFront1Spr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAirFront2^^r) .état suivant par défaut
Data(pi00100010).Repeat 2 frames
Data(0)

[]->°FoxAirFront2
Data(°AirFront2SprR^^r,°AirFront2Spr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAirFront1^^r) .état suivant par défaut
Data(pi00100010).Repeat 2 frames
Data(pi00000011,°FoxAir^^r).djz
Data(0)

[]->°FoxBackAir
Data(°BackAirSprR^^r,°BackAirSpr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAir^^r) .état suivant par défaut
Data(pi00000101)
    Data(1)        .flags
    Data(10)    .rad
    Data(0^^r)    .player state
    Data(0^^r)    .adv state
    Data(0,0)    .adv position
    Data(5)        .hitstun
    Data(15)    .damages
    Data(0)        .projdir
    Data(128,256^^r).projspeed
    Data(12,14)    .coords
Data(pi00101111).Repeat 15 frames
Data(0)

[]->°FoxDownAir
Data(°AirDown1SprR^^r,°AirDown1Spr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAirDown1^^r) .état suivant par défaut
Data(pi00010010) .set chrono,2
Data(0)

[]->°FoxAirDown1
Data(°AirDown1SprR^^r,°AirDown1Spr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAirDown2^^r) .état suivant par défaut
Data(pi00100011).Repeat 3 frames
Data(0)

[]->°FoxAirDown2
Data(°AirDown2SprR^^r,°AirDown2Spr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAirDown1^^r) .état suivant par défaut
Data(pi00100011).Repeat 3 frames
Data(pi00000011,°FoxAir^^r).djz
Data(0)

[]->°FoxNeutralAir
Data(°DashAttSprR^^r,°DashAttSpr^^r)
Data(0,0)
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAir^^r) .état suivant par défaut
Data(pi00000101)
    Data(1)        .flags
    Data(10)    .rad
    Data(0^^r)    .player state
    Data(0^^r)    .adv state
    Data(0,0)    .adv position
    Data(5)        .hitstun
    Data(15)    .damages
    Data(2)        .projdir
    Data(32,256^^r)    .projspeed
    Data(12,14)    .coords
Data(pi00101111).Repeat 15 frames
Data(0)

[]->°FoxUpSmash .met juste le chrono à 0
Data(°FoxLandSprR^^r,°FoxLandSpr^^r)
Data(0,0) .teleport
Data(°GroundNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°UpCharge^^r) .état suivant par défaut
Data(pi00010000) .set chrono,0
Data(0)

[]->°UpCharge
Data(°FoxLandSprR^^r,°FoxLandSpr^^r)
Data(0,0) .teleport
Data(°GroundNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°UpSmash1^^r) .état suivant par défaut
Data(pi011 11111,°UpSmash1^^r).ijx 31
Data(pi10000100,°UpCharge^^r) .if keyA
Data(0)

[]->°UpSmash1
Data(°UpSmash1SprR^^r,°UpSmash1Spr^^r)
Data(0,0) .teleport
Data(°AirNull)
Data(0^^r,~32^^r) .V
Data(0) .arrowkeys influence
Data(°UpSmash2^^r) .état suivant par défaut
Data(pi00100011).Repeat 3 frames
Data(0)

[]->°UpSmash2
Data(°UpSmash2SprR^^r,°UpSmash2Spr^^r)
Data(0,0) .teleport
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°UpSmash3^^r) .état suivant par défaut
Data(pi00000101)
    Data(1)        .flags
    Data(10)    .rad
    Data(0^^r)    .player state
    Data(0^^r)    .adv state
    Data(0,0)    .adv position
    Data(5)        .hitstun
    Data(15)    .damages
    Data(0)        .projdir
    Data(64,256^^r).projspeed
    Data(12,14)    .coords
Data(pi00100011).Repeat 3 frames
Data(0)

[]->°UpSmash3
Data(°UpSmash3SprR^^r,°UpSmash3Spr^^r)
Data(0,0) .teleport
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°UpSmash4^^r) .état suivant par défaut
Data(pi00000101)
    Data(1)        .flags
    Data(10)    .rad
    Data(0^^r)    .player state
    Data(0^^r)    .adv state
    Data(0,0)    .adv position
    Data(5)        .hitstun
    Data(15)    .damages
    Data(0)        .projdir
    Data(80,256^^r).projspeed
    Data(12,14)    .coords
Data(pi00100011).Repeat 3 frames
Data(0)

[]->°UpSmash4
Data(°UpSmash4SprR^^r,°UpSmash4Spr^^r)
Data(0,0) .teleport
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°UpSmash5^^r) .état suivant par défaut
Data(pi00000101)
    Data(1)        .flags
    Data(10)    .rad
    Data(0^^r)    .player state
    Data(0^^r)    .adv state
    Data(0,0)    .adv position
    Data(5)        .hitstun
    Data(15)    .damages
    Data(0)        .projdir
    Data(96,256^^r).projspeed
    Data(12,14)    .coords
Data(pi00100011).Repeat 3 frames
Data(0)

[]->°UpSmash5
Data(°FoxLandSprR^^r,°FoxLandSpr^^r)
Data(0,0) .teleport
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(0) .arrowkeys influence
Data(°FoxStand^^r) .état suivant par défaut
Data(pi00100011).Repeat 3 frames
Data(0)

[]->°FoxDashAttack
Data(°DashAttSprR^^r,°DashAttSpr^^r) .sprite
Data(0,0) .teleport
Data(°AbsX+°AbsY+°GroundNull)
Data(170^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxDash2^^r) .état suivant par défaut
Data(pi00000101)
    Data(1)        .flags
    Data(10)    .rad
    Data(0^^r)    .player state
    Data(0^^r)    .adv state
    Data(0,0)    .adv position
    Data(5)        .hitstun
    Data(15)    .damages
    Data(2)        .projdir
    Data(64,256^^r)    .projspeed
    Data(12,14)    .coords
Data(pi00101111).Repeat 15 frames
Data(0)

[]->°AirBlaster
Data(°BigA^^r,°BigA^^r) .sprite
Data(0,0) .téléportation
Data(°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxStand^^r) .état suivant par défaut
Data(0)

[]->°GroundBlaster
Data(°BigA^^r,°BigA^^r) .sprite
Data(0,0) .téléportation
Data(°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxStand^^r) .état suivant par défaut
Data(0)

[]->°AirIllusion
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AbsX+°AbsY+°AirNull) .WARNING cet état ne sert qu'à être pivoté, il passe sans plus de tests à AirIllusion2
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°AirIllusion2^^r) .état suivant par défaut
Data(0)

[]->°AirIllusion2
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°AirIllusion3^^r) .état suivant par défaut
Data(pi00101111).Repeat 15 frames
Data(0)

[]->°AirIllusion3
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(1024^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°AirIllusion4^^r) .état suivant par défaut
Data(pi10000010,°AirIllusionC^^r).si touche B, changestate AirIllusionC (Illusion Cancel)
Data(pi00100111).Repeat 7 frames
Data(0)

[]->°AirIllusion4
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(0^^r,~1^^r) .V
Data(0) .arrowkeys influence
Data(°Helpless^^r) .état suivant par défaut
Data(pi00101000).Repeat 8 frames
Data(0)

[]->°AirIllusionC
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsY+°AirNull)
Data(~105^^r,~1^^r) .V
Data(0) .arrowkeys influence
Data(°Helpless^^r) .état suivant par défaut
Data(pi00101000).Repeat 8 frames
Data(0)

[]->°Shine .seul état qui a une hitbox active TODO
Data(°GShine2SprR^^r,°GShine2Spr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsY+°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°AShine1^^r) .état suivant par défaut
Data(pi00010100) .set chrono,4
Data(pi00000100,°GShine1^^r) .OnGround
Data(0)

[]->°GShine1
Data(°GShine1SprR^^r,°GShine1Spr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°GroundOK) .WARNING Pas Null pour le Jump cancel
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°GShineEND^^r) .état suivant par défaut
Data(pi00000011,°GShine2^^r).djz
Data(pi10000010,°GShine1^^r).si touche B
Data(0)

[]->°GShine2
Data(°GShine2SprR^^r,°GShine2Spr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°GroundOK) .WARNING Pas Null pour le Jump cancel
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°GShineEND^^r) .état suivant par défaut
Data(pi01100100,°GShine1^^r).ijx 4
Data(pi10000010,°GShine2^^r).si touche B
Data(0)

[]->°GShineEND
Data(°GShine1SprR^^r,°GShine1Spr^^r) .sprite
Data(0,0) .téléportation
Data(°GroundNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxStand^^r) .état suivant par défaut
Data(pi00101111).Repeat 15 frames
Data(0)

[]->°AShine1
Data(°GShine1SprR^^r,°GShine1Spr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AirOK) .WARNING Pas Null pour le Jump cancel
Data(0^^r,°FoxGravity/4^^r) .V
Data(0) .arrowkeys influence
Data(°AShineEND^^r) .état suivant par défaut
Data(pi00000011,°AShine2^^r).djz
Data(pi10000010,°AShine1^^r).si touche B
Data(0)

[]->°AShine2
Data(°GShine2SprR^^r,°GShine2Spr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AirOK) .WARNING Pas Null pour le Jump cancel
Data(0^^r,°FoxGravity/4^^r) .V
Data(0) .arrowkeys influence
Data(°AShineEND^^r) .état suivant par défaut
Data(pi01100100,°AShine1^^r).ijx 4
Data(pi10000010,°AShine2^^r).si touche B
Data(0)

[]->°AShineEND
Data(°GShine1SprR^^r,°GShine1Spr^^r) .sprite
Data(0,0) .téléportation
Data(°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAir^^r) .état suivant par défaut
Data(pi00101111).Repeat 15 frames
Data(0)

[]->°FireFox
Data(°FireChargeSpR^^r,°FireChargeSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsY+°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FireFoxU^^r) .état suivant par défaut
Data(pi00111111).Repeat 31 frames
Data(pi10110000,°FireFoxDD^^r)
Data(pi11010000,°FireFoxDD^^r)
Data(pi10101000,°FireFoxDU^^r)
Data(pi11001000,°FireFoxDU^^r)
Data(pi10100000,°FireFoxS^^r)
Data(pi11000000,°FireFoxS^^r)
Data(pi10010000,°FireFoxD^^r)
Data(0)

[]->°FireFoxDU .diagonal up
Data(°FireDUSprR^^r,°FireDUSpr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AbsX+°AbsY+°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FireFoxDU2^^r) .état suivant par défaut
Data(0)

[]->°FireFoxDU2 .diagonal up
Data(°FireDUSprR^^r,°FireDUSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(181^^r,~181^^r) .V
Data(0) .arrowkeys influence
Data(°FireFoxS3^^r) .sert à ne pas sortir du Fire avec une vitesse X excessive
Data(pi00111111).Repeat 31 frames
Data(0)

[]->°FireFoxDD .diagonal down
Data(°FireDDSprR^^r,°FireDDSpr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AbsX+°AbsY+°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FireFoxDD2^^r) .état suivant par défaut
Data(0)

[]->°FireFoxDD2 .diagonal down
Data(°FireDDSprR^^r,°FireDDSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(181^^r,181^^r) .V
Data(0) .arrowkeys influence
Data(°FireFoxS3^^r) .sert à ne pas sortir du Fire avec une vitesse X excessive
Data(pi00111111).Repeat 31 frames
Data(0)

[]->°FireFoxU
Data(°FireUpSpr^^r,°FireUpSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(0^^r,~256^^r) .V
Data(128) .arrowkeys influence
Data(°FireFoxUEND^^r) .état suivant par défaut
Data(pi00111110).Repeat 30 frames
Data(0)

[]->°FireFoxUEND
Data(°FireUpSpr^^r,°FireUpSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(0^^r,~256^^r) .V
Data(0) .arrowkeys influence
Data(°PivotHelpless^^r) .état suivant par défaut
Data(0)

[]->°FireFoxD
Data(°FireDownSpr^^r,°FireDownSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(0^^r,256^^r) .V
Data(0) .arrowkeys influence
Data(°PivotHelpless^^r) .état suivant par défaut
Data(pi00111111).Repeat 31 frames
Data(0)

[]->°FireFoxS
Data(°FireChargeSpR^^r,°FireChargeSpr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AbsX+°AbsY+°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FireFoxS2^^r) .état suivant par défaut
Data(0)

[]->°FireFoxS2
Data(°FireSideSprR^^r,°FireSideSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(256^^r,~2^^r) .V
Data(0) .arrowkeys influence
Data(°FireFoxS3^^r) .état suivant par défaut
Data(pi00111111).Repeat 31 frames
Data(0)

[]->°FireFoxS3 .sert à ne pas sortir de FireFox avec une vitesse X excessive
Data(°FireSideSprR^^r,°FireSideSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°AbsY+°AirNull)
Data(128^^r,~2^^r) .V
Data(0) .arrowkeys influence
Data(°Helpless^^r) .état suivant par défaut
Data(0)

[]->°FoxStand .état debout normal
Data(°FoxStandSprR^^r,°FoxStandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°GroundOK)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxStand^^r) .état suivant par défaut
Data(0)

[]->°FoxDash
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AbsX+°GroundDash)
Data(200^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxDash2^^r) .état suivant par défaut
Data(pi11000000,°FoxDash^^r) .si touche backward, changestate FoxDash (dashdance)
Data(pi00100111).Repeat 7 frames
Data(pi00011111).set chrono,15
.si touche forward, changestate FoxDash2
Data(0)

[]->°FoxDash2
Data(°FoxDash2SprR^^r,°FoxDash2Spr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°GroundDash)
Data(170^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxDashEND^^r) .état suivant par défaut
Data(pi00000011,°FoxDash3^^r).djz FoxDash3
Data(pi10100000,°FoxDash2^^r).si touche forward, changestate FoxDash2
Data(0)

[]->°FoxDash3
Data(°FoxDash1SprR^^r,°FoxDash1Spr^^r) .sprite
Data(0,0) .téléportation
Data(°AbsX+°GroundDash)
Data(170^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxDashEND^^r) .état suivant par défaut
Data(pi01101111,°FoxDash2^^r).ijx 15,FoxDash2
Data(pi10100000,°FoxDash3^^r).si touche forward, changestate FoxDash3
Data(0)

[]->°FoxDashEND
Data(°FoxBrakeSprR^^r,°FoxBrakeSpr^^r) .sprite
Data(0,0) .téléportation
Data(°GroundOK)
Data(~5^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxStand^^r) .état suivant par défaut
Data(pi00101111) .Repeat 15 frames
Data(0)

[]->°FoxJump .état Jump (encore au sol avant de sauter)
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AirOK)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxShortHop^^r) .état suivant par défaut
Data(pi10000100,°FoxUpSmash^^r)
Data(pi00100011) .Repeat 3 frames
Data(pi10001000,°FoxHighHop^^r)
Data(0)

[]->°FoxAirJump
[]->°FoxHighHop .état Jump qui donne l'impulsion
Data(°BigD1^^r,°BigD1^^r) .sprite
Data(0,0) .téléportation
Data(°AirOK+°AbsY)
Data(0^^r,~450^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAir^^r) .état suivant par défaut
Data(0)

[]->°FoxShortHop .état Jump qui donne l'impulsion
Data(°BigD1^^r,°BigD1^^r) .sprite
Data(0,0) .téléportation
Data(°AirOK+°AbsY)
Data(0^^r,~256^^r) .V
Data(0) .arrowkeys influence
Data(°FoxAir^^r) .état suivant par défaut
Data(0)

[]->°FoxAir
Data(°FoxFallSprR^^r,°FoxFallSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AirOK)
Data(0^^r,°FoxGravity^^r) .V
Data(6) .arrowkeys influence
Data(°FoxAir^^r) .état suivant par défaut
Data(0)

[]->°PivotHelpless
Data(°HelplessSprR^^r,°HelplessSpr^^r) .sprite
Data(0,0) .téléportation
Data(°Piv+°AirNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°Helpless^^r) .état suivant par défaut
Data(0)

[]->°Helpless
Data(°HelplessSprR^^r,°HelplessSpr^^r) .sprite
Data(0,0) .téléportation
Data(°AirNull)
Data(0^^r,°FoxGravity^^r) .V
Data(6) .arrowkeys influence
Data(°Helpless^^r) .état suivant par défaut
Data(0)

[]->°FoxLand .Landing Lag
Data(°FoxLandSprR^^r,°FoxLandSpr^^r) .sprite
Data(0,0) .téléportation
Data(°GroundNull)
Data(0^^r,0^^r) .V
Data(0) .arrowkeys influence
Data(°FoxStand^^r) .état suivant par défaut
Data(pi00100111) .Repeat 7 frames
Data(0)

And I need to retract a constant to every "[]→", so I don't feel like doing things like
[]→°TEMP
°TEMP-°CST1→°CST2
for each of them :P

edit Alternatively, is there a way to "compile with .org 0" ?
« Last Edit: August 26, 2014, 11:49:04 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: Features Wishlist
« Reply #3397 on: August 26, 2014, 12:39:39 pm »
For now, we can do this
[]→°CST
°CST1-°CST2→°CST3

But we can't do this:
[]-°CST1→°CST2

Could this possibility be added ? Basically, I have this file
Spoiler For Spoiler:
*See Hayleia's original message*
And I need to retract a constant to every "[]→", so I don't feel like doing things like
[]→°TEMP
°TEMP-°CST1→°CST2
for each of them :P

edit Alternatively, is there a way to "compile with .org 0" ?

For the time being, can't you generate the data in assembly (thus allowing you the use of .org 0) and then include it in Axe with the command Asm( ? Otherwise, the possibility of using constants this way is a good idea. By the way, your game looks nice !
I'm french, that's the reason why my English can be a bit approximate.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Features Wishlist
« Reply #3398 on: August 26, 2014, 01:09:04 pm »
Well yeah, I could theoretically rewrite that in assembly and use spasm... but given the size of the file already, you understand why I ask if there's an "easy" solution ;)
Actually, I could maybe add the "-°CST1" in my code since it is always the same constant for everyone. It would just waste an addition.

And thanks :D
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: Features Wishlist
« Reply #3399 on: August 27, 2014, 05:11:39 am »
Well yeah, I could theoretically rewrite that in assembly and use spasm... but given the size of the file already, you understand why I ask if there's an "easy" solution ;) Actually, I could maybe add the "-°CST1" in my code since it is always the same constant for everyone. It would just waste an addition.And thanks :D

Yes, of course, I understand ! If your problem can be solved by only writing -°CST1 from times to times, then it's easier. Even though it'd have been better to generate the data in assembly, because you would have been able to define constants and flags with #define, and the data would have been more readable. (The only problem being then to copy by hand all the data generated in assembly into the Axe source.)

Moreover, it shouldn't waste an addition in the compiled program : doing math with constants is parsed by Axe and only the result is put in the compiled program each time you use the constant.
I'm french, that's the reason why my English can be a bit approximate.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Features Wishlist
« Reply #3400 on: August 27, 2014, 06:20:36 am »
It doesn't waste anything if I add an constant to another constant, but it does waste if I add a constant to a calculation that doesn't end with a constant addition.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: Features Wishlist
« Reply #3401 on: August 27, 2014, 06:33:44 am »
It doesn't waste anything if I add an constant to another constant, but it does waste if I add a constant to a calculation that doesn't end with a constant addition.
Yes, indeed. But in your case (°CST1-°CST2→°CST3), it only wastes some bytes in the source program.



Talking about assembly, Axe Parser could also allow inserting text inside the Asm( command (interpreted as chars, not tokens). Currently, if I want to do this : Asm(..."HELLO!"...), I have to write Asm(...('H')r('e')r('l')r('l')r('o')r('!')r...), which is not very convenient !
I'm french, that's the reason why my English can be a bit approximate.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Features Wishlist
« Reply #3402 on: August 27, 2014, 01:23:28 pm »
It doesn't waste anything if I add an constant to another constant, but it does waste if I add a constant to a calculation that doesn't end with a constant addition.
Yes, indeed. But in your case (°CST1-°CST2→°CST3), it only wastes some bytes in the source program.
The thing is that I won't do "°CST1-°CST2→°CST3" because then this would require one more constant (the °CST1) and one more line for each [] I have (instead of []-°CST1→°CST3 I'd have to do []→°CST2:°CST1-°CST2→°CST3), which would be very annoying. A []-°CST1→°CST2 would be a lot less annoying. A .org would be even less annoying.

Actually, I see a lot of potential for that .org command O.O
That would help me with my data, and this would also allow people to write ramcodes very easily, even ones using absolute jumps.
edit the token used could be the same as #Realloc but with a r.
« Last Edit: August 27, 2014, 01:27:30 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Zemmargorp

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 115
  • Rating: +7/-2
  • Either programming or thinking of it.
    • View Profile
Re: Features Wishlist
« Reply #3403 on: August 27, 2014, 02:58:40 pm »
Actually, I see a lot of potential for that .org command O.O
That would help me with my data, and this would also allow people to write ramcodes very easily, even ones using absolute jumps.
edit the token used could be the same as #Realloc but with a r.

So you'd like to see this command added to Axe ? #Reallocr being the equivalent of .org 0 ? Why not, it could be very useful... and it's also getting very low level  ;D  ! But another token should be used, with an opening parenthesis, to allow reallocating at any address (not only 0).
I'm french, that's the reason why my English can be a bit approximate.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Features Wishlist
« Reply #3404 on: August 28, 2014, 01:17:01 am »
No, #Realloc already has an opening parenthesis so #Realloc(0)r would be .org 0 and you could do #Realloc(L3)r if you wanted :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s