obscure and ancient graphics card for IBM PC

I wrote a small C program for this graphics card. It is a CGA model which was used in early 1980s! After a while it really works. A lot of effort is required to set a single pixel. 320×200 in 4 colors… Borland C++ is used but this program is just plain C language. Tables are used to set and … Continue reading

C language – Dereference cast

Original C language used typecasts, for instance: pointer to const pointer to const unsigned char -> pointer to const unsigned char Modern Windows C is using an array of object orientated techniques to virtualize, and provide generic templates. There are for instance different copy constructors, which can do primitive conversion between value and number. There are new pointer types such … Continue reading

game prototype (2)

program elements: -map (display, load/save) -map navigation -buildings definition treelist -map buildings treelist -map editor/creator -game rules engine -timer interrupt system/events processing For the prototype, simple 2D objects will be displayed on the map. Later, code becomes added for 3D display! After some consideration, it seems to be desireable to display the opponents city on the map. So the game … Continue reading

Visual VC++ Strings, and embedded C strings

Today I have tried the map Template Class for the first time. This functionality is part of the STL/CLR. It is still possible to use old style syntax, however this is now considered as “unsafe”. C language was designed on mainframe computers with small memories! Today’s computer memories are different by dimensions, GBytes, not KBytes. As well the operating system … Continue reading

the DX pipeline

This is how DirectX works. Geometry data is used for realtime rendering! The graphics card has own CPU. < IndexedFaceSet solid=”true” coordIndex=”0 1 2 3 -1 4 7 6 5 -1 0 4 5 1 -1 1 5 6 2 -1 2 6 7 3 -1 4 0 3 7 -1 “>< Coordinate DEF=”coords_ME_Cube”point=”1.000000 1.000000 -1.000000 1.000000 -1.000000 -1.000000 -1.000000 … Continue reading