ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Nov 27, 2020 10:39 pm

All times are UTC




Post new topic  Reply to topic  [ 613 posts ]  Go to page Previous 127 28 29 30 31
Author Message
PostPosted: Thu Oct 15, 2020 1:14 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 353
QuickBMS re-set variables that contain asize? but i don't think so (those variables that have a real block like byte short long can resize always, problem is those variables that created by hand with math and xmath, like math OFFSET = 208 or xmath SIZE "NEXT_OFFSET - OFFSET")

and about asize problem, maybe you can add a function to log that resize all of savepos variables that are >= than log offset variable


Top
   
PostPosted: Thu Oct 15, 2020 11:17 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11822
In the tests I did when I implemented the reverse math operations in reimporting, they worked.
asize is something that I don't want to touch because when I touched it few weeks ago it introduced a bug.
So it's better for me to keep everything as-is ;)


Top
   
PostPosted: Fri Oct 16, 2020 5:46 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11822
New beta, I mainly fixed some bugs introduced in the previous beta.


Top
   
PostPosted: Sat Oct 17, 2020 1:47 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 353
asize works fine
you right sir aluigi, savepos will be a real mess if touched, must be adjust in script with more coding


but xmath SIZE "NEXT_OFFSET - OFFSET" and math still has problem
and let's say it's not a problem at all! becuase it can be fixed
xmath and math working good
thank you
Code:
xmath SIZE "NEXT_OFFSET - OFFSET"

get BEFORE_REIMPORT_ASIZE asize
log NAME OFFSET SIZE
get AFTER_REIMPORT_ASIZE asize #input file size will be changed in reimporting

xmath ASIZE_CHANGING "AFTER_REIMPORT_ASIZE  - BEFORE_REIMPORT_ASIZE"
math SIZE + ASIZE_CHANGING #ASIZE_CHANGING can be negative or positive


we can do same job for savepos OFFSET too


Top
   
PostPosted: Thu Oct 22, 2020 4:58 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11822
Honestly I don't think I can do much on that, it seems a mess and as far as I know reimporting of math/xtmath works perfectly with normal archives, I suppose the problem there is just with sequential files.

I just uploaded a new beta.
The main feature is the -e option that when used in reimport2 allows to disable the compression of the imported file.

For example if you want to reimport the Neptunia Rebirth files, you can't because there is no algorithm for recompressing the originally compressed data.
While now it works if the reimport2 mode is used with the -e option (also available in quickbmsver in the script).
(Neptunia is only an example because there are rebuilders as far as I know)


Top
   
PostPosted: Sat Oct 24, 2020 6:30 pm 
User avatar

Joined: Sun Aug 10, 2014 9:22 am
Posts: 41
2020 keep me away from programming .
Also All pcs turned into 64 bits that are so expensive in fully equipped configuration !
Just looking for good Omen in new year ...
69 days countdown to year 2021

Also Best Wishes for You Luigi Auriemma !


Top
   
PostPosted: Tue Nov 17, 2020 8:44 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11822
Not really a feature but I'm finally making an example for the operators of the String command:
Code:
+   append
      MyStringExampleString!STRING
      MyStringExampleString!3
      MyStringExampleString!-3
-   remove, truncate
      MyExample!
      MyStringExampleStri
      MyS
^   xor
      -=<.=31/*#87:5::5h
      ~J`GAZ]TvKR^C_V`GAZ]T
      `J~G_ZCThKL^]_H`YAD]J
<   strrstr + var2 (before)
      MyStringExampleString
      tringExampleString!
      ng!
*   replicate
      MyString
      MyStringExampleString!MyStringExampleString!MyStringExampleString!
      MyStringExampleString!MyS
%   strstr (before), truncate, mod
      My
      M
      MyStringExampleString
&   strstr
      StringExampleString!
      MyStringExampleString!
      MyStringExampleString!
|   strstr + var2
      ExampleString!
      MyStringExampleString!
      MyStringExampleString!
$   strrstr
      String!
      MyStringExampleString!
      MyStringExampleString!
!   strrstr + var2
      !
      MyStringExampleString!
      MyStringExampleString!
>   strrstr (before)
      MyStringExample
      MyStringExampleStri
      MyStringExampleString!

The examples are based on the following variables:
Code:
VAR1 is MyStringExampleString!
VAR1 is 22 bytes
VAR2 is STRING
NUM  is 3
NEG  is -3

The operators + ^ | $ ! don't support numeric VAR2.
The 3 examples provided for each operator are just the results with a VAR2 string, positive number and negative number.

Currently the only problem is with VAR2 being a string starting with a number like "3x" because it will be handled as a number causing wrong results:
string VAR - "3" = ok because "3" is handled as a constant
set VAR2 string "3" ; string VAR - VAR2 = fail

I'm still working on it since the numeric "%" is confusing and useless (when are we going to use it?) so I was thinking about leaving it as string only.

Open to suggestions.


Top
   
PostPosted: Thu Nov 26, 2020 11:21 pm 
User avatar

Joined: Sat Mar 14, 2020 7:17 pm
Posts: 36
Hi, I don't know here is right place to tell or not
I think QuickBMS can really use some color in commend line output (in error message and other etc.), for example when some one try to print a text when a error happened it can simply lost among other outputs, but if we have something like
print "error %error_code%" [red/green]
its make it easier to find the error
I know its not a important thing, but its help in read the output


Top
   
PostPosted: Fri Nov 27, 2020 3:12 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 353
you can make it like this
Code:
print "\n\n\nERROR!!\nerror: %error_code%\n\n\n"


Top
   
PostPosted: Fri Nov 27, 2020 9:18 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11822
I like the idea of using colors, the usual problems are the escapes and the format.
Let's say I use [red] and [/red] to go back, it sounds good to me.
And also [b] for higher intensity.
I can also change the background color but I don't know what may be the good tag to use.

We need a simple tag to change (and mix) them

This is the method currently used in a function of quickbms for setting the colors:
Code:
'o': color |= original
'0': color |= original

'r': color |= FOREGROUND_RED
'g': color |= FOREGROUND_GREEN
'b': color |= FOREGROUND_BLUE
'i': color |= FOREGROUND_INTENSITY

'R': color |= BACKGROUND_RED
'G': color |= BACKGROUND_GREEN
'B': color |= BACKGROUND_BLUE
'I': color |= BACKGROUND_INTENSITY

'x': original (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
So it's easy for me to build all the combos but it may not be easy for people, [rgb] [ri] and so on.


Top
   
PostPosted: Fri Nov 27, 2020 10:43 am 
User avatar

Joined: Sat Mar 14, 2020 7:17 pm
Posts: 36
aluigi wrote:
I like the idea of using colors, the usual problems are the escapes and the format.
Let's say I use [red] and [/red] to go back, it sounds good to me.
And also [b] for higher intensity.
I can also change the background color but I don't know what may be the good tag to use.

We need a simple tag to change (and mix) them

This is the method currently used in a function of quickbms for setting the colors:
Code:
'o': color |= original
'0': color |= original

'r': color |= FOREGROUND_RED
'g': color |= FOREGROUND_GREEN
'b': color |= FOREGROUND_BLUE
'i': color |= FOREGROUND_INTENSITY

'R': color |= BACKGROUND_RED
'G': color |= BACKGROUND_GREEN
'B': color |= BACKGROUND_BLUE
'I': color |= BACKGROUND_INTENSITY

'x': original (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)
So it's easy for me to build all the combos but it may not be easy for people, [rgb] [ri] and so on.


what about mixing both foreground and background in a hexadecimal digits like how cecho do it?
or simply use {red on blue} for make it easer

Image
cecho source


Top
   
PostPosted: Fri Nov 27, 2020 10:56 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11822
I'm going to release the beta quickbms.exe with the new feature in about 10 minutes:
https://aluigi.altervista.org/beta/quickbms_exe.zip

Example:
Code:
print "Hello, [bi]how are you?[]\n[RGBIri]Fine![] ... [I]also this [g]closing[/g] works"


The only doubt is about [] when used for non-color purposes.
Let's say I want to write "The variable VAR[] is invalid", it will just write VAR instead of VAR[], same for VAR[i].
It's very rare but some people may use that text in their print messages.

My solution was increasing the range of escaped characters for supporting other languages, therefore [] are now supported in all the cstring notation ;)

@saeid0034
it's the first time I see that notation and it looks a bit complicated rather than just RGB


Top
   
PostPosted: Fri Nov 27, 2020 3:56 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11822
Another beta is out.
I even addded (experimental) regex support for findloc.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 613 posts ]  Go to page Previous 127 28 29 30 31

All times are UTC


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 post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited