More on the WinROTT port...

by Codewiz51 November 30, 2008 16:56

Update: Check out my wiki page for the latest download of WinROTT.

I'm making progress moving all extern declarations to header files and removing externs from any cpp files. I have been able to process about 50% of the CPP files.  By getting all of the declarations worked out, it will allow me to have modules consisting of a standalone header file (.h) and implementation file (.cpp). I'm also able to see declarations that belong in different modules. For instance, several variables are declared in WinROTT, but are only used in one other module and not used in WinROTT. It's generally better to  move the declarations and get rid of any global declarations.

Why do all of this? Once I get the modules properly divided up, I can begin to move code into class declarations. It will also make it easier to isolate OS and hardware specific code into separate dlls, rather than a monolithic program. It also helps me to become familiar with the code. I've already noticed several places where I can improve network code.

I'm also thinking it might be better to implement the game using a peer-to-peer protocol. Even though I am not a Microsoft fan, it might make sense to use their peer-to-peer protocol for WinROTT. I'd appreciate any comments on this. I'm interested in the MS P2P as a chance to become familiar with the protocol.

Gene

This stuff scares me...

by Codewiz51 November 29, 2008 09:49

It looks like an activist judge is trying to rewrite internet law. This article explains what is happening. Public pressure over cyber-bullying is going to over-react, criminalizing all sorts of behavior. Believe me, this is important to all of us.

An Amicus Brief: Issues in the Cyberbullying Case That Affect You

An interesting and hard to catch bug in WinROTT...

by Codewiz51 November 29, 2008 09:07

Update: Check out my wiki page for the latest download of WinROTT

While moving the WinROTT file w_wad.c to w_wad.cpp, I ran into the most interesting bug. It was very difficult to catch. The problem was only apparent when the game was compiled in Release mode. After inserting a lot of logging statements, I was able to trace the problem down to this routine.

int     W_CheckNumForName (char *name)
{
        char    name8[9];
        int             v1,v2;
        lumpinfo_t      *lump_p;
        lumpinfo_t      *endlump;

// make the name into two integers for easy compares

        strncpy (name8,name,8);
        name8[9] = 0;                   // in case the name was a fill 8 chars
        strupr (name8);                 // case insensitive

        v1 = *(int *)name8;
        v2 = *(int *)&name8[4];


// scan backwards so patch lump files take precedence

        lump_p = lumpinfo;
        endlump = lumpinfo + numlumps;

        while (lump_p != endlump)
           {
           if ( *(int *)lump_p->name == v1 && *(int *)&lump_p->name[4] == v2)
              return lump_p - lumpinfo;
           lump_p++;
           }


        return -1;
}

More...

New WinROTT Release (#7)

by Codewiz51 November 27, 2008 23:02

Update: Check out my wiki page for the latest download of WinROTT

I managed to move all the C files to C++. It's working! I've made some code improvements and cleaned up quite a bit. The download is here.

I am currently cleaning up all the extern declarations, trying to get everything into correct header files. It's a slow process. I am in the process of creating header files for all of the DirectMusic, Input, Video, etc. source files, as many of the extern declarations are needed for linker resolution.

Enjoy the game.

Deep fried turkey, Oh how I love thee...

by Codewiz51 November 27, 2008 16:53
  • I've watched all the bad youtube videos about deep frying turkey.
  • I've heard all the bad jokes and puns about house fires and insurance rates.
  • I've read all the glib responses from psuedo intellectuals who know what's safe and good for society, and by extension, what is good and safe for me.

I've found that if you work unimpaired and control the environment around you, deep frying a turkey is about as safe as driving a car to the grocery store. It's a risk I am willing to take in order to taste the delicious wonders of a bird I am not terribly fond of when it's cooked the old fashioned way -- in an oven. It's hard to beat the flavor and texture of a deep fried turkey. My extended family agrees with me. The skin is crispy and delicious. The meat is tender and moist. I find I don't even need to use the fancy marianades and injectors that are so popular now-a-days. Just dry the bird and rub it inside and out with salt and some black pepper. Heat the oil to 325°F and fry for about three minutes per pound. The meat temperature should reach about 160°F. I like to check the meat temperature in the thigh and deep in the breast. That's all it takes. Carve the turkey and watch the family dig in. Be prepared for compliments. It is so good.

My wife, son and daughter, sister-in-law, two nieces and my wife's cousin are having a blast on the shores of lake Michigan. They went to Chicago to watch my wife's cousin in a play at the University of Chicago. Stephen has become quite the well known stage actor. The cats and dogs are great company. I've enjoyed my time alone. Now I want my family back. 'Nough said. I miss them.

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant


Disclaimer

This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cats or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.

All comments are moderated for content.

© Copyright 2008-2010