Gamestudio Links
Zorro Links
Newest Posts
Out of Sample
by danatrader. 05/30/20 20:02
MT4/5 - wrong M1 time
by Grat. 05/30/20 19:14
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 05/30/20 15:18
Windows 10 file_write error
by AndrewAMD. 05/30/20 13:57
stencil blur does not work - SOLVED
by NicolaB. 05/30/20 12:13
Question about Pattern - Workshop7
by danatrader. 05/30/20 09:09
Test - watch noncomplete data
by Grat. 05/30/20 05:38
bug in parseData?
by Grat. 05/29/20 12:13
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
12 registered members (3run, danatrader, kvm, Grat, onoff, Jerome8911, happysun, AndrewAMD, hast29, 1 invisible), 532 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
PBSeven, Hardi01, Giuseppe, AdamWu, gariki
18460 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 545 of 550 1 2 543 544 545 546 547 549 550
Re: What are you working on? [Re: Emre] #478187
09/18/19 09:40
09/18/19 09:40
Joined: Jul 2010
Posts: 281
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 281
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: 563
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 563
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: 281
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 281
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: 136
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 136
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: 136
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 136
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: 563
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 563
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: 136
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 136
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: 563
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 563
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: 281
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 281
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 550 1 2 543 544 545 546 547 549 550

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