本文整理汇总了C#中HaloMap.Map.Map类的典型用法代码示例。如果您正苦于以下问题:C# Map类的具体用法?C# Map怎么用?C# Map使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Map类属于HaloMap.Map命名空间,在下文中一共展示了Map类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: argb_color
/// <summary>
/// Creates a color wheel with associated (A)RGB text boxes
/// </summary>
/// <param name="meta"></param>
/// <param name="iEntName">Control display name</param>
/// <param name="map"></param>
/// <param name="iOffsetInChunk"></param>
/// <param name="hasAlphaChannel">True if ARGB, False for RGB</param>
/// <param name="valueType">Float for 0f-1f, Int for 0-255</param>
/// <param name="iLineNumber"></param>
public argb_color(Meta meta, string iEntName, Map map, int iOffsetInChunk, bool hasAlphaChannel, IFPIO.ObjectEnum valueType,int iLineNumber)
{
InitializeComponent();
this.meta = meta;
this.LineNumber = iLineNumber;
this.chunkOffset = iOffsetInChunk;
this.map = map;
this.EntName = " " + iEntName + " ";
this.Dock = DockStyle.Top;
this.Controls[0].Text = EntName;
this.hasAlpha = hasAlphaChannel;
this.ValueType = valueType;
switch (valueType)
{
case IFPIO.ObjectEnum.Byte:
this.eachSize = 1;
break;
case IFPIO.ObjectEnum.Short:
case IFPIO.ObjectEnum.UShort:
this.eachSize = 2;
break;
case IFPIO.ObjectEnum.Int:
case IFPIO.ObjectEnum.UInt:
case IFPIO.ObjectEnum.Float:
case IFPIO.ObjectEnum.Unknown:
this.eachSize = 4;
break;
}
this.size = (hasAlpha ? eachSize * 4 : eachSize * 3);
CW = new ColorWheel();
CW.Location = new Point(180, 5);
Red = new DataValues(meta, "Red", map, iOffsetInChunk, valueType, iLineNumber);
Red.BackColor = System.Drawing.Color.DarkRed;
CW.setTextBox(Red.textBox1, Color.Red);
Blue = new DataValues(meta, "Blue", map, iOffsetInChunk + eachSize, valueType, iLineNumber);
Blue.BackColor = System.Drawing.Color.DarkBlue;
CW.setTextBox(Blue.textBox1, Color.Blue);
Green = new DataValues(meta, "Green", map, iOffsetInChunk + eachSize * 2, valueType, iLineNumber);
Green.BackColor = System.Drawing.Color.FromArgb(10, 80, 35);
CW.setTextBox(Green.textBox1, Color.Green);
if (hasAlpha)
{
Alpha = new DataValues(meta, "Alpha", map, iOffsetInChunk + eachSize * 3, valueType, iLineNumber);
Alpha.BackColor = System.Drawing.Color.Gray;
CW.setTextBox(Alpha.textBox1, Color.White);
gbRGBColor.Controls.Add(Alpha);
}
gbRGBColor.Controls.Add(CW);
CW.BringToFront();
gbRGBColor.Controls.Add(Green);
gbRGBColor.Controls.Add(Blue);
gbRGBColor.Controls.Add(Red);
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:70,代码来源:rgb_color.cs
示例2: LoadVariables
/// <summary>
/// The load variables.
/// </summary>
/// <param name="map">The map index.</param>
/// <param name="entlineNumber">The entline number.</param>
/// <remarks></remarks>
public void LoadVariables(Map map, int entlineNumber)
{
this.map = map;
this.lineNumber = entlineNumber;
// FilterEntItems();
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:13,代码来源:ViewAllValues.cs
示例3: ListEntItems
/// <summary>
/// Initializes a new instance of the <see cref="ListEntItems"/> class.
/// </summary>
/// <param name="imap">The imap.</param>
/// <param name="entItems">The ent items.</param>
/// <remarks></remarks>
public ListEntItems(Map imap, IFPIO entItems)
{
if (imap.SelectedMeta == null)
{
this.Close();
}
this.Ent = entItems;
this.map = imap;
InitializeComponent();
this.EntItemsTreeView.Nodes.AddRange(LoadEntItemsIntoTreeView(0));
this.buttGoTo.Tag = this.Ent.ENTElements[0];
DialogResult DR =
MessageBox.Show(
"No N00bs Beyond This Point.....That Is IF You Want To Keep Working Plugins.....",
string.Empty,
MessageBoxButtons.OKCancel);
if (DR == DialogResult.Cancel)
{
MessageBox.Show(
"You have taken the first step in the NA (N00bs Anonymous) program. Please continue down the path to becoming 1337");
this.Close();
}
this.combType.Items.AddRange(Enum.GetNames(typeof(IFPIO.ObjectEnum)));
}
开发者ID:troymac1ure,项目名称:Entity,代码行数:32,代码来源:ListEntItems.cs
示例4: DataValues
public DataValues(Meta meta, string iEntName, Map map, int iOffsetInChunk, IFPIO.ObjectEnum type, int iLineNumber)
{
this.meta = meta;
this.LineNumber = iLineNumber;
this.chunkOffset = iOffsetInChunk;
this.map = map;
this.EntName = iEntName;
InitializeComponent();
this.Dock = DockStyle.Top;
this.Controls[0].Text = EntName;
this.Controls[2].Text = type.ToString();
this.ValueType = type;
switch (this.ValueType)
{
case IFPIO.ObjectEnum.Byte:
this.size = 1;
break;
case IFPIO.ObjectEnum.Short:
case IFPIO.ObjectEnum.UShort:
this.size = 2;
break;
case IFPIO.ObjectEnum.Int:
case IFPIO.ObjectEnum.UInt:
case IFPIO.ObjectEnum.Float:
case IFPIO.ObjectEnum.Unknown:
this.size = 4;
break;
case IFPIO.ObjectEnum.Unused:
this.size = 0;
break;
}
this.AutoSize = false;
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:33,代码来源:DataValues.cs
示例5: Sky
/// <summary>
/// Initializes a new instance of the <see cref="Sky"/> class.
/// </summary>
/// <param name="tag">The tag.</param>
/// <param name="map">The map.</param>
/// <remarks></remarks>
public Sky(int tag, Map map)
{
map.BR.BaseStream.Position = map.MetaInfo.Offset[tag] + 72;
int tempc = map.BR.ReadInt32();
int tempr = map.BR.ReadInt32() - map.SecondaryMagic;
if (tempc != 0)
{
fogenabled = true;
map.BR.BaseStream.Position = tempr;
fog.R = map.BR.ReadSingle();
fog.G = map.BR.ReadSingle();
fog.B = map.BR.ReadSingle();
fog.A = map.BR.ReadSingle();
fog.Start = map.BR.ReadSingle();
fog.End = map.BR.ReadSingle();
}
map.BR.BaseStream.Position = map.MetaInfo.Offset[tag] + 96;
tempc = map.BR.ReadInt32();
tempr = map.BR.ReadInt32() - map.SecondaryMagic;
if (tempc != 0)
{
map.BR.BaseStream.Position = tempr + 24;
fog.FogThickness = map.BR.ReadSingle();
fog.FogVisibility = map.BR.ReadSingle();
}
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:33,代码来源:sky.cs
示例6: Enums
public Enums(Meta meta, string iEntName, Map map, int iOffsetInChunk, int iType, object[] ioptions, int iLineNumber)
{
this.meta = meta;
this.LineNumber = iLineNumber;
this.Options = ioptions;
this.enumType = iType;
this.size = iType / 8;
this.chunkOffset = iOffsetInChunk;
this.map = map;
this.EntName = iEntName;
InitializeComponent();
this.Size = this.PreferredSize;
this.Dock = DockStyle.Top;
this.Controls[0].Text = EntName;
switch (iType)
{
case 8:
{
this.Controls[2].Text = "Enum8";
break;
}
case 16:
{
this.Controls[2].Text = "Enum16";
break;
}
case 32:
{
this.Controls[2].Text = "Enum32";
break;
}
}
this.AutoSize = false;
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:34,代码来源:Enums.cs
示例7: MetaEditorControlPage
public MetaEditorControlPage(Meta meta, MapForms.MapForm mapForm)
{
InitializeComponent();
// Try to draw treeview nodes to "hide" "disabled" nodes; fail. Still leaves space where node is
//treeViewTagReflexives.DrawMode = TreeViewDrawMode.OwnerDrawAll;
//treeViewTagReflexives.DrawNode += new DrawTreeNodeEventHandler(myTreeView_DrawNode);
this.MapForm = mapForm;
this.map = mapForm.map;
this.meta = meta;
this.BR = new BinaryReader(meta.MS);
// Create a backup of the Tags memory stream, for restoring, comparing, etc
msBackup = new MemoryStream(meta.MS.ToArray());
msDebug = new MemoryStream((int)meta.MS.Length);
mainReflexive = createReflexiveList(); // Done
refreshTreeListing(mainReflexive); // Done
this.treeViewTagReflexives.Sort();
treeViewTagReflexives.SelectedNode = treeViewTagReflexives.Nodes[0];
// Default Peek/Poke to "Single Value"
this.tscbApplyTo.SelectedIndex = 0;
}
开发者ID:troymac1ure,项目名称:Entity,代码行数:25,代码来源:MetaEditorControlPage.cs
示例8: H1BSPConvert
/// <summary>
/// Initializes a new instance of the <see cref="BSPConvert"/> class.
/// </summary>
/// <param name="map">The map.</param>
/// <param name="test">The test.</param>
/// <remarks></remarks>
public H1BSPConvert(Map map, ref PropertyGrid test)
{
switch (map.HaloVersion)
{
case HaloVersionEnum.Halo1:
case HaloVersionEnum.HaloCE:
map.OpenMap(MapTypes.Internal);
H1SBSP h1bsp = new H1SBSP(map.BSP.sbsp[0].TagIndex, map);
test.SelectedObject = h1bsp.Header;
map.CloseMap();
break;
case HaloVersionEnum.Halo2:
case HaloVersionEnum.Halo2Vista:
MessageBox.Show("Open an H1 Map first");
break;
}
// OpenFileDialog open = new OpenFileDialog();
// open.Filter = "*.map|*.map";
// if (open.ShowDialog() == DialogResult.Cancel) return;
// int h2map=Maps.Add(open.FileName);
// Halo2BSP h2bsp = new Halo2BSP(h2map);
// Maps.Remove(h2map);
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:31,代码来源:H1BSPConvert.cs
示例9: StringsInfo
/// <summary>
/// Initializes a new instance of the <see cref="StringsInfo"/> class.
/// </summary>
/// <param name="BR">The BR.</param>
/// <param name="map">The map.</param>
/// <remarks></remarks>
public StringsInfo(ref BinaryReader BR, Map map)
{
Name = new string[map.MapHeader.scriptReferenceCount];
Length = new int[map.MapHeader.scriptReferenceCount];
Offset = new int[map.MapHeader.scriptReferenceCount];
// Reads In Offsets Of Meta Names
BR.BaseStream.Position = map.MapHeader.offsetToStringIndex;
for (int x = 0; x < map.MapHeader.scriptReferenceCount; x++)
{
Offset[x] = BR.ReadInt32();
}
for (int x = 0; x < map.MapHeader.scriptReferenceCount; x++)
{
// figures out length of string
int len;
if (x != map.MapHeader.scriptReferenceCount - 1)
{
len = Offset[x + 1] - Offset[x];
}
else
{
len = map.MapHeader.sizeOfScriptReference - Offset[x];
}
Length[x] = len - 1;
/// Reads in string
BR.BaseStream.Position = map.MapHeader.offsetToStringNames2 + Offset[x];
Name[x] = new string(BR.ReadChars(len - 1));
}
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:39,代码来源:StringsInfo.cs
示例10: HaloLight
/// <summary>
/// Initializes a new instance of the <see cref="HaloLight"/> class.
/// </summary>
/// <param name="tagIndex">Index of the tag.</param>
/// <param name="map">The map.</param>
/// <remarks></remarks>
public HaloLight(int tagIndex, Map map)
{
map.BR.BaseStream.Position = map.MetaInfo.Offset[tagIndex] + 72;
range = map.BR.ReadInt32();
r = (int)(map.BR.ReadSingle() * 255);
g = (int)(map.BR.ReadSingle() * 255);
b = (int)(map.BR.ReadSingle() * 255);
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:14,代码来源:ligh.cs
示例11: MetaEditor
/// <summary>
/// Initializes a new instance of the <see cref="MetaEditor"/> class.
/// </summary>
/// <param name="ifp">The ifp.</param>
/// <param name="split">The split.</param>
/// <param name="mapx">The mapx.</param>
/// <remarks></remarks>
public MetaEditor(IFPIO ifp, SplitContainer split, Map mapx)
{
map = mapx;
ReflexiveContainer tempr = new ReflexiveContainer("Header");
MakeControls(0, ifp.items, ref tempr);
Controls = tempr;
DrawControls(ref split);
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:16,代码来源:MetaEditor.cs
示例12: SpawnLoads
/// <summary>
/// Initializes a new instance of the <see cref="SpawnLoads"/> class.
/// </summary>
/// <param name="map">The map.</param>
/// <param name="bsp">The BSP.</param>
/// <param name="device">The device.</param>
/// <remarks></remarks>
public SpawnLoads(Map map, BSPModel bsp, Device device)
{
this.map = map;
this.bsp = bsp;
this.device = device;
SpawnModel = new List<ParsedModel>();
spawnmodelindex = new int[bsp.Spawns.Spawn.Count];
BoundingBoxModel = new Mesh[bsp.Spawns.Spawn.Count];
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:16,代码来源:SpawnLoads.cs
示例13: BuildMeta
/// <summary>
/// The build meta.
/// </summary>
/// <param name="metasplit">The metasplit.</param>
/// <param name="map">The map.</param>
/// <returns></returns>
/// <remarks></remarks>
public static Meta BuildMeta(MetaSplitter metasplit, Map map)
{
metasize = 0;
MetaStream = new MemoryStream(metasplit.Header.chunksize);
BinaryWriter BW = new BinaryWriter(MetaStream);
// BW.BaseStream.Position = 0;
// BW.Write(metasplit.Header.MS.ToArray(), 0, metasplit.Header.chunksize);
metasize += metasplit.Header.chunksize;
TagIndex = metasplit.TagIndex;
Meta m = new Meta(map);
List<Meta.Item> NewItems = new List<Meta.Item>();
// Major error here! Size is not calculated right!
RecursivelyAddPiecesToMeta(metasplit.Header, ref NewItems, ref BW);
m.items = NewItems;
if (MetaStream.Length % 4 != 0)
{
metasize += (int)MetaStream.Length % 4;
MetaStream.SetLength(MetaStream.Length + MetaStream.Length % 4);
}
m.MS = MetaStream;
m.size = metasize;
m.type = metasplit.type;
m.name = metasplit.name;
m.rawType = metasplit.rawtype;
m.raw = metasplit.raw;
m.magic = metasplit.magic;
m.offset = metasplit.offset;
m.TagIndex = TagIndex;
m.RelinkReferences();
m.WriteReferences();
// m.items.Clear();
// MetaScanner Ms = new MetaScanner();
if (m.rawType != RawDataContainerType.Empty)
{
map.OpenMap(MapTypes.Internal);
m.raw = map.Functions.ForMeta.ReadRaw(m.TagIndex, false);
map.CloseMap();
}
// map.OpenMap(MapTypes.Internal);
// IFPIO ifp=IFP.IFPHashMap.GetIfp(m.type);
// m.parsed = true;
// Ms.ScanWithIFP(ref ifp, ref m, map) ;
// map.CloseMap();
return m;
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:62,代码来源:MetaBuilder.cs
示例14: Float
/// <summary>
/// Initializes a new instance of the <see cref="Float"/> class.
/// </summary>
/// <param name="iEntName">
/// The i ent name.
/// </param>
/// <param name="map">
/// The map.
/// </param>
/// <param name="iOffsetInChunk">
/// The i offset in chunk.
/// </param>
public Float(string iEntName, Map map, int iOffsetInChunk)
{
this.chunkOffset = iOffsetInChunk;
this.map = map;
this.EntName = iEntName;
InitializeComponent();
this.Size = this.PreferredSize;
this.Dock = DockStyle.Top;
this.Controls[0].Text = EntName;
this.AutoSize = false;
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:23,代码来源:Float.cs
示例15: StringBox
public StringBox(Meta meta, string iEntName, Map map, int iOffsetInChunk, int iLineNumber, int chunkCount)
{
this.meta = meta;
this.LineNumber = iLineNumber;
this.chunkOffset = iOffsetInChunk;
this.map = map;
this.EntName = iEntName;
this.size = chunkCount;
InitializeComponent();
this.Size = this.PreferredSize;
this.Dock = DockStyle.Top;
this.label3.Text = EntName;
this.AutoSize = false;
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:14,代码来源:StringBox.cs
示例16: FileNamesInfo
/// <summary>
/// Initializes a new instance of the <see cref="FileNamesInfo"/> class.
/// </summary>
/// <param name="BR">The BR.</param>
/// <param name="map">The map.</param>
/// <remarks></remarks>
public FileNamesInfo(ref BinaryReader BR, Map map)
{
switch (map.HaloVersion)
{
case HaloVersionEnum.Halo2:
case HaloVersionEnum.Halo2Vista:
Halo2FileNamesInfo(ref BR, map);
break;
case HaloVersionEnum.HaloCE:
case HaloVersionEnum.Halo1:
HaloCEFileNamesInfo(ref BR, map);
break;
}
}
开发者ID:troymac1ure,项目名称:Entity,代码行数:20,代码来源:FileNamesInfo.cs
示例17: TagBlock
/// <summary>
/// Initializes a new instance of the <see cref="TagBlock"/> class.
/// </summary>
/// <param name="iEntName">
/// The i ent name.
/// </param>
/// <param name="map">
/// The map.
/// </param>
/// <param name="iOffsetInChunk">
/// The i offset in chunk.
/// </param>
/// <param name="iLineNumber">
/// The i line number.
/// </param>
public TagBlock(string iEntName, Map map, int iOffsetInChunk, int iLineNumber)
{
this.LineNumber = iLineNumber;
this.map = map;
this.EntName = iEntName;
this.chunkOffset = iOffsetInChunk;
InitializeComponent();
this.Controls[0].Text = EntName;
this.Dock = DockStyle.Top;
this.Size = this.PreferredSize;
this.AutoSize = false;
this.Enter += TagBlock_Enter;
this.Leave += TagBlock_Leave;
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:29,代码来源:TagBlock.cs
示例18: SpawnInfo
/// <summary>
/// Initializes a new instance of the <see cref="SpawnInfo"/> class.
/// </summary>
/// <param name="map">The map.</param>
/// <remarks></remarks>
public SpawnInfo(Map map)
{
switch (map.HaloVersion)
{
case HaloVersionEnum.HaloCE:
case HaloVersionEnum.Halo1:
H1SpawnInfo(map);
break;
case HaloVersionEnum.Halo2Vista:
case HaloVersionEnum.Halo2:
H2SpawnInfo(map);
break;
}
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:19,代码来源:SpawnInfo.cs
示例19: SID
/// <summary>
/// Initializes a new instance of the <see cref="SID"/> class.
/// </summary>
/// <param name="iEntName">
/// The i ent name.
/// </param>
/// <param name="map">
/// The map.
/// </param>
/// <param name="iOffsetInChunk">
/// The i offset in chunk.
/// </param>
/// <param name="iLineNumber">
/// The i line number.
/// </param>
public SID(string iEntName, Map map, int iOffsetInChunk, int iLineNumber)
{
this.LineNumber = iLineNumber;
this.chunkOffset = iOffsetInChunk;
this.map = map;
this.EntName = iEntName;
InitializeComponent();
this.Size = this.PreferredSize;
this.Dock = DockStyle.Top;
this.label3.Text = EntName;
this.AutoSize = false;
this.Enter += SID_Enter;
this.Leave += SID_Leave;
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:29,代码来源:SID.cs
示例20: ParsedBitmap
/// <summary>
/// Initializes a new instance of the <see cref="ParsedBitmap"/> class.
/// </summary>
/// <param name="meta">The meta.</param>
/// <param name="map">The map.</param>
/// <remarks></remarks>
public ParsedBitmap(ref Meta meta, Map map)
{
BitmapHeader = new HaloBitmapHeader(ref meta);
switch (map.HaloVersion)
{
case HaloVersionEnum.Halo2:
case HaloVersionEnum.Halo2Vista:
ReadH2ParsedBitmap(ref meta);
break;
case HaloVersionEnum.HaloCE:
case HaloVersionEnum.Halo1:
ReadCEParsedBitmap(ref meta);
break;
}
}
开发者ID:troymac1ure,项目名称:Entity,代码行数:21,代码来源:ParsedBitmap.cs
注:本文中的HaloMap.Map.Map类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论