Author Topic: Changes to SCI 1.1 template game  (Read 15409 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #30 on: November 11, 2015, 01:42:55 PM »
There is a decompilation bug in the template game. In PAvoider.sc, change this:

Code: [Select]
            = temp16 MergePoly((send temp17:points) (send ((send clientMover:obstacles)):elements) (send ((send clientMover:obstacles)):size))
            (if (temp16)
                = newPolygon (Polygon:new())
                (send newPolygon:
                    points(newPolygon)
                    size(localproc_042b(newPolygon))
                    type(PBarredAccess)
                    dynamic(1)
                )
            )

to this:

Code: [Select]
            = temp16 MergePoly((send temp17:points) (send ((send clientMover:obstacles)):elements) (send ((send clientMover:obstacles)):size))
            (if (temp16)
                = newPolygon (Polygon:new())
                (send newPolygon:
                    points(temp16)
                    size(localproc_042b(temp16)
                    type(PBarredAccess)
                    dynamic(1)
                )
            )

(Guess no one has used PAvoider yet!)
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #31 on: November 13, 2015, 10:31:00 PM »
The icon/inv renames, if you care to do it:

Steps:
- save IconI.sc as IconItem.sc and rename the class
- rename file in explorer and delete iconi.*
- name IconI to IconItem everywhere
- Replace InvI's doVerb with InvItem's doVErb, and add (include "Verbs.sh") to the top of the file.
- Now InvItem is empty. Delete it.
- save InvI.sc as InventoryItem.sc and rename the class
- rnemae file in explorer and delete invi.*
- replace usages of InvI with InventoryItem. Recompile InventoryItem, then recompile all
- In InventoryItem.sc, rename Inv to Inventory. Recompile it, then recompile all
- Copy class Inventory from InventoryItem.sc into ScrollableInventory.sc, rename it InventoryBase and add the necessary use statements. Also copy localproc_0814 and the local0 script var
- recompile InventoryItem.sc and ScrollableInventory.sc, then recompile all (you'll need to add (use "ScrollableInventory") to Game.sc
- Save InvItem.sc as Inventory.sc and rename in game explorer. Delete InvItem.*

EDIT:
- Also, ControlItem is removed, and its select method gets folded into ControlIcon.
« Last Edit: November 16, 2015, 04:18:52 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Changes to SCI 1.1 template game
« Reply #32 on: November 13, 2015, 11:52:51 PM »
If the renaming proves to be too problematic it might be good to have a list of what each one is. This could be put in any tutorials or references here and on the Wiki. Most should catch on quickly enough, so this would probably be in a beginner tutorial.
KQII Remake Pic

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #33 on: November 20, 2015, 03:00:12 PM »
Class renames:
*DNKR -> DisposeNonKeptRegion
*Fwd   -> Forward
*CT   -> CycleTo
*End   -> EndLoop
*Beg   -> BegLoop
*Osc   -> Oscillate
*ROsc   -> RangeOsc
*Rev   -> Reverse
*MCyc   -> MoveCycle
*Obj   -> Object
*Rm    -> Room
*Rgn   -> Region
*Collect -> Collection
*Blk   -> Block
* SQEgo   -> GameEgo
*Grooper -> GradualLooper
*Grycler -> GradualCycler


Procedure renames:
*GetTotalLength -> FindFormatLen
*EditPrint   -> GetInput
*DoesRectContain   -> InRect
*Perform   -> Eval
*IsFacing   -> CantBeSeen
*GetMouseRelease -> MouseStillDown
*TextPrint -> Prints
*FormatPrint -> Printf


Script file renames:
* Osc -> Oscillate
* MCyc -> MoveCycle
* Blk -> Block
* SQEgo -> GameEgo
* Obj -> System (yikes!)
* ROsc -> RangeOscillate
* Rev -> Reverse
* Helpers -> Sight
* MessageObj -> Conversation

Lots of global variable renames:
   - global81 -> gSyncBias.
   - global17 -> gTextCode.
   - global34 -> gUseSortedFeatures
   - global67 -> gEgoUseObstacles
   - gFont_2 -> gInputFont
   - global86 -> gTickOffset
   - global90 -> gMessageType
   - gLastTicks -> gGameTime
   - gOldCast -> gCast
   - gOldATPs -> gAddToPics
   - gRoomNumber -> gNewRoomNumber  // NOTE the next one below... proceed in this order
   - gModNum   -> gRoomNumber
   - gNewSet    -> gCuees
   - gCursor  -> gNormalCursor
   - gInvisibleCursor -> gWaitCursor
   - gOldFeatures -> gFeatures
   - gCastMotionCue -> gDoMotionCue
   - gNewSync -> gTheSync
   - gNewEventHandler -> gFastCast
   - gTestMessager -> gMessager
   - gPrintEventHandler -> gPrints
   - gOldWH   -> gWalkHandler
   
Game::changeScore is gone.
AddToScore no longer takes a flag, just a number
ScoreFlag is what AddToScore was previously

in sci.sh:
    noCycler has become skipCheck
    csFOCUSED has become csEXIT
    csDISABLED has become csFILTER

kernels:
   CanBeHere renamed to CantBeHere

Removed: class SL
« Last Edit: December 10, 2015, 02:24:57 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Changes to SCI 1.1 template game
« Reply #34 on: November 20, 2015, 06:29:46 PM »
Will these be added to an auto complete?
KQII Remake Pic

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #35 on: November 20, 2015, 06:53:35 PM »
I'm not sure what that means?
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Changes to SCI 1.1 template game
« Reply #36 on: November 20, 2015, 07:31:02 PM »
Like the VS Intellisense. I don't know if the control for your script editor includes it. In other words start typing and at certain points there will be a dropdown of possible key words/class names, etc. that match.
KQII Remake Pic

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #37 on: November 20, 2015, 07:57:30 PM »
Oh yes, it supports it. It's not affected by renames though, it compiles scripts in the background to resolve names.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline Collector

Re: Changes to SCI 1.1 template game
« Reply #38 on: November 20, 2015, 10:05:54 PM »
Oh, I realize that the renames would not affect it, just that with the longer names it would be nice to have them added to the autocomplete so you don't have to fully type them out every time. That reminds me, I still have to add the NSIS keywords to the autocomplete for my NSIS script editor. At least I have the syntax highlighting mostly done.
KQII Remake Pic

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #39 on: November 25, 2015, 08:23:10 PM »
Bug fix:

The two places in Main.sc that have:

Code: [Select]
(if (< polyBuffer 100)

should become

Code: [Select]
(if (<u polyBuffer 100)

Otherwise you may get erroneous "polyBuffer is not a pointer. Polygon ignored." messages when adding polygons to a room.
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #40 on: December 08, 2015, 01:33:53 AM »
Remove this from both the init and the doit method of the Game class in Main.sc:

Code: [Select]
        (if (== gColorDepth 256)
            Bset(0)
        )

« Last Edit: December 08, 2015, 03:07:41 AM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline troflip

Re: Changes to SCI 1.1 template game
« Reply #41 on: December 16, 2015, 05:38:21 PM »
I added message case support to the template game:

https://github.com/icefallgames/SCICompanion/commit/20d8f2ab3f09c9ba23e76125738db2f8ddceefb1
(this change also contains some defines for the scale signal of features... you can ignore those, since the needed defines are in sci.sh, which is part of Companion).

That means that - in addition to setting the noun - you can set the _case property of an feature, actor, prop, room etc. And only messages with the matching noun/case will be shown. You might use this, for instance, if you have a cup (N_CUP, C_INTACT), and then it gets broken. Set the _case property to C_BROKEN). It's still the same cup, but in its broken condition you could have different messages displayed for it.

You'll need the LSL6 vocab 994 resource in order for this to work, since it changes the property layout of several important base classes. It is attached.

You'll need to recompile several times for this to "propagate" to all the classes (e.g. for a change in Feature.sc, recompile once and Actor.sc will pick it up. Recompile another time and ego.sc will pick it up. Recompile another time and GameEgo.sc will pick that up. Yes, the compile behavior is kind of broken - so much for "use" statements).

« Last Edit: December 16, 2015, 05:40:43 PM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.096 seconds with 23 queries.