Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, AndrewAMD), 833 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 545 of 554 1 2 543 544 545 546 547 553 554
Re: What are you working on? [Re: Emre] #478187
09/18/19 09:40
09/18/19 09:40
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
Never tested this on another PC. I am not that familar with dll compiling. Could be, that I messed something up in the linker and referenced some dependencies that are not there.

Thank you Emre for rebuilding.

Re: What are you working on? [Re: ratchet] #478188
09/18/19 09:52
09/18/19 09:52
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
i hope not. if this is the case, my rebuilt dll will not work on another pc either. laugh Because i just simply build the project after changing the project settings based on my system. (change sdk paths and delete post build command events.)

Re: What are you working on? [Re: Emre] #478189
09/18/19 10:08
09/18/19 10:08
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
Ah ok, I have an old Windows XP PC here, I will test it with that later this week and try to limit dependecies / bzw include them into the project when licensing allows redistribution.

Re: What are you working on? [Re: ratchet] #478190
09/18/19 10:34
09/18/19 10:34
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 146
RP China
If you want to distribute your DLL to other people, it might be a good idea to change Properties / C/C++ / Code Generation / Runtime Library from Multi-threaded DLL (/MD) to Multi-threaded (/MT). Otherwise your users won't be able to use the DLL without installing the VC++ Runtime Redistributable before - one of the funny ideas by Microsoft to make life more interesting.

Re: What are you working on? [Re: ratchet] #478191
09/18/19 10:49
09/18/19 10:49
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 146
RP China
@jenGs @Emre

I installed Microsoft Visual Studio 2010 do nothing. The example is runing. So, I think problem is Multi-threaded (/MT) and some lib support and publish dll.

Re: What are you working on? [Re: 20BN] #478192
09/18/19 10:55
09/18/19 10:55
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
i didn't know that. Thank you for information 20BN!

Re: What are you working on? [Re: ratchet] #478193
09/18/19 11:51
09/18/19 11:51
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 146
RP China
@jenGs @Emre

Can you provide some examples of lite-c scripts for IMGUI? I want to learn how they are created.
Checkbox, Listbox, Slider and set Child / Group, etc.

Re: What are you working on? [Re: 20BN] #478196
09/18/19 13:00
09/18/19 13:00
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
Originally Posted by 20BN
@jenGs @Emre

Can you provide some examples of lite-c scripts for IMGUI? I want to learn how they are created.
Checkbox, Listbox, Slider and set Child / Group, etc.


Yes of course. Here is little example. it' not include all code but i'm sure it will help.

Code
#include <acknex.h>
#include <default.c>
#define PRAGMA_PATH "%EXE_DIR%\templates\images";
#define PRAGMA_PATH "%EXE_DIR%\samples";
#define PRAGMA_PATH "imgui_header"
#include "imgui.h"


//sky_color.red for slider
int skyred=128;
int skygreen=128;
int skyblue=128;

int draw_test=0;
void synchronize_startup()
{
	while(1)
	{
		if(draw_test==1)
		{
			draw_text("Chekbox TRUE",10,10,COLOR_RED);
		}
		
		sky_color.red=skyred;
		sky_color.green=skygreen;
		sky_color.blue=skyblue;
		wait(1);
	}
}

BMAP* b1="rock.tga";
BMAP* b2="sand.tga";
BMAP* b3="detail.tga";
BMAP* b4="display.pcx";

// show-hide handle for widnwow 1
static BOOL showWindow1 = true;

void window_func()
{
	if(showWindow1)//for show-hide window1
	{
		
		#ifndef create_first_window
			#define create_first_window
			
			//set position and size
			imgui_set_next_window_pos(1, 50, ImGuiCond_Once);
			imgui_set_next_window_size(700, 400, ImGuiCond_Once);

			//create window
			imgui_begin("Pictures Window", &showWindow1, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse );
			
			
			
			
			imgui_image(b1);//add image
			imgui_same_line();//add next image to same line
			imgui_image(b2);//add image
			imgui_image(b3);//add image (not same line)
			
			//add text
			imgui_text("Click to picture below");
			//add button image 
			if(imgui_button_img("Button Image",b4, 200, 200))
			{
				//event
				printf("Test Message");
			}
			
			imgui_end();
		}
	#endif
	
	#ifndef create_second_window
		#define create_second_window
		//set position and size
		imgui_set_next_window_pos(screen_size.x-400, 50, ImGuiCond_Once);
		imgui_set_next_window_size(400, 600, ImGuiCond_Once);
		//create
		imgui_begin("Test Window", NULL, NULL);
		
		
		//add slider
		imgui_slider_int("Sky Red", skyred, 0, 255);
		imgui_slider_int("Sky Green", skygreen, 0, 255);
		imgui_slider_int("Sky Blue", skyblue, 0, 255);
		//add button
		if(imgui_button("Hide/Show Pictures window"))
		{
			//button event
			if(showWindow1==true)
			{
				showWindow1=false;
				return;
			}
			if(showWindow1==false)
			{
				showWindow1=true;
			}
		}
		imgui_checkbox("Test",&draw_test);
		
		
		
		
		imgui_end();
	#endif

	
	
	

	
}

void loop()
{
	imgui_start_imode();
	
	window_func();
	
	imgui_end_imode();
}

void main()
{
	mouse_sync = 0;
	mouse_pointer = 2;
	mouse_mode = 4;
	video_switch(10, 32, 2);
	wait(1);
	level_load("");
	bmap_preload(b1); 
	bmap_preload(b2); 
	bmap_preload(b3); 
	bmap_preload(b4);
	
	imgui_init(0);
	
	on_d3d_lost = imgui_reset;
	on_scanmessage = custom_scan_message;
	
	on_frame = loop;
}


BTW; i rebuild dll with "Multi-threaded (/MT)" as 20BN mention it. Also build it with release configuration, not debug configuration. Test it another pc and it works without problem! laugh

Re: What are you working on? [Re: Emre] #478198
09/18/19 13:08
09/18/19 13:08
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
Under Lite-C in my repo, there is now the updated DLL compiled with MT. Works on my other test PC. The VS Project is still a mess. I should clean that up and optimize the code. Perhaps lern to use some modern tools to compile DLLS laugh

Re: What are you working on? [Re: jumpman] #478201
09/18/19 13:45
09/18/19 13:45
Joined: Feb 2007
Posts: 34
LUTZ
K
karmacomposer Offline
Newbie
karmacomposer  Offline
Newbie
K

Joined: Feb 2007
Posts: 34
LUTZ
Jumpman, Absolutely beautiful - loved the video walkthrough as well.

Mike


YOU DREAM IT - WE CREATE IT! For custom scoring, audio, video and more for your games, visit www.rubidex.net
Page 545 of 554 1 2 543 544 545 546 547 553 554

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1