Personaje
#10
I have attempted to fix a few bugs in this program I offered latest. The update is in post #9 which is:

https://staging.qb64phoenix.com/showthre...4#pid12964


Unfortunately on Linux I came across a "don't want to work" type of situation in the "loaddraw2" subprogram. Upon getting a non-zero value for "ustrip" second parameter, it has to load the text file twice. The first time to search for underscores to determine which is the true left-hand margin of the picture, and the second to actually load and display the text-file image.

The search turns out 16 as the correct value for "x". The problem is that the block below the search doesn't want to execute the line with "mid$()". (shrugs).


Sending this at command line:

Code: (Select All)
$ ./quickdraw cooky.txt --strip


Use this as the input file (called "cooky.txt"):

Code: (Select All)
___________________________________@@@@
________________________________@@@    @@@@@@@@
_____________________________@@                @@@
_________________________@@@@                     @@@@@
_______________________@@                             @@@
______________________@@                                 @
_____________________@                                   @@
____________________@                                      @@
____________________@                                       @@
___________________@@                                         @
__________________@@                                          @@
__________________@                                            @
_________________@                                             @@
_________________@                                              @@
________________@@                                               @
________________@                                                @
________________@                                                @
_______________@                                                @
________________@                                               @
________________@                                              @
________________@                                              @
_________________@                                            @@
_________________@                                           @@
___________________@@                                        @
_____________________@@                                     @
________________________@                                @@@
_________________________@@                            @@
___________________________@@@                      @@
______________________________@@               @@@@@
________________________________@@@@@@@  @@@@@@
_______________________________________@@


It was tried, near the very bottom of the whole source code:

Code: (Select All)
if ustrip then
        ff = freefile
        open afile for input as ff
        do until eof(ff)
            line input #ff, b$
            locate y, 1
                print mid$(b$, x);
            y = y + 1
            if y > 48 then exit do
        loop
        close ff
    else
        ff = freefile
        open afile for input as ff
        do until eof(ff)
            line input #ff, b$
            locate y, 1
                print b$;
            y = y + 1
            if y > 48 then exit do
        loop
        close ff
    end if

as well as:

Code: (Select All)
ff = freefile
    open afile for input as ff
    do until eof(ff)
        line input #ff, b$
        locate y, 1
        if ustrip then
            print mid$(b$, x);
        else
            print b$;
        end if
        y = y + 1
        if y > 48 then exit do
    loop
    close ff


So I need this tested on Windows to see if it works like it should.
Reply


Messages In This Thread
Personaje - by mnrvovrfc - 01-20-2023, 04:24 PM
RE: Personaje - by bplus - 01-20-2023, 05:44 PM
RE: Personaje - by mnrvovrfc - 01-20-2023, 08:36 PM
RE: Personaje - by bplus - 01-20-2023, 09:41 PM
RE: Personaje - by mnrvovrfc - 01-20-2023, 09:56 PM
RE: Personaje - by bplus - 01-20-2023, 10:54 PM
RE: Personaje - by mnrvovrfc - 01-21-2023, 12:27 PM
RE: Personaje - by mnrvovrfc - 01-21-2023, 02:27 PM
RE: Personaje - by mnrvovrfc - 01-22-2023, 07:55 PM
RE: Personaje - by mnrvovrfc - 01-22-2023, 10:01 PM
RE: Personaje - by SMcNeill - 01-23-2023, 07:21 PM
RE: Personaje - by mnrvovrfc - 01-23-2023, 09:06 PM
RE: Personaje - by bplus - 01-24-2023, 01:33 AM
RE: Personaje - by bplus - 01-24-2023, 02:42 AM
RE: Personaje - by bplus - 01-24-2023, 03:28 AM
RE: Personaje - by bplus - 01-25-2023, 01:20 PM
RE: Personaje - by bplus - 01-25-2023, 01:31 PM
RE: Personaje - by mnrvovrfc - 01-25-2023, 02:32 PM
RE: Personaje - by bplus - 01-25-2023, 03:24 PM
RE: Personaje - by mnrvovrfc - 01-25-2023, 04:26 PM
RE: Personaje - by bplus - 01-25-2023, 04:34 PM
RE: Personaje - by mnrvovrfc - 01-25-2023, 08:04 PM
RE: Personaje - by bplus - 01-26-2023, 05:31 PM
RE: Personaje - by mnrvovrfc - 01-29-2023, 03:33 AM
RE: Personaje - by mnrvovrfc - 01-30-2023, 09:50 AM



Users browsing this thread: 9 Guest(s)