Author Topic: What are we working on?  (Read 3159 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Re: What are we working on?
« Reply #165 on: August 22, 2017, 04:26:39 PM »
I want it.
Brass Lantern Prop Competition

Offline Kawa

Re: What are we working on?
« Reply #166 on: August 23, 2017, 09:19:34 AM »
Implemented a wordwrapper. It's nice. Basically all that's left is that null pointer when copying game files and more capability detection.

Offline lskovlun

Re: What are we working on?
« Reply #167 on: August 23, 2017, 12:28:09 PM »
Implemented a wordwrapper. It's nice. Basically all that's left is that null pointer when copying game files and more capability detection.
Eeeek, hyphenation is a can of worms. One of the reasons \TeX{} became so popular is that it did it right. But that is a big task.

Offline Kawa

Re: What are we working on?
« Reply #168 on: August 23, 2017, 01:47:00 PM »
I said word wrap, not hyphenate :D

In fact, the output for the introduction message, if I change the company name back to "Sierra", ends up matching Sierra's with regards to wrap points, which is quite a feat when I set the maximum message width to 60 purely on a whim. Trying "Firrhna Productions" in both, the wrapping doesn't match anymore... but at 62 max, it does.

Anyway, I just about finished the script interpreter, added support for the SPACE configuration key (it conflicts with the SPACE command, as it does in Sierra's), made the CD command an internal one instead of shelling out to DOS (might be related to the nullpointer, doesn't match Sierra's), and basically only have more detection to consider. And maybe support for DAC*.DRV and such.

Current EXE size is 58.35 KB, packed to 32.56 KB, with no need for INSTALL.TXT/HLP files. Contrast Sierra's INSTALL.EXE at 74.4 KB, actually 167 KB unpacked, with another 26.5 KB for the TXT/HLP files as of KQ6.



MPU-401 detection only works if DOSBox is set to mpu401=intelligent, as opposed to Sierra detecting both that and UART mode. MPU-401 is now properly detected, checking off MT-32 and GM. Sound Blasters are "detected" by parsing the BLASTER environment variable instead of fiddling with DSP reset commands. Sound Blaster and AdLib are detected by fiddling with ports, or by parsing the BLASTER environment variable depending on #defines and command line parameters. EGA/VGA... I tried, but just check off VGA320, VGA320BW, and EGA640. EGA/VGA are properly detected, I hope. EMM and the mouse are detected in the proper ways.

I could release this now. I have it right here, ready for upload to the stash.
Y/n
« Last Edit: August 24, 2017, 08:15:55 AM by Kawa »

Offline Kawa

Re: What are we working on?
« Reply #169 on: August 27, 2017, 07:08:00 PM »
Y'ever wonder what it'd be like if SCI had one of those textmode ending screens like so many other games? 8)

Offline MusicallyInspired

Re: What are we working on?
« Reply #170 on: August 28, 2017, 01:12:24 AM »
Ooo neat. Taken from vocab is nice.
Brass Lantern Prop Competition

Offline Kawa

Re: What are we working on?
« Reply #171 on: August 28, 2017, 08:04:20 AM »
Here's what you do.

In startasm.s, between ExitFromC endp and end Start, add this:
Code: [Select]
gotoxy proc row: byte, col: byte
mov ah, 2
xor bh, bh
mov dh, row
xor dl, col
int 10h
ret
gotoxy endp
You'll need that because SCI doesn't include the standard library. In start.h, add void gotoxy(char, char); to match.

In start.c, find void exit(char code). Here's my reformatted version of it, with the new stuff marked:
Code: [Select]
void exit(char code)
{
int i;
/**/ Handle hB800;
/**/ volatile char far* vidya = (volatile char far*)0xB8000000;
/**/ char far* b800;

for (i = exitIndex - 1; i >= 0; i--)
exitProcs[i]();

if (panicStr)
WriteString(panicStr);
/**/ else
/**/ {
/**/ if ((hB800 = ResLoad(RES_VOCAB, 184)))
/**/ {
/**/ //I would use memcpy or sumth but it's a shit.
/**/ b800 = (char far*)*hB800;
/**/ for (i = 0; i < 80*25*2; i++)
/**/ *vidya++ = *b800++;
/**/ gotoxy(23, 0);
/**/ }
/**/ else
/**/ WriteString("Couldn't load endscreen.");
/**/ }
/**/ //else if (quitStr)
/**/ // WriteString(quitStr);

ExitFromC(code);
}

Now you just get your favorite screen editor out, save your work in the appropriate format, and use a hex editor of your choice to add [86 00] in front so SCI and Companion can tell it's a vocab. You should have a 4002-byte file.

Another idea might be to have a vocab like the kernel name table that contains a selection of random quit messages to use instead of doing it in script. I propose to use vocab.004 for this.

Offline lskovlun

Re: What are we working on?
« Reply #172 on: August 28, 2017, 08:10:27 AM »
Code: [Select]
void exit(char code)
{
/* ... */
for (i = exitIndex - 1; i >= 0; i--)
exitProcs[i]();

 /* Lots of endscreen code */
/**/ if ((hB800 = ResLoad(RES_VOCAB, 184)))
 /* Lots of endscreen code */
}
I'm a bit surprised this works at all. It runs after the resource manager has been shut down, right?
So you're operating on deallocated resource manager data and loading resources, just hoping it works - could end badly, depending on the situation.

Offline Kawa

Re: What are we working on?
« Reply #173 on: August 28, 2017, 08:39:39 AM »
I'm a bit surprised this works at all. It runs after the resource manager has been shut down, right?
I had exactly the same concern, so before I wrote even a single line I looked for calls to onexit. There's an InitResource call in main, but unlike many other subsystems like video and audio, there's no matching onexit call. I felt it safe enough.


SMF 2.0.11 | SMF © 2015, Simple Machines
Simple Audio Video Embedder

Page created in 0.917 seconds with 22 queries.