link161

Member
  • Content count

    43
  • Joined

  • Last visited

Community Reputation

125 Neutral

About link161

  • Rank
    Member
  1. Hey Guys,   Anyone know of any documentaion on this? I have an XML string we need to deserialize to a list of folders and unfortunalty I cant find any good documentation on it. Any help would be great. Thanks!
  2. Hey All, So I need to write a quick little app in Windows Forms C# than will calculate all the video files in a folder(usually H.264 Quicktimes) and spit out their length and Size on the disk. Then Ill output this to a .csv doc. I have no problem with writing to a csv or any of that, it really is just the getting of the info that seems to be the problem. Anybody have a way of doing this? Windows already puts this data in a property, is there a way just to grab a files property? Thanks in advanced for any ideas
  3. Doctor Who Project

    16 bit style Doctor who art for a 2D RPG Youtube: https://www.youtube.com/channel/UCKo4a33drbuh4eKojKI92hA/videos
  4. I think I may of found a way, I checked out those links Adam, and I needed something like Matching. Though again, not very fluent in C# still, I kinda implemented it my own way. Heres what I have to know that it works, I have 2 lists, one that delimits part by part and if the part matches with the Authenticate info the 2nd list stores the line. I applied these to listboxes to test, but now I just need to delimit the line to stick in colums and rows in the CSV and it should work [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] [code]public void ReadTextFile(string fileName) { List<string> toAdd = new List<string>(); List<string> sepList = new List<string>(); string line; // Read the file and display it line by line. using (StreamReader file = new StreamReader(fileName)) { while ((line = file.ReadLine()) != null) { char[] delimiters = new char[] { '-',',' }; string[] parts = line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < parts.Length; i++) { Console.WriteLine(parts[i]); if (parts[i].ToString() == " [Authenticate info]") { sepList.Add(parts[i]); toAdd.Add(line); } } } listBox1.DataSource = sepList; listBox2.DataSource = toAdd; file.Close(); }[/code]
  5. They can vary. Some as small as a few KB, others can get kinda large. I need to find a way to check that 2nd part of the file to see if it will be added or not.
  6. Hey everybody, I was hoping to get a little help on a data exporter here. I'm reading files from a delimited txt log and need to export it to a CSV file. The problem I'm having is how to get the data I need from the log. The txt files resemble this: [Date] - [some system info] - [some system state] [Date] - [Athenticate] - [some system state] [Date] - [some system info] - [some system state] I need to only grab the Athenticates in the file and export those to a CSV. Sadly I'm not to fluent in C#. What whould be the best way to go about this? I have no problem reading the file and I shouldnt have any problem exporting but how do I handle only collecting the ata I need from the file? A List maybe? or a 2-D array?
  7. 16 Bit style Pixel Tardis I made

    Working on the door animation now, which will reveal the interior: [img]http://i1170.photobucket.com/albums/r532/ProjectDW/Tardisinterior6.png[/img]
  8. Here is my first version of a 16-bit style TARDIS from Doctor Who for this RPG me and some other guys are making. I did a quick timelapse of some details but I'll be doing alot more animations for it from scratch if anybody is interested. Let me know what you think! [url="https://www.youtube.com/watch?v=HKBHOYkHohg"]http://youtu.be/HKBHOYkHohg[/url]
  9. Having a problem in MFC

    Well, silly me. I defined the brush in the wrong area. Okay, worked it out.
  10. Hello, I'm having a problem getting some code to run properly here, The basis is I have an ellipse, I need to have it so when you left click it, it changes color. I have the OnLButtonDown handler set up but I'm not getting any results. Any one think they could take a look? here is the handler code: [CODE] void CAssignment3Dlg::OnLButtonDown(UINT nFlags, CPoint point) { CClientDC dc(this); CRect rect; GetClientRect(&rect); dc.SetMapMode(MM_ANISOTROPIC); dc.SetWindowExt(100,100); dc.SetViewportExt(rect.Width(),rect.Height()); CRect ellBound(ellLeft,ellSize); CRgn ellCircle; dc.LPtoDP(ellBound); ellCircle.CreateEllipticRgnIndirect(ellBound); if(ellCircle.PtInRegion(point)) { if(!mCapture) { SetCapture(); mCapture = true; } EllipseCl = RGB(0,0,255); CBrush bEll(HS_CROSS, EllipseCl); dc.SelectObject(bEll); InvalidateRect(ellBound,FALSE); } CDialogEx::OnLButtonDown(nFlags, point); } [/CODE] ellLeft is a pont set the the top left of the ellipse rect, and ellSize is a CSize set to the width and height. here is my on paint function if you need: [CODE] void CAssignment3Dlg::OnPaint() { CPaintDC dc(this); CRect rect; GetClientRect(&rect); dc.SetMapMode(MM_ANISOTROPIC); dc.SetWindowExt(100,100); dc.SetViewportExt(rect.Width (), rect.Height ()); CPen Pen(PS_DASH,1,RGB(0,0,0)); dc.SelectObject(Pen); dc.Rectangle(80,40,90,55); CBrush bBrush(RGB(0,0,0)); dc.SelectObject(bBrush); dc.Rectangle(45,20,60,80); CBrush rCrossBrush(HS_CROSS, RGB(255,0,0)); dc.SelectObject(rCrossBrush); dc.Ellipse(10,10,20,20); if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, m_hIcon); } else { CDialogEx::OnPaint(); } } [/CODE] Just a nudge in the right direction would be greatly appriciated!
  11. Pushing through the wall

    I hit a wall a while back sadly. Had a game coming along but it has been hard to get myself back on it in between classes and work. I would love the inspiration to delve back into it though, I think it was a lack of direction for it. http://www.youtube.com/watch?v=zwHK1xauStA&feature=g-all-s&context=G29f3d03FAAAAAAAAAAA
  12. I need to add a com ref to excel for a windows form app I'm writing, I have excel installed but there isn't a selection for the Excel interop. How can I add this? Any help or a link would be great. I'm using Visual studio 2010 express on windows 7 with office 2010
  13. Error overloading cin insertion >>

    Okay, I soon as I posted this I figured it out. the const keyword. Okay Problem solved!
  14. So I am getting this error while trying to over load the cin operator. I keep getting this error " No operator ">>" Matches these operands" But this is how all of my examples look. Can anyone be kind enough to point this one out for me? Here's the base code: [code] //date.h class Date { int month, day, year; Public: friend istream& operator>>(istream&,const Date&); } [/code] [code] //date.cpp #include"date.h" #include<iostream> using namespace std; istream& operator>>(istream& strm,const Date& d) { cout<<"Enter Day: "; strm >> d.day; return strm; }; [/code]
  15. So I'm really getting in to SDL programming for the first time. I've been writing this little space shooter to learn the basics and all, but my collision detection system just seems wrong. It works and all but it just seems terribly inefficient. The way I have it set up is I have a enemy class and a weapon class. each initialize with an array of 5 so there can be at most 5 of each on screen at once. Enemies are created by a for loop that checks if the one at the index is alive, if not it sets it to alive and does all the necessary actions. the weapon works the same just when the mouse button is hit. Now the way the collision detection works is a nested for loop. On each pass of the game loop it checks going through both for loops and checking if each object is alive than checking for collision(just a true or false based on intersecting SDL_Rects) It works fine but considering a for loop for players and enemies, players and power ups, and the weapon for more than one type of enemy it just seems like a crap load of for loops for every update. Are there some articles on this? or do you guys know of some better methods?