Windowed Mode / 32-bit Mode
EDIT: Put up new link.
EDIT: From now on, I will using the account iNvERTIgO.
Hey everyone, I have recently modified the Dink source so that you may now use windowed mode properly and added at 32-bit mode for both windowed and fullscreen modes.
You can download the exe along with the modified source here.
Here is the readme included in the zip:
Dink with Working Windowed Mode Readme
======================================
modified by iNvERTIgO, original functions by Seth A. Robinson
Introduction:
In this zip I have included the source for the functions I have modified to get windowed mode working. I have also included the compiled exe for those who want only to test it. Make sure you read the important notes at the end of this file.
MESSAGE IN CAPS FOR N00BS WHO WON'T LOOK AT BOTTOM: TO USE WINDOWED MODE, YOUR DISPLAY SETTINGS MUST BE SET SO THAT YOUR COLOR DEPTH IS 32-BIT
For those who just want to run it, I should inform you that I have modified the following arguments Dink.exe takes:
-window Activates windowed mode, automatically sets truecolor
-truecolor Activates truecolor mode, can be used in fullscreen
-dinkpal If in truecolor mode, all sprites will use the dink palette*
* = See last note on bottom
Comments:
About a week ago I found out that the Dink source had been released. I thought adding windowed mode would be a good first step into gaining a basic understanding of how the extremely messy code works. Soon I windowed mode working. Since then I've gotten a little sidetracked working on a DMOD, but now I've decided to release the modified code. It's not much, but I might add some more to it later (ex. 24-bit bitmap loading).
Basically, I have released this little modification in an attempt to give people something to work with while The Dink Project people are slaving away reorganizing code. I fully support what they are doing, and I know that this will be pretty much useless when they finish and the new code comes out with an über shine to it
Instructions:
In the included .c files you will find the modified functions. Replace the ones in dink.cpp and dinkvars.h with the new ones, compile, and viola, working windowed and truecolor modes. By the way, I know this section is pointless; those who actually plan on doing this are smart enough to figure it out on their own
As for globals.c, just add the two bools to the top of dinkvar.h
Important Notes:
- For now, only 32-bit mode has been added; I may add 16-bit support later, although I would encourage someone else to do it
- Fades do not show in 32-bit mode because they were previously accomplished by darkening the palette. This obviously does not work in true color.
- Some DMOD's (such as Cycles of Evil) use a trick in DinkC to change the palette in the middle of the game. In order for this to work in true color... well... it's just plain messy . There are multiple workarounds, one of them being changing all of the sprites and tiles in memory, but that's a slow process. For now, DMOD's that change palettes in game won't look completely right, but the sprites might look ok (see next note)
* In 32-bit mode, the program uses the palette associated with each sprite, allowing completely different palettes to be used. Using the -dinkpal argument will force all sprites to use the Dink palette
I hope people will be able to make use of this addition to Dink.
EDIT: From now on, I will using the account iNvERTIgO.
Hey everyone, I have recently modified the Dink source so that you may now use windowed mode properly and added at 32-bit mode for both windowed and fullscreen modes.
You can download the exe along with the modified source here.
Here is the readme included in the zip:
Dink with Working Windowed Mode Readme
======================================
modified by iNvERTIgO, original functions by Seth A. Robinson
Introduction:
In this zip I have included the source for the functions I have modified to get windowed mode working. I have also included the compiled exe for those who want only to test it. Make sure you read the important notes at the end of this file.
MESSAGE IN CAPS FOR N00BS WHO WON'T LOOK AT BOTTOM: TO USE WINDOWED MODE, YOUR DISPLAY SETTINGS MUST BE SET SO THAT YOUR COLOR DEPTH IS 32-BIT
For those who just want to run it, I should inform you that I have modified the following arguments Dink.exe takes:
-window Activates windowed mode, automatically sets truecolor
-truecolor Activates truecolor mode, can be used in fullscreen
-dinkpal If in truecolor mode, all sprites will use the dink palette*
* = See last note on bottom
Comments:
About a week ago I found out that the Dink source had been released. I thought adding windowed mode would be a good first step into gaining a basic understanding of how the extremely messy code works. Soon I windowed mode working. Since then I've gotten a little sidetracked working on a DMOD, but now I've decided to release the modified code. It's not much, but I might add some more to it later (ex. 24-bit bitmap loading).
Basically, I have released this little modification in an attempt to give people something to work with while The Dink Project people are slaving away reorganizing code. I fully support what they are doing, and I know that this will be pretty much useless when they finish and the new code comes out with an über shine to it
Instructions:
In the included .c files you will find the modified functions. Replace the ones in dink.cpp and dinkvars.h with the new ones, compile, and viola, working windowed and truecolor modes. By the way, I know this section is pointless; those who actually plan on doing this are smart enough to figure it out on their own
As for globals.c, just add the two bools to the top of dinkvar.h
Important Notes:
- For now, only 32-bit mode has been added; I may add 16-bit support later, although I would encourage someone else to do it
- Fades do not show in 32-bit mode because they were previously accomplished by darkening the palette. This obviously does not work in true color.
- Some DMOD's (such as Cycles of Evil) use a trick in DinkC to change the palette in the middle of the game. In order for this to work in true color... well... it's just plain messy . There are multiple workarounds, one of them being changing all of the sprites and tiles in memory, but that's a slow process. For now, DMOD's that change palettes in game won't look completely right, but the sprites might look ok (see next note)
* In 32-bit mode, the program uses the palette associated with each sprite, allowing completely different palettes to be used. Using the -dinkpal argument will force all sprites to use the Dink palette
I hope people will be able to make use of this addition to Dink.
August 2nd 2003, 03:07 AM
Hugmungustes
Hey the first new engine modification - well done! I will have to test this...
I'll vouch for this, if my word means anything around here. He's been working hard to get this out and make sure it was well documented, have fun with it guys.
Thank you, I thought jameson (and possibly me, very unlikely ) was the only one doing real work around here. But, do you have another address to download from? That one has exceeded it's bandwidth limit.
EDIT: From now on, I will using the account iNvERTIgO.
The files dinkvars.h and dink.cpp are parts of the Dink source code. You have to alter them by replacing functions with the ones included in the zip, then recompile the exe. Dinkmega, you don't sound like a programmer, so you should just use the included Dink.exe that I have already compiled
The files dinkvars.h and dink.cpp are parts of the Dink source code. You have to alter them by replacing functions with the ones included in the zip, then recompile the exe. Dinkmega, you don't sound like a programmer, so you should just use the included Dink.exe that I have already compiled
Ok, so for someone that knows NOTHING about programming, what do you need to do besides taking the exe included? I did that, but you mentioned using commands for the 32bit and windowed modes, and I know nothing of this.
Right click on Dink.exe, the click create shortcut. Then, right click on the shortcut and go to properties. Locate the edit box labeled "Target:", then go to the end of it and add the commands you want. A list of commands and their descriptions is included in the readme as well as my first post.
Example target: "D:\dink\Dink.exe"
Target modified for windowed mode: "D:\dink\Dink.exe" -window
Example target: "D:\dink\Dink.exe"
Target modified for windowed mode: "D:\dink\Dink.exe" -window
Righto, thanks. Seems to work with the original.. my dmod made it crash, but maybe that was just a fluke the first time it ran.
Seems to be a bit choppy, but otherwise neat. Now, the 32 bit won't effect the looks of the original graphics at all, but you can now add graphics beyond the pallete, correct?
Seems to be a bit choppy, but otherwise neat. Now, the 32 bit won't effect the looks of the original graphics at all, but you can now add graphics beyond the pallete, correct?
The way that this implentation works in 32bit currently is kinda like this...
It still only loads 8 bit images, however it can load them with any pallete. Each image can have its own pallete basically.
iNvERTIgO is planning on adding true 32 bit color image support soon though.
One question, Okaly, What kinda computer you running on. It would help iNvERTIgo see whether its a code problem or ust and old computer
Also if your dmod continues to crash send it to him, he can run the EXE in debug mode and track down the crash and probably fix the problem.
It still only loads 8 bit images, however it can load them with any pallete. Each image can have its own pallete basically.
iNvERTIgO is planning on adding true 32 bit color image support soon though.
One question, Okaly, What kinda computer you running on. It would help iNvERTIgo see whether its a code problem or ust and old computer
Also if your dmod continues to crash send it to him, he can run the EXE in debug mode and track down the crash and probably fix the problem.
My computer is an 1800+ with 512 ram and a 64 meg vid card.. it's not that. I'll look into it, but it was probably something simply because of my mod...
Hmm most likely not. It's quite possible its something we've overlooked in testing. We only have run it on 2-3 PC's with a handful of DMods.