April 2005
- [DESIGN] : Where to find information about mud design ? Lethal Thanatos
- [DESIGN] : Where to find information about mud design ? Jaycen Rigger
- DESIGN: Mini-VW contenst (Was DESIGN: The game with a thousand faces) Mike Rozak
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Michael Barton
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Hiddukel
- Advanced Topic - Doing it differently. David Wilson
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Hiddukel
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Chad Ziccardi
- Advanced Topic - Doing it differently. Hiddukel
- Advanced Topic - Doing it differently. Richard Lindsey
- Advanced Topic - Doing it differently. Daniel O'Neal
- Advanced Topic - Doing it differently. Brian
- Advanced Topic - Doing it differently. Chad Ziccardi
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Christopher Bunting
One last reply to this thread.. Since part of this thread had to do
with Databases, and then where I mention why I use the d programming
language, I'll show the code that is needed to connect Rom to the
SQLite database using both the C API and my D API. This is why I moved
from C to D
The C API example is first followed by the same code written in D.
// C API for SQLite
#include <stdio.h>
#include <sqlite3.h>
static int callback(void *NotUsed, int argc, char **argv, char **azColName){
int i;
for(i=0; i<argc; i++){
printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL");
}
printf("\n");
return 0;
}
int main(int argc, char **argv){
sqlite3 *db;
char *zErrMsg = 0;
int rc;
if( argc!=3 ){
fprintf(stderr, "Usage: %s DATABASE SQL-STATEMENT\n", argv[0]);
exit(1);
}
rc = sqlite3_open(argv[1], &db);
if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
exit(1);
}
rc = sqlite3_exec(db, argv[2], callback, 0, &zErrMsg);
if( rc!=SQLITE_OK ){
fprintf(stderr, "SQL error: %s\n", zErrMsg);
}
sqlite3_close(db);
return 0;
}
// Here is the same exact code to connect to SQLite from Rom using D.
import sqlite3_imp;
int main()
{
sqlite3* db;
int code;
code = sqlite3_open("file.db", &db);
if(SQLITE_OK != code)
{
printf("DB create error: %s\n", sqlite3_errmsg(db));
return 1;
}
printf("DB open!\n");
sqlite3_close(db);
printf("DB closed.\n");
return 0;
}
Chris
--
ROM mailing list
ROM@rom.org
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom - Advanced Topic - Doing it differently. Chad Simmons
- Advanced Topic - Doing it differently. Michael Barton
- Advanced Topic - Doing it differently. Chad Ziccardi
- Advanced Topic - Doing it differently. Michael Barton
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Hiddukel
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Hiddukel
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Chad Simmons
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Chad Ziccardi
- Advanced Topic - Doing it differently. Davion Kalhen
- Advanced Topic - Doing it differently. Bobby Bailey
- Advanced Topic - Doing it differently. Davion Kalhen
- Advanced Topic - Doing it differently. David Wilson
- Advanced Topic - Doing it differently. mrpotatohead@urbanfallout.net
- Advanced Topic - Doing it differently. Chad Simmons
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Chad Simmons
- Advanced Topic - Doing it differently. Hiddukel
- Advanced Topic - Doing it differently. Chad Simmons
- Advanced Topic - Doing it differently. Hiddukel
- Advanced Topic - Doing it differently. Chad Simmons
- Advanced Topic - Doing it differently. Richard Lindsey
- Advanced Topic - Doing it differently. Christopher Bunting
- Advanced Topic - Doing it differently. Richard Lindsey
- Advanced Topic - Doing it differently. Daniel O'Neal
- DESIGN: Mini-VW contenst Mike Rozak
- DESIGN: More thoughts on the player pyramid Mike Rozak
- Procedural content Mike Rozak
- DESIGN: MMO Survey for College Class Bret Lederle
- Imagery from text J C Lawrence
- Imagery from text J C Lawrence
- Skotos Seeks Guest Voices Shannon Appelcline
- Twisted.reality Paul Miller
- Twisted.reality Peter Harkins
- Twisted.reality Jp Calderone
- Twisted.reality Eli Stevens (WG.c)
- Marketing Resources? Michael Hartman
- Marketing Resources? Elia Morling
- Marketing Resources? Pandora
- Marketing Resources? Christopher Allen
- Marketing Resources? Greg B
- Marketing Resources? Ren Reynolds
- Marketing Resources? Tom Hunter
- Marketing Resources? Michael Hartman
- Marketing Resources? Mike Rozak
- Marketing Resources? Jason Smith
- Marketing Resources? Mike Rozak
- Marketing Resources? Tom Hunter
- Marketing Resources? Mike Rozak
- Marketing Resources? Michael Hartman
- Marketing Resources? Michael Sellers
- Marketing Resources? Mike Rozak
- Marketing Resources? Michael Sellers
- Marketing Resources? Tom Hunter
- Marketing Resources? Tom Hunter
- Marketing Resources? Koster, Raph
- Marketing Resources? Mike Rozak
- Marketing Resources? Koster, Raph
- Marketing Resources? Tom Hunter
- Marketing Resources? Tom Hunter
- Marketing Resources? Johan J Ingles-le Nobel
- NEWS: And so it begins. (officially sanctioned in-game sales) David Wright
- DESIGN: The game with a thousand faces Mike Rozak
- DESIGN: The game with a thousand faces Jaycen Rigger
- DESIGN: The game with a thousand faces Mike Rozak
- DESIGN: The game with a thousand faces ceo
- Sony is getting into the virtual goods auctions Morris Cox
- SOC: Characters as Avatars Jaycen Rigger
- SOC: Characters as Avatars eric@enkanica.com
- DGN : Atomistic Creation Jaycen Rigger
- DGN : Atomistic Creation Thomas Tomiczek
- DGN : Atomistic Creation Jaycen Rigger
- DGN : Atomistic Creation cruise
- DGN : Atomistic Creation Ghilardi Filippo
- DGN : Atomistic Creation Kirinyaga
- DGN : Atomistic Creation Julian Leyh
- DESIGN: MMO Interviews for College Class Game Researcher
- Atomistic Creation cruise
- Concerning "Groups" Jeff Gaskill
- Concerning "Groups" Sean Kelly
- Concerning "Groups" Jeff Gaskill
- Guild Wars ? Louis d'Ambra
- Guild Wars ? cruise
- Guild Wars ? Colin Fuller
- Guild Wars ? Max Battcher
- Guild Wars ? Don McGlumphy III
- Guild Wars ? Sean Howard
- Guild Wars ? Mordengaard
- Guild Wars ? Mike Oxford
- Guild Wars ? Max Battcher
- Guild Wars ? Corey Crawford
- Guild Wars ? Jason Downs