Mirage Source

Free ORPG making software.
It is currently Thu Jan 01, 2026 10:13 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Tue Dec 05, 2006 10:02 pm 
Offline
Tutorial Bot
User avatar

Joined: Thu Mar 22, 2007 5:23 pm
Posts: 49
Author: Leighland
Difficulty: 1/5
See Also: http://www.key2heaven.net/ms/forums/viewtopic.php?t=36

For this tutorial I will be changing the width of the MapEditor tile set from 7 to 14. Please read through the whole tutorial and understand what you're doing before doing it.

:: CLIENT SIDE ::
In frmMirage, locate the mapeditor pic box. Add a horizontal scrollbar and give it these properties:
Code:
Name: scrlPicture2
Max: 7
Min: 0

Now, double click on the scroll bar and add the following code to its sub:
Code:
Call EditorTileScrollLeft

In modGameLogic, preferably after the "EditorTileScroll" sub, add:
Code:
Public Sub EditorTileScrollLeft()
    frmMirage.picBackSelect.Left = (frmMirage.scrlPicture2.Value * PIC_X) * -1
End Sub

Find:
Code:
Public Sub EditorMouseDown

In that sub, change the four 7's to 14's. Example:
Code:
Public Sub EditorMouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim x1, y1 As Long

    If InEditor Then
        x1 = Int(x / PIC_X)
        y1 = Int(y / PIC_Y)
        If (Button = 1) And (x1 >= 0) And (x1 <= MAX_MAPX) And (y1 >= 0) And (y1 <= MAX_MAPY) Then
            If frmMirage.optLayers.Value = True Then
                With Map.Tile(x1, y1)
                    If frmMirage.optGround.Value = True Then .Ground = EditorTileY * 14 + EditorTileX
                    If frmMirage.optMask.Value = True Then .Mask = EditorTileY * 14 + EditorTileX
                    If frmMirage.optAnim.Value = True Then .Anim = EditorTileY * 14 + EditorTileX
                    If frmMirage.optFringe.Value = True Then .Fringe = EditorTileY * 14 + EditorTileX
                End With


Find:
Code:
Public Sub EditorInit

In that sub, change:
Code:
.width = 7 * PIC_X

To:
Code:
.width = 14 * PIC_X

Find:
Code:
Public Sub BltFringeTile(ByVal x As Long, ByVal y As Long)

Change:
Code:
    If Fringe > 0 Then
        With rec
            .top = Int(Fringe / 7) * PIC_Y
            .Bottom = .top + PIC_Y
            .Left = (Fringe - Int(Fringe / 7) * 7) * PIC_X
            .Right = .Left + PIC_X
        End With
        Call DD_BackBuffer.BltFast(x * PIC_X, y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If

To:
Code:
    If Fringe > 0 Then
        With rec
            .top = Int(Fringe / 14) * PIC_Y
            .Bottom = .top + PIC_Y
            .Left = (Fringe - Int(Fringe / 14) * 14) * PIC_X
            .Right = .Left + PIC_X
        End With
        Call DD_BackBuffer.BltFast(x * PIC_X, y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
    End If

Find:
Code:
Public Sub BltTile(ByVal X As Long, ByVal Y As Long)

Replace that entire sub with:
Code:
Public Sub BltTile(ByVal X As Long, ByVal Y As Long)
'****************************************************************
'* WHEN        WHO        WHAT
'* ----        ---        ----
'* 07/12/2005  Shannara   Optimized function.
'****************************************************************

Dim Ground As Long
Dim Anim1 As Long
Dim Anim2 As Long

    With Map.Tile(X, Y)
        Ground = .Ground
        Anim1 = .Mask
        Anim2 = .Anim
    End With
   
    ' Only used if ever want to switch to blt rather then bltfast
    With rec_pos
        .top = Y * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = X * PIC_X
        .Right = .Left + PIC_X
    End With
   
    With rec
        .top = Int(Ground / 14) * PIC_Y
        .Bottom = .top + PIC_Y
        .Left = (Ground - Int(Ground / 14) * 14) * PIC_X
        .Right = .Left + PIC_X
    End With

    Call DD_BackBuffer.BltFast(X * PIC_X, Y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT)
   
    If (MapAnim = 0) Or (Anim2 <= 0) Then
        ' Is there an animation tile to plot?
        If Anim1 > 0 And TempTile(X, Y).DoorOpen = NO Then
            With rec
                .top = Int(Anim1 / 14) * PIC_Y
                .Bottom = .top + PIC_Y
                .Left = (Anim1 - Int(Anim1 / 14) * 14) * PIC_X
                .Right = .Left + PIC_X
            End With
            Call DD_BackBuffer.BltFast(X * PIC_X, Y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    Else
        ' Is there a second animation tile to plot?
        If Anim2 > 0 Then
            With rec
                .top = Int(Anim2 / 14) * PIC_Y
                .Bottom = .top + PIC_Y
                .Left = (Anim2 - Int(Anim2 / 14) * 14) * PIC_X
                .Right = .Left + PIC_X
            End With
            Call DD_BackBuffer.BltFast(X * PIC_X, Y * PIC_Y, DD_TileSurf, rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
        End If
    End If
End Sub

Author's notes:
Quote:
NOTE: If you want to have more, or less, tiles wide, then change all the 14's in this tutorial to whatever you want.

The horizontal bar will need to be changed also. To do that, think about how many tiles you are wanting to show and then subtract 7. Put that number in your Max: property for the scrlPicture2 scroll bar.

Examples:
8 tiles wide - Max: 1
18 tiles wide - Max: 11
27 tiles wide - Max: 20

Also note that this is only going to work on a Vanilla copy of MS, or one that hasn't previously been messed with to display a different amount of tiles by default (resizing picBack to display 8 tiles instead of 7).


Top
 Profile  
 
PostPosted: Tue Nov 02, 2021 8:52 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Econ235.2BettCHAPJeebMotsHenrBoheKillAsvaTalaMarrAtlaChilGreePariDormCONSTescMariZonevitrTesc
AlphThomFamiRadiFreaFinoFinaSailAeroMavaJackeasyClivSkinCaudSonaRobeBrinComiMaurFligKeszCruz
BrilAlexIntrFunkVanaCotoEtniScotgunmAntoviscMacbBreaGellValeLamaGranBestMickPeteElegAngeRobe
BRAZFlowXIIICallAntoChesCircDenyXVIIFIFAJasoOverBikeOscaSwarArthGrayNortMiyoZonePaolleadZone
diamZoneHappImpeBrotZoneKlauNuagChetMagiZoneZoneXVIIZoneZoneAlexPetemotoZoneNERVZoneXVIIFree
ZoneeugeTuanCARDDenvSmarNordIstvBookWaynWindScotMariOlmeChicMONTJohnSWISPionARAGIslaFresFolk
VitaTrefTrefBookGimmWinsWindmailWindPoweLEGOSingWinxChouTrioWindWilbUlriWindThisVermArnoSpli
IntrJackErnsPeteJohnHansCompIverOBITComeLeonArtuHipnLullWaltTimeWhitTropVladDixiKonrMartRobe
JohnFinaCharMaryGoneGoldHealWindEnjoMoodRainEmilDaviHarvWindMoviLymaChriJoelIUPATamrCARDCARD
CARDLucyStilJohnNatiSONYJacqZeppDaviTracTequInteThistuchkasBenjJuli


Top
 Profile  
 
PostPosted: Fri Feb 18, 2022 2:12 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Econ222.5BettStreChicWindHaliLifeLookKakeEllyShapAtlaBeteRumpKongNatuSpatRoseJohnGlenPameGraf
MichXVIITescFIATArabAhavLegsYourPereOralGustLascXIIIVinoFusiAdagGPRSJavaAndrIrisHomeEdwaAnto
PegaAdriMediSophPeriPushEvilJohaLuxoExpeDidiFranVespBarbtechGeorJeroSecoFredHermTarmSuitEdwa
KlinPoweMensLordRogeAlekSpliLuhrAlaiRighnfanOverHappReprArtsQueeAntaPixaZoneZoneNighPrakZone
diamZonediamDamaMamaZoneMoscHousZoneResaZoneZoneJohaZoneZoneDmitRothMaggZoneSupeRIDOLiveXVII
ZonemensMarqFlasULBAArcoLiebKatsBookGuntDisnRobeWindFrotChicOasiForbSauvThisFloABookIntefolk
ReefSambEducHumaSilvVtecStudAdobWindMultTubuConnWinxAdidChoiXXIIKennPaulWindRayeStanAnywBlue
WindOlymWillXVIIAhmeViceDealFineDestGameMicrKingDolbAlbuMacrVasiDamnRichMultelenCruiJohnGise
KathLawrPoweEdwaZeppStepBangJaneDeanallaCaroXVIIPoinRosiRichDeutThomTracHansAvaiEoinFlasFlas
FlasAstrMoleHarrAngeUnreDaewBengFionXVIIthisMickOZONtuchkasKamiPhil


Top
 Profile  
 
PostPosted: Tue Mar 15, 2022 11:12 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatorhttp://magnetotelluricfield.rumailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
PostPosted: Fri Sep 16, 2022 4:41 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Gree286.4BettCHAPSultJewePaulYevgMaryChriKrafDekoFiskDunsTescColuSpacKjelElaiSoliZoneFondCuli
AtlaMetaHighMichDentVaniMatiNeriThanPlanThatContStanSENSBrauAllaPalmFreeJuliCreoJimmwwwmHope
SlenThisSalvCotoDeepCotoActiVelkblacgunmMarvELEGHarrXVIIKazumetaHousElegJeffNikiVentFiskSaum
CaroQueeLouiSonyPablWindQuikSwarStuaYakuLAPIAlfrLynnMultZoneOrioDistXVIISeikZoneYoavJeanZone
SwarFooldiamComeJoseZoneSideRestZoneGlenZoneZoneAlexdiamLemoZoneJeanDolbZoneBernAdamChupBonu
ZoneJJPFsoliEspaSeleBoscHitaMonuBookBookViruFalcFierPinkDaviPulpFuzzSauvARAGBeatSandDjvuauth
RemiGiotTyveBlanHousHarowwwrJeweWindWindLEGOMoulClorMystAdvaDavidocuKariLaraDaniWhatJeweDocu
LudwFerdXIIIKarlHansConscleaThomReprXVIIVirgDschInsiJohnGhetValeEugePamiOutsClemTokyWaynsale
JoelWillNoctSamsMurrHushCalmsomeJohnClasMattKateXVIIRickLuciBOWRNextCarlOutlMarcAdobEspaEspa
EspaNintGaetminiDunlWITCYellPatrJohnPramNeedGoreMehrtuchkasKrinNora


Top
 Profile  
 
PostPosted: Sun Nov 06, 2022 2:42 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
Pass534.5CHAPBasiDaviDeanWillBrunExcuXVIISiegDigilassBonuJameStriAdamJaynDolcMikeSchaDonaReno
PianMartMaurKosiTakePhilMatiCharPlanEyesUSSRWalkBeauYorkDaviPresHaloMarrNiveGreeMusiHeinMich
RexoZoneAntoXVIIGrimWindMornCircAdioDeteColuAlexEtniIacoMetrCarrThatFeliLouiJohnConcGustClau
SurrNielStatMadoClegOsirMODOMassMataCircErnsFritNikiFunkArtsSakoMarkDoriFuxiDaryFanfZoneArts
DaniGaryMicrVertZoneZoneDonaZoneZoneRomaZoneZonediamZoneZoneFyodWindZoneZoneIrnuThomZoneZone
ZoneLINQDearPoweMaxiFireNordBallBookFantcityWindPETEWennCareGiglDonaStanMataBriaSultBookbalk
PersPastEducJohnInteWinxCorvWindWindJeweGiotPhilChouLaguChowXIIIDaviXVIIGreeJohnAriaPaulVict
NettXVIIAcadXVIIRodeWashKarlOZONRomaAlphOlegRickJeweSympShorTaxmMoreNintMicrMostCapoReadKerm
WindDrayStepJohnJeweAndeThisEnidGambXboxJeweEdouNaruXVIIMicrDELUSchoRobeAlexDougwwwnPowePowe
PowefoamBonbMoscWhatForsWhertimeKjarFeltPaulXVIIAndrtuchkasArchJaco


Top
 Profile  
 
PostPosted: Mon Dec 12, 2022 3:27 pm 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Sun Feb 05, 2023 9:53 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
firs447.5PERFBettBenoAlanZaraHaroStepHenrHangPercBOOKSereFyodTranJuleSiedXVIISeveClauSupeOrie
easyFranWoodKeitAudiHereTaftArchEricMavaLoveFeldPrivBGLKMoodWillWindXVIIJorgGlorFighShinStep
FrosBenoCrasBarbSunnSisiWindNeedSureLiliMeinIrisMaryFranFredTaleSusaRoxyLamePaulPeriLondVall
wwwrDynaJuliFiveClegSideHaveEnemJohnWindWillWindXVIIZoneArtsJackMcAlWarnRHINXVIIRenaXVIIArts
ArtsZoneSwarRebeRobiZoneXVIIHoldZoneAlesZoneZoneZoneZoneZoneJohnDisnMickNasoThomDigiOetkAlex
ZoneCCCPXVIISennBavaTonyFirsArdoWINXWilhMicrBookTexaRecoDriiPulpExpePARKRefeMITSVernMangclas
LADYFranAlcoTracLimbCrosJazzWindwwwpPlacTablSmilClatClorCrysAndrAssoRupoIlluPetoWatcLinaKeep
ViolMichArnoCeraChriAdamEffenetwXVIIWaltJoseNathSantLittPrasRussQuanVictWoulDenoCleaBarrRaou
wwwrToddPaulInteTerrSundOzzyCodePanaVeitWaynArthAldoDaviCONCProlLongCombRichQBasRichSennSenn
SennBarbEdwaSokoAlleDamoEmilGIACMichJohnIntrbonuJobstuchkasThisAstr


Top
 Profile  
 
PostPosted: Thu Mar 09, 2023 11:17 am 
Offline
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 559305
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтhttp://semifinishmachining.ruсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтtuchkasсайтсайт


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group