Author Topic: There are many ways to go to Rome.  (Read 53424 times)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: There are many ways to go to Rome.
« Reply #15 on: February 12, 2019, 04:14:14 pm »
Thank you, my friend! Now I've got me something to play with tonight. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #16 on: February 12, 2019, 04:23:50 pm »
Forgot to say how to use it:

Use drag and drop of one or several folder(s) with audio files.
click with the left or right mouse button to switch from one plugin to another (when plugin is enabled, or it will change the background).
To move from one song to another press on the auto/hide arrow (sprite object).
To move within the song use the small yellow animation seek pointer.
To adjust the audio level click on the dot line above the word BASSBOX.
You can setup the equalizer from the popup menu.

BB64 was my first real GDImage/WinLIFT 64-bit application ever written in C++ with Visual Studio.

« Last Edit: February 12, 2019, 04:35:17 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #17 on: February 13, 2019, 06:18:44 pm »
What are the icons you would like to see on the rubber band?
Just give me their tooltip description, i shall take care of the icons myself.
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #18 on: February 20, 2019, 10:12:03 am »
Current status:

02-20-2019
The merging of Tor inside of OR has been done, now i have to let them coexist peacefully …

02-21-2019
See the attached screen shot to better figure how it looks in split mode.

02-24-2019
I have added the toolwindow icon selector, anchored to the right side of gP.hMain, but i don't know yet if we will have a real use of it.
« Last Edit: February 24, 2019, 10:52:39 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: There are many ways to go to Rome.
« Reply #19 on: February 24, 2019, 04:25:58 pm »
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #20 on: February 25, 2019, 07:48:32 pm »
02-25-2019
It begins to smell good…

And now i shall have to wait for your return for the next step(s).  8)
Patrice
(Always working with the latest Windows version available...)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #21 on: February 26, 2019, 06:00:44 pm »
03-26-2019
Working on the ZIP file with all the latest goodies, and the new graphic components.

Tor added 37 Kb to the OR binary, that is not that much when looking at the massive amount of C++ source code that has been moved in.

Added:
The zip file with all my changes is attached to this post...
« Last Edit: February 26, 2019, 08:11:47 pm by Michael Lobko-Lobanovsky »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: There are many ways to go to Rome.
« Reply #22 on: February 26, 2019, 08:12:42 pm »
Thank you very much, Patrice!

I'll be able to look into your code tomorrow afternoon. See you soon! :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #23 on: February 26, 2019, 09:49:49 pm »
Welcome back my friend!

Note: There are still some more issues that i have to fix in the code, for example the (F2) color picker drag and drop is broken.
I shall fix them in the next coming days, indeed... you come back too early  ;D

Added:
02-27-2019 at 11:20 am
The GDImageCallback problem causing the havoc with both F1 and F2 has been solved.
Looking now for two other minor problems.

02-27-2019 at 3:11 pm
Here is the patch to solve the problems i have detected.
« Last Edit: February 27, 2019, 07:26:26 pm by Michael Lobko-Lobanovsky »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: There are many ways to go to Rome.
« Reply #24 on: February 27, 2019, 07:34:28 pm »
Done assimilating the new mods, my friend! Isn't that a great job you've done!

My OR now looks like a Christmas tree full of yummies, wonders , and magic! :D

With just one note: we absolutely must have immediate access to the mesh list (or rather treeviewlist) at all times to be able to select an individual mesh (and ultimately, a group of vertices) to work on immediately.

Do you think we can still squeeze it in the current tor setup?
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #25 on: February 27, 2019, 07:50:29 pm »
Quote
we absolutely must have immediate access to the mesh list (or rather treeviewlist) at all times to be able to select an individual mesh
See the attached video.
« Last Edit: February 27, 2019, 09:46:46 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: There are many ways to go to Rome.
« Reply #26 on: February 27, 2019, 07:59:28 pm »
!!! OH MY GAWWWWWD !!! :o :o :o :o

!!! THIS IS AWESOME !!!
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #27 on: February 28, 2019, 07:01:27 pm »
Mike

Here is a code example, to show you how to create on the fly a complex GDImage polypolygon, and add it to gT.hZoomCtrl, just the same than using drag and drop from gT.hMarkerParent.

Code: [Select]
void UsaMap() {
    // USA map xy coordinates
    POINTS xy[] = {146,218,166,224,168,230,162,235,168,240,175,236,175,224,175,206,244,216,350,222,
                   468,210,500,203,518,210,529,205,546,210,573,207,554,235,566,232,570,236,577,233,
                   585,243,591,243,606,240,616,253,618,259,613,265,618,262,622,291,629,299,628,310,
                   637,317,644,308,644,287,637,272,633,253,641,250,639,242,647,229,663,233,670,242,
                   673,250,666,259,666,266,673,271,678,261,683,258,691,272,687,283,686,295,691,298,
                   703,297,730,269,733,259,731,248,747,240,755,237,759,220,766,198,792,188,810,176,
                   814,161,812,138,813,131,829,128,842,147,855,152,852,168,840,176,841,185,833,189,
                   833,203,830,214,838,218,833,227,844,228,851,224,852,231,846,236,840,236,840,244,
                   831,251,837,254,830,265,814,277,816,291,813,304,802,306,809,314,814,325,810,329,
                   811,337,807,343,804,336,806,328,796,319,791,306,788,305,786,319,794,324,792,329,
                   800,336,801,345,795,347,802,352,806,349,813,352,815,359,811,368,823,370,818,383,
                   811,381,812,389,818,388,821,390,809,399,803,412,795,416,794,423,791,435,775,459,
                   775,464,776,478,772,489,781,497,783,513,797,531,809,545,819,567,820,575,814,592,
                   809,592,803,588,801,581,791,576,772,557,770,547,767,546,763,531,747,517,735,517,
                   727,526,719,525,703,517,682,523,677,525,673,520,669,523,661,527,652,535,649,540,
                   656,541,652,549,663,557,662,559,648,552,645,553,649,557,640,560,634,560,622,551,
                   614,551,611,556,603,559,599,552,589,554,581,559,574,555,567,555,563,558,572,560,
                   574,564,555,585,547,584,548,593,536,600,534,613,531,616,537,630,538,639,516,636,
                   506,626,502,613,502,608,494,608,475,583,457,573,450,576,440,590,429,592,418,581,
                   411,565,385,543,383,541,358,542,354,547,340,546,309,548,253,526,254,522,212,522,
                   206,505,189,489,168,480,148,442,150,431,144,426,147,421,149,421,150,415,141,414,
                   130,392,128,380,129,364,134,347,132,328,133,314,145,291,151,259,153,237,147,226};
    short XYcount = (sizeof(xy) / sizeof(xy[0]));
    long K = 0;
    short BorderSize = 5, minx = 9999, miny = 9999, maxx = -9999, maxy = -9999;
    for (K = 0; K < XYcount; K++) {
        minx = min(xy[K].x, minx);
        miny = min(xy[K].y, miny);
        maxx = max(xy[K].x, maxx);
        maxy = max(xy[K].y, maxy);
    }
    long nW = maxx - minx, nH = maxy - miny;
    for (K = 0; K < XYcount; K++) {
        xy[K].x -= minx; xy[K].x += BorderSize / 2;
        xy[K].y -= miny; xy[K].y += BorderSize / 2;
    }
    nW += BorderSize; nH += BorderSize;

    const long nCount = 2;
    ZOBJECT arrayobj[nCount]; ClearMemory(&arrayobj[0], sizeof(arrayobj));
    ZI_CreatePolyLineObject (arrayobj[0], &xy[0], XYcount, ZD_ColorARGB(128, RGB(128,0,0)), BorderSize, ZS_VISIBLE | ZS_DRAFT, ZD_DRAW_FILLED, 0);
    ZI_CreatePolyLineObject (arrayobj[1], &xy[0], XYcount, ZD_ColorARGB(255, RGB(100,250,150)), BorderSize, ZS_VISIBLE | ZS_DRAFT, ZD_DRAW_OUTLINE, 0);
    WCHAR zFile[MAX_PATH]; ClearMemory(zFile, sizeof(zFile));
    Path_Combine(zFile, zGetTempPath(), L"zBidon.png");
    ZI_CreateImageComposited(zFile, nW, nH, arrayobj, nCount);

    HBITMAP hBitmap = ZI_CreateBitmapFromFile(zFile, nW, nH);

    if (hBitmap) {

        long top_left_X = 100, top_left_Y = 100;

        WCHAR szDrive[_MAX_DRIVE] = {0}, szDir[MAX_PATH] = {0}, szName[_MAX_FNAME] = {0}, szExt[_MAX_EXT] = {0};
        wsplitpath(zFile, szDrive, szDir, szName, szExt);
        long newID = IncrID(); // Increment ID and ga_Sprite array
        // In order to save memory, we detect if we have used already the same sprite
        long nIDtoClone = 0;
        long nSpriteCount = UBOUND(ga_Sprite) - 1;
        for (K = 0; K < nSpriteCount; K++) {
            if (_wcsicmp(ga_Sprite[K].filename, zFile) == 0) {
                if (ga_Sprite[K].clone == 0) {
                    if (ga_Sprite[K].id) { // We found one
                        nIDtoClone = ga_Sprite[K].id; break;
                    }
                }
            }
        }
        if (nIDtoClone) { // Get rid of the bitmap to save memory, and clone nIDtoClone.
            DeleteObject(hBitmap);
            CloneObject(newID, $NULL, top_left_X, top_left_Y, nIDtoClone);
            // Because this is a clone, assign a new set of properties to it (else we inherit everyting from the original).
            ZD_SetObjectRotation(newID, 0);
            ZD_SetObjectFlipMode(newID, 0);
            ZD_SetObjectAngle(newID, 0, 0);
            ZD_SetObjectScale(newID, 0);
            ZD_SetObjectAlpha(newID, 255, FALSE);
            ZD_SetObjectFlipMode(newID, ZD_GetObjectFlipMode(newID));
            ZD_SetObjectVisibility(newID, ZS_VISIBLE);
        } else { // We must use this bitmap.
            ZD_DrawBitmapToCtrl(gT.hZoomCtrl, top_left_X, top_left_Y, hBitmap, ZD_ColorARGB(255, 0), newID, ZS_VISIBLE);
        }
        ZD_SetObjectImageLabel(newID, szName);

        ZD_SetObjectScroll(newID, TRUE);
        ZD_SetObjectQuality(newID, gT.UseQuality, FALSE);
        SpriteArrayInit(newID, gT.szdropname);     // Initialize the global Sprite array
        ZI_UpdateWindow(gT.hZoomCtrl, FALSE);      // Show new sprite
//        ShowSaveButton();
    }
    zKillFile(zFile);
}

We could use each xy[] POINTS as hot spot to redraw the polypolygon on the fly.

If you want i can send you a Tor.cpp with a TEST button to try it out.
« Last Edit: February 28, 2019, 07:39:22 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 1481
Re: There are many ways to go to Rome.
« Reply #28 on: March 01, 2019, 06:47:34 am »
Quote
If you want i can send you a Tor.cpp with a TEST button to try it out.

Please do. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • zapsolution
Re: There are many ways to go to Rome.
« Reply #29 on: March 01, 2019, 09:16:37 am »
Here it is…

Note:
You must select a texture from the contact sheet, before pressing the new [Test] button.


« Last Edit: March 01, 2019, 09:36:47 am by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)